Home
last modified time | relevance | path

Searched refs:JSPrimitiveRef (Results 1 – 25 of 31) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/
Djs_primitive_ref.cpp26 JSHandle<JSPrimitiveRef> JSPrimitiveRef::StringCreate(JSThread *thread, const JSHandle<JSTaggedValu… in StringCreate()
38 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSPrimitiveRef, thread); in StringCreate()
46 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSPrimitiveRef, thread); in StringCreate()
49 return JSHandle<JSPrimitiveRef>(str); in StringCreate()
52 bool JSPrimitiveRef::StringGetIndexProperty(const JSThread *thread, const JSHandle<JSObject> &obj, … in StringGetIndexProperty()
57 … JSHandle<EcmaString> strHandle(thread, EcmaString::Cast(JSPrimitiveRef::Cast(*obj)->GetValue())); in StringGetIndexProperty()
Djs_primitive_ref.h33 class JSPrimitiveRef : public JSObject {
35 CAST_CHECK(JSPrimitiveRef, IsJSPrimitiveRef);
37 JSPrimitiveRef() = delete;
77 …static JSHandle<JSPrimitiveRef> StringCreate(JSThread *thread, const JSHandle<JSTaggedValue> &valu…
Dobject_factory.h45 class JSPrimitiveRef; variable
263 JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(const JSHandle<JSFunction> &function,
265 …JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(PrimitiveType type, const JSHandle<JSTaggedValue> &obje…
323 …JSHandle<JSPrimitiveRef> NewJSString(const JSHandle<JSTaggedValue> &str, const JSHandle<JSTaggedVa…
681 JSHandle<JSPrimitiveRef> NewJSPrimitiveRef(const JSHandle<JSHClass> &hclass,
Djs_object.cpp446 if (obj->IsJSPrimitiveRef() && JSPrimitiveRef::Cast(*obj)->IsString()) { in GetAllElementKeys()
447 … elementIndex = JSPrimitiveRef::Cast(*obj)->GetStringLength() + static_cast<uint32_t>(offset); in GetAllElementKeys()
478 …if ((filter & NATIVE_ENUMERABLE) && obj->IsJSPrimitiveRef() && JSPrimitiveRef::Cast(*obj)->IsStrin… in GetAllElementKeysByFilter()
479 elementIndex = JSPrimitiveRef::Cast(*obj)->GetStringLength(); in GetAllElementKeysByFilter()
533 if (obj->IsJSPrimitiveRef() && JSPrimitiveRef::Cast(*obj)->IsString()) { in GetEnumElementKeys()
534 elementIndex = JSPrimitiveRef::Cast(*obj)->GetStringLength(); in GetEnumElementKeys()
564 if (obj->IsJSPrimitiveRef() && JSPrimitiveRef::Cast(*obj)->IsString()) { in GetEnumElementKeys()
565 … elementIndex = JSPrimitiveRef::Cast(*obj)->GetStringLength() + static_cast<uint32_t>(offset); in GetEnumElementKeys()
616 if (IsJSPrimitiveRef() && JSPrimitiveRef::Cast(this)->IsString()) { in GetNumberOfElements()
617 numOfElements = JSPrimitiveRef::Cast(this)->GetStringLength(); in GetNumberOfElements()
[all …]
Dobject_operator.cpp97 holder_.Update(JSPrimitiveRef::StringCreate(thread_, holder_, undefined).GetTaggedValue()); in UpdateHolder()
750 …if (obj->IsJSPrimitiveRef() && JSPrimitiveRef::Cast(obj.GetTaggedValue().GetTaggedObject())->IsStr… in LookupElementInlinedProps()
752 bool status = JSPrimitiveRef::StringGetIndexProperty(thread_, obj, elementIndex_, &desc); in LookupElementInlinedProps()
Dobject_factory.cpp640 JSHandle<JSPrimitiveRef> ObjectFactory::NewJSPrimitiveRef(const JSHandle<JSHClass> &hclass, in NewJSPrimitiveRef()
643 JSHandle<JSPrimitiveRef> obj = JSHandle<JSPrimitiveRef>::Cast(NewJSObject(hclass)); in NewJSPrimitiveRef()
1075 JSPrimitiveRef::Cast(*obj)->SetValue(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1804 JSHandle<JSPrimitiveRef> ObjectFactory::NewJSPrimitiveRef(const JSHandle<JSFunction> &function, in NewJSPrimitiveRef()
1807 JSHandle<JSPrimitiveRef> obj(NewJSObjectByConstructor(function)); in NewJSPrimitiveRef()
1817 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSPrimitiveRef, thread_); in NewJSPrimitiveRef()
1823 JSHandle<JSPrimitiveRef> ObjectFactory::NewJSPrimitiveRef(PrimitiveType type, const JSHandle<JSTagg… in NewJSPrimitiveRef()
1851 JSHandle<JSPrimitiveRef> ObjectFactory::NewJSString(const JSHandle<JSTaggedValue> &str, in NewJSString()
1856 JSHandle<JSPrimitiveRef> obj; in NewJSString()
1858 obj = JSHandle<JSPrimitiveRef>::Cast(NewJSObjectByConstructor(stringFunc)); in NewJSString()
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_primitive_ref_test.cpp61 JSHandle<JSObject> str(JSPrimitiveRef::StringCreate(thread, hello, undefined)); in HWTEST_F_L0()
64 bool status = JSPrimitiveRef::HasProperty(thread, str, idx); in HWTEST_F_L0()
68 status = JSPrimitiveRef::GetOwnProperty(thread, str, idx, desc); in HWTEST_F_L0()
Dobject_factory_test.cpp158 JSHandle<JSPrimitiveRef> newPrimitive = factory->NewJSPrimitiveRef(numberFun, primitive); in HWTEST_F_L0()
Dtagged_value_test.cpp860 …JSTaggedValue(JSHandle<JSPrimitiveRef>::Cast(JSTaggedValue::ToObject(thread, value1))->GetValue()); in HWTEST_F_L0()
865 …JSTaggedValue(JSHandle<JSPrimitiveRef>::Cast(JSTaggedValue::ToObject(thread, value2))->GetValue()); in HWTEST_F_L0()
870 …JSTaggedValue(JSHandle<JSPrimitiveRef>::Cast(JSTaggedValue::ToObject(thread, value3))->GetValue()); in HWTEST_F_L0()
875 …JSTaggedValue(JSHandle<JSPrimitiveRef>::Cast(JSTaggedValue::ToObject(thread, value4))->GetValue()); in HWTEST_F_L0()
884 …JSTaggedValue(JSHandle<JSPrimitiveRef>::Cast(JSTaggedValue::ToObject(thread, value5))->GetValue()); in HWTEST_F_L0()
Ddump_test.cpp760 CHECK_DUMP_FIELDS(JSObject::SIZE, JSPrimitiveRef::SIZE, 1U); in HWTEST_F_L0()
761 NEW_OBJECT_AND_DUMP(JSPrimitiveRef, JS_PRIMITIVE_REF) in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_boolean.cpp47 JSPrimitiveRef::Cast(*result)->SetValue(thread, objValue); in BooleanConstructor()
62 JSTaggedValue primitive = JSPrimitiveRef::Cast(value.GetTaggedObject())->GetValue(); in ThisBooleanValue()
Dbuiltins_symbol.cpp77 JSTaggedValue primitive = JSPrimitiveRef::Cast(valueHandle->GetTaggedObject())->GetValue(); in ToString()
135 JSTaggedValue primitive = JSPrimitiveRef::Cast(valueHandle->GetTaggedObject())->GetValue(); in ValueOf()
212 JSTaggedValue primitive = JSPrimitiveRef::Cast(sym->GetTaggedObject())->GetValue(); in ToPrimitive()
244 JSTaggedValue primitive = JSPrimitiveRef::Cast(value->GetTaggedObject())->GetValue(); in ThisSymbolValue()
Dbuiltins_number.cpp74 JSPrimitiveRef::Cast(*result)->SetValue(thread, numberValue); in NumberConstructor()
477 JSTaggedValue primitive = JSPrimitiveRef::Cast(value->GetTaggedObject())->GetValue(); in ThisNumberValue()
Dbuiltins_bigint.cpp207 JSTaggedValue primitive = JSPrimitiveRef::Cast(value->GetTaggedObject())->GetValue(); in ThisBigIntValue()
Dbuiltins_object.cpp809 JSPrimitiveRef *primitiveRef = JSPrimitiveRef::Cast(*object); in GetBuiltinTag()
Dbuiltins_string.cpp82 return JSPrimitiveRef::StringCreate(thread, strTag, newTarget).GetTaggedValue(); in StringConstructor()
89 return JSPrimitiveRef::StringCreate(thread, valTag, newTarget).GetTaggedValue(); in StringConstructor()
1903 JSTaggedValue primitive = JSPrimitiveRef::Cast(value.GetTaggedObject())->GetValue(); in ThisStringValue()
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_boolean_test.cpp77 ASSERT_EQ(JSPrimitiveRef::Cast(result.GetTaggedObject())->GetValue().IsTrue(), 1); in HWTEST_F_L0()
97 ASSERT_EQ(JSPrimitiveRef::Cast(result.GetTaggedObject())->GetValue().IsFalse(), 1); in HWTEST_F_L0()
144 …JSHandle<JSPrimitiveRef> boolean = thread->GetEcmaVM()->GetFactory()->NewJSPrimitiveRef(booleanObj… in HWTEST_F_L0()
180 …JSHandle<JSPrimitiveRef> boolean = thread->GetEcmaVM()->GetFactory()->NewJSPrimitiveRef(booleanObj… in HWTEST_F_L0()
Dbuiltins_number_test.cpp85 JSPrimitiveRef *ref = JSPrimitiveRef::Cast(value.GetTaggedObject()); in HWTEST_F_L0()
226 …JSHandle<JSPrimitiveRef> number = thread->GetEcmaVM()->GetFactory()->NewJSPrimitiveRef(numberObjec… in HWTEST_F_L0()
251 JSHandle<JSPrimitiveRef> number = factory->NewJSPrimitiveRef(numberObject, value); in HWTEST_F_L0()
276 JSHandle<JSPrimitiveRef> number = factory->NewJSPrimitiveRef(numberObject, value); in HWTEST_F_L0()
301 JSHandle<JSPrimitiveRef> number = factory->NewJSPrimitiveRef(numberObject, value); in HWTEST_F_L0()
325 JSHandle<JSPrimitiveRef> number = factory->NewJSPrimitiveRef(numberObject, value); in HWTEST_F_L0()
351 JSHandle<JSPrimitiveRef> number = factory->NewJSPrimitiveRef(numberObject, value); in HWTEST_F_L0()
Dbuiltins_symbol_test.cpp154 …JSHandle<JSPrimitiveRef> symbolRef = ecmaVM->GetFactory()->NewJSPrimitiveRef(symbolObject, symbolV… in HWTEST_F_L0()
213 …JSHandle<JSPrimitiveRef> symbolRef = ecmaVM->GetFactory()->NewJSPrimitiveRef(symbolObject, symbolV… in HWTEST_F_L0()
333 …JSHandle<JSPrimitiveRef> symbolRef = ecmaVM->GetFactory()->NewJSPrimitiveRef(symbolObject, symbolV… in HWTEST_F_L0()
401 …JSHandle<JSPrimitiveRef> symbolRef = ecmaVM->GetFactory()->NewJSPrimitiveRef(symbolObject, symbolV… in HWTEST_F_L0()
Dbuiltins_string_test.cpp110 JSHandle<JSPrimitiveRef> ref(thread, JSPrimitiveRef::Cast(value.GetTaggedObject())); in HWTEST_F_L0()
881 JSHandle<JSPrimitiveRef> str = factory->NewJSPrimitiveRef(stringObject, value); in HWTEST_F_L0()
904 JSHandle<JSPrimitiveRef> str = factory->NewJSPrimitiveRef(stringObject, value); in HWTEST_F_L0()
927 JSHandle<JSPrimitiveRef> str = factory->NewJSPrimitiveRef(stringObject, value); in HWTEST_F_L0()
950 JSHandle<JSPrimitiveRef> str = factory->NewJSPrimitiveRef(stringObject, value); in HWTEST_F_L0()
Dbuiltins_reflect_test.cpp161 JSHandle<JSPrimitiveRef> refResult = JSHandle<JSPrimitiveRef>::Cast(taggedResult); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/base/
Djson_stringifier.cpp195 … JSTaggedValue primitive = JSPrimitiveRef::Cast(prop.GetTaggedObject())->GetValue(); in Stringify()
207 JSTaggedValue primitive = JSPrimitiveRef::Cast(gap->GetTaggedObject())->GetValue(); in Stringify()
654 …JSTaggedValue primitive = JSPrimitiveRef::Cast(primitiveRef.GetTaggedValue().GetTaggedObject())->G… in SerializePrimitiveRef()
/arkcompiler/ets_runtime/ecmascript/base/tests/
Djson_stringifier_test.cpp336 JSHandle<JSPrimitiveRef> handlePrimitiveRef = factory->NewJSString(handleStr, undefined); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/mem/
Dobject_xray.h322 JSPrimitiveRef::Cast(object)->VisitRangeSlot(visitor); in VisitObjectBody()
/arkcompiler/ets_runtime/ecmascript/napi/
Djsnapi.cpp132 using ecmascript::JSPrimitiveRef;
1058 JSTaggedValue primitiveValue = JSPrimitiveRef::Cast(obj->GetTaggedObject())->GetValue(); in GetValue()
3271 return JSPrimitiveRef::Cast(obj->GetTaggedObject())->IsNumber(); in IsJSPrimitiveNumber()
3278 return JSPrimitiveRef::Cast(obj->GetTaggedObject())->IsInt(); in IsJSPrimitiveInt()
3285 return JSPrimitiveRef::Cast(obj->GetTaggedObject())->IsBoolean(); in IsJSPrimitiveBoolean()
3292 return JSPrimitiveRef::Cast(obj->GetTaggedObject())->IsString(); in IsJSPrimitiveString()
3299 return JSPrimitiveRef::Cast(obj->GetTaggedObject())->IsSymbol(); in IsJSPrimitiveSymbol()

12