/ark/js_runtime/ecmascript/ |
D | builtins.h | 44 void Initialize(const JSHandle<GlobalEnv> &env, JSThread *thread); 51 …JSHandle<JSFunction> NewBuiltinConstructor(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject… 54 …JSHandle<JSFunction> NewFunction(const JSHandle<GlobalEnv> &env, const JSHandle<JSTaggedValue> &ke… 57 void InitializeCtor(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject> &prototype, 58 const JSHandle<JSFunction> &ctor, const char *name, int length) const; 60 …void InitializeGlobalObject(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject> &globalObject… 62 …void InitializeFunction(const JSHandle<GlobalEnv> &env, const JSHandle<JSHClass> &emptyFuncDynclas… 64 … void InitializeObject(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject> &objFuncPrototype, 65 const JSHandle<JSObject> &objFunc); 67 void InitializeNumber(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject> &globalObject, [all …]
|
D | object_factory.h | 127 JSHandle<ProfileTypeInfo> NewProfileTypeInfo(uint32_t length); 128 JSHandle<ConstantPool> NewConstantPool(uint32_t capacity); 129 JSHandle<Program> NewProgram(); 130 JSHandle<EcmaModule> NewEmptyEcmaModule(); 132 JSHandle<JSObject> GetJSError(const ErrorType &errorType, const char *data = nullptr); 134 JSHandle<JSObject> NewJSError(const ErrorType &errorType, const JSHandle<EcmaString> &message); 136 JSHandle<TransitionHandler> NewTransitionHandler(); 138 JSHandle<PrototypeHandler> NewPrototypeHandler(); 140 JSHandle<JSObject> NewEmptyJSObject(); 144 …JSHandle<JSFunction> NewJSFunction(const JSHandle<GlobalEnv> &env, const void *nativeFunc = nullpt… [all …]
|
D | js_bigint.h | 41 static JSHandle<BigInt> CreateBigint(JSThread *thread, uint32_t size); 48 static void InitializationZero(JSThread *thread, JSHandle<BigInt> bigint); 49 …static JSHandle<BigInt> BitwiseOp(JSThread *thread, Operate op, JSHandle<BigInt> x, JSHandle<BigIn… 50 static JSHandle<BigInt> BitwiseAND(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 51 static JSHandle<BigInt> BitwiseXOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 52 static JSHandle<BigInt> BitwiseOR(JSThread *thread, JSHandle<BigInt> x, JSHandle<BigInt> y); 53 … static JSHandle<BigInt> BitwiseSubOne(JSThread *thread, JSHandle<BigInt> bigint, uint32_t maxLen); 54 static JSHandle<BigInt> BitwiseAddOne(JSThread *thread, JSHandle<BigInt> bigint); 55 static JSHandle<EcmaString> ToString(JSThread *thread, JSHandle<BigInt> bigint, 57 static std::string ToStdString(JSThread *thread, JSHandle<BigInt> bigint, [all …]
|
D | js_object.h | 65 …explicit PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v) : thread_(thread), … in PropertyDescriptor() 67 …explicit PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v, bool w, bool e, boo… in PropertyDescriptor() 80 : PropertyDescriptor(thread, JSHandle<JSTaggedValue>(), w, e, c) in PropertyDescriptor() 84 inline JSHandle<JSTaggedValue> GetValue() const in GetValue() 87 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined()); in GetValue() 92 inline void SetValue(JSHandle<JSTaggedValue> value) in SetValue() 160 inline JSHandle<JSTaggedValue> GetGetter() const in GetGetter() 163 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined()); in GetGetter() 168 inline JSHandle<JSTaggedValue> GetSetter() const in GetSetter() 171 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined()); in GetSetter() [all …]
|
D | js_api_arraylist.h | 36 …static bool Add(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, const JSHandle<JSTagg… 37 static void Insert(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 38 const JSHandle<JSTaggedValue> &value, const int &index); 39 static void Clear(JSThread *thread, const JSHandle<JSAPIArrayList> &obj); 40 static JSHandle<JSAPIArrayList> Clone(JSThread *thread, const JSHandle<JSAPIArrayList> &obj); 41 static uint32_t GetCapacity(JSThread *thread, const JSHandle<JSAPIArrayList> &obj); 42 static void IncreaseCapacityTo(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, 44 static void TrimToCurrentLength(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList); 45 static bool IsEmpty(const JSHandle<JSAPIArrayList> &arrayList); 46 static int GetIndexOf(JSThread *thread, const JSHandle<JSAPIArrayList> &arrayList, [all …]
|
D | js_proxy.h | 28 static JSHandle<JSProxy> ProxyCreate(JSThread *thread, const JSHandle<JSTaggedValue> &target, 29 const JSHandle<JSTaggedValue> &handler); 31 static JSTaggedValue GetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy); 33 …static bool SetPrototype(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagged… 35 static bool IsExtensible(JSThread *thread, const JSHandle<JSProxy> &proxy); 37 static bool PreventExtensions(JSThread *thread, const JSHandle<JSProxy> &proxy); 39 …static bool GetOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTagg… 42 …static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JST… 45 …static bool HasProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, const JSHandle<JSTaggedV… 47 static inline OperationResult GetProperty(JSThread *thread, const JSHandle<JSProxy> &proxy, in GetProperty() [all …]
|
D | js_iterator.cpp | 27 JSTaggedValue JSIterator::IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &i… in IteratorCloseAndReturn() 28 const JSHandle<JSTaggedValue> &status) in IteratorCloseAndReturn() 33 …JSHandle<JSTaggedValue> record = JSHandle<JSTaggedValue>(factory->NewCompletionRecord(CompletionRe… in IteratorCloseAndReturn() 34 JSHandle<JSTaggedValue>(thread, exception))); in IteratorCloseAndReturn() 35 JSHandle<JSTaggedValue> result = JSIterator::IteratorClose(thread, iter, record); in IteratorCloseAndReturn() 42 JSHandle<JSTaggedValue> JSIterator::GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &ob… in GetIterator() 47 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in GetIterator() 48 JSHandle<JSTaggedValue> iteratorSymbol = env->GetIteratorSymbol(); in GetIterator() 49 JSHandle<JSTaggedValue> func = JSObject::GetMethod(thread, obj, iteratorSymbol); in GetIterator() 55 JSHandle<JSTaggedValue> JSIterator::GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &ob… in GetIterator() [all …]
|
D | object_factory.cpp | 104 JSHandle<JSHClass> ObjectFactory::NewEcmaDynClassClass(JSHClass *hclass, uint32_t size, JSType type) in NewEcmaDynClassClass() 111 return JSHandle<JSHClass>(thread_, newClass); in NewEcmaDynClassClass() 114 JSHandle<JSHClass> ObjectFactory::NewEcmaDynClass(JSHClass *hclass, uint32_t size, JSType type, uin… in NewEcmaDynClass() 121 return JSHandle<JSHClass>(thread_, newClass); in NewEcmaDynClass() 124 JSHandle<JSHClass> ObjectFactory::NewEcmaDynClass(uint32_t size, JSType type, uint32_t inlinedProps) in NewEcmaDynClass() 143 void ObjectFactory::NewJSArrayBufferData(const JSHandle<JSArrayBuffer> &array, int32_t length) in NewJSArrayBufferData() 166 …JSHandle<JSNativePointer> pointer = NewJSNativePointer(newData, NativeAreaAllocator::FreeBufferFun… in NewJSArrayBufferData() 172 JSHandle<JSArrayBuffer> ObjectFactory::NewJSArrayBuffer(int32_t length) in NewJSArrayBuffer() 174 JSHandle<GlobalEnv> env = vm_->GetGlobalEnv(); in NewJSArrayBuffer() 176 JSHandle<JSFunction> constructor(env->GetArrayBufferFunction()); in NewJSArrayBuffer() [all …]
|
D | js_relative_time_format.cpp | 24 JSHandle<JSRelativeTimeFormat> JSRelativeTimeFormat::InitializeRelativeTimeFormat( in InitializeRelativeTimeFormat() 25 …JSThread *thread, const JSHandle<JSRelativeTimeFormat> &relativeTimeFormat, const JSHandle<JSTagge… in InitializeRelativeTimeFormat() 26 const JSHandle<JSTaggedValue> &options) in InitializeRelativeTimeFormat() 32 JSHandle<TaggedArray> requestedLocales = JSLocale::CanonicalizeLocaleList(thread, locales); in InitializeRelativeTimeFormat() 36 JSHandle<JSObject> rtfOptions; in InitializeRelativeTimeFormat() 41 …rtfOptions = factory->OrdinaryNewJSObjectCreate(JSHandle<JSTaggedValue>(thread, JSTaggedValue::Nul… in InitializeRelativeTimeFormat() 53 …JSHandle<JSTaggedValue> property = JSHandle<JSTaggedValue>::Cast(globalConst->GetHandledNumberingS… in InitializeRelativeTimeFormat() 54 JSHandle<JSTaggedValue> undefinedValue(thread, JSTaggedValue::Undefined()); in InitializeRelativeTimeFormat() 55 JSHandle<JSTaggedValue> numberingSystemValue = in InitializeRelativeTimeFormat() 62 … JSHandle<EcmaString> numberingSystemString = JSHandle<EcmaString>::Cast(numberingSystemValue); in InitializeRelativeTimeFormat() [all …]
|
D | js_tagged_value.h | 26 class JSHandle; variable 145 … static JSTaggedValue OrdinaryToPrimitive(JSThread *thread, const JSHandle<JSTaggedValue> &tagged, 149 static JSTaggedValue ToPrimitive(JSThread *thread, const JSHandle<JSTaggedValue> &tagged, 152 static JSTaggedNumber ToNumber(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 153 static JSTaggedValue ToBigInt(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 154 static JSTaggedValue ToBigInt64(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 155 static JSTaggedValue ToBigUint64(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 156 static JSTaggedNumber ToInteger(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 157 static JSTaggedValue ToNumeric(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); 158 static int32_t ToInt32(JSThread *thread, const JSHandle<JSTaggedValue> &tagged); [all …]
|
D | js_iterator.h | 31 … static JSTaggedValue IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &iter, 32 const JSHandle<JSTaggedValue> &status); 34 … static JSHandle<JSTaggedValue> GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &obj); 36 static JSHandle<JSTaggedValue> GetIterator(JSThread *thread, const JSHandle<JSTaggedValue> &obj, 37 const JSHandle<JSTaggedValue> &method); 39 static JSHandle<JSObject> IteratorNext(JSThread *thread, const JSHandle<JSTaggedValue> &iter, 40 const JSHandle<JSTaggedValue> &value); 42 static JSHandle<JSObject> IteratorNext(JSThread *thread, const JSHandle<JSTaggedValue> &iter); 44 static bool IteratorComplete(JSThread *thread, const JSHandle<JSTaggedValue> &iterResult); 46 …static JSHandle<JSTaggedValue> IteratorValue(JSThread *thread, const JSHandle<JSTaggedValue> &iter… [all …]
|
D | tagged_tree.h | 45 static JSHandle<Derived> Create(const JSThread *thread, int numberOfElements); 47 …static JSHandle<Derived> Insert(JSThread *thread, JSHandle<Derived> &tree, const JSHandle<JSTagged… 48 const JSHandle<JSTaggedValue> &value); 50 static JSHandle<Derived> GrowCapacity(const JSThread *thread, JSHandle<Derived> &tree); 54 static void Remove(const JSThread *thread, const JSHandle<Derived> &tree, int entry); 79 …static int FindEntry(JSThread *thread, const JSHandle<Derived> &tree, const JSHandle<JSTaggedValue… 81 …inline static ComparisonResult EntryCompare(JSThread *thread, const JSHandle<JSTaggedValue> valueX, 82 … const JSHandle<JSTaggedValue> valueY, JSHandle<Derived> tree); 135 …static JSHandle<Derived> AdjustTaggedTree(const JSThread *thread, const JSHandle<Derived> &tree, i… 136 …inline static ComparisonResult OrdinayEntryCompare(JSThread *thread, const JSHandle<JSTaggedValue>… [all …]
|
D | linked_hash_table.h | 45 static JSHandle<Derived> Create(const JSThread *thread, int numberOfElements); 47 static JSHandle<Derived> Insert(const JSThread *thread, const JSHandle<Derived> &table, 48 … const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value); 50 static JSHandle<Derived> InsertWeakRef(const JSThread *thread, const JSHandle<Derived> &table, 51 … const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value); 53 static JSHandle<Derived> GrowCapacity(const JSThread *thread, const JSHandle<Derived> &table, 56 static JSHandle<Derived> Remove(const JSThread *thread, const JSHandle<Derived> &table, 57 const JSHandle<JSTaggedValue> &key); 59 …static JSHandle<Derived> Shrink(const JSThread *thread, const JSHandle<Derived> &table, int additi… 147 …static JSHandle<LinkedHashMap> Create(const JSThread *thread, int numberOfElements = MIN_CAPACITY); [all …]
|
D | js_function.cpp | 34 void JSFunction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionK… in InitializeJSFunction() 59 JSHandle<JSTaggedValue> accessor = globalConst->GetHandledFunctionPrototypeAccessor(); in InitializeJSFunction() 66 … [[maybe_unused]] bool success = JSObject::DefineOwnProperty(thread, JSHandle<JSObject>(func), in InitializeJSFunction() 71 JSHandle<JSTaggedValue> accessor = globalConst->GetHandledFunctionNameAccessor(); in InitializeJSFunction() 76 JSHandle<JSObject> JSFunction::NewJSFunctionPrototype(JSThread *thread, ObjectFactory *factory, in NewJSFunctionPrototype() 77 const JSHandle<JSFunction> &func) in NewJSFunctionPrototype() 79 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in NewJSFunctionPrototype() 81 JSHandle<JSTaggedValue> objFun = env->GetObjectFunction(); in NewJSFunctionPrototype() 82 …JSHandle<JSObject> funPro = factory->NewJSObjectByConstructor(JSHandle<JSFunction>(objFun), objFun… in NewJSFunctionPrototype() 86 JSHandle<JSTaggedValue> constructorKey = globalConst->GetHandledConstructorString(); in NewJSFunctionPrototype() [all …]
|
/ark/js_runtime/ecmascript/base/tests/ |
D | json_stringifier_test.cpp | 54 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in CreateBaseJSObject() 56 JSHandle<JSTaggedValue> objectFunc(globalEnv->GetObjectFunction()); in CreateBaseJSObject() 58 …JSHandle<JSObject> jsObject(factory->NewJSObjectByConstructor(JSHandle<JSFunction>(objectFunc), ob… in CreateBaseJSObject() 61 JSHandle<JSTaggedValue> handleKey1(factory->NewFromCanBeCompressString(&keyCStr[0])); in CreateBaseJSObject() 62 JSHandle<JSTaggedValue> handleValue1(thread, JSTaggedValue(1)); // 1 : test case in CreateBaseJSObject() 63 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsObject), handleKey1, handleValue1); in CreateBaseJSObject() 66 JSHandle<JSTaggedValue> handleKey2(factory->NewFromCanBeCompressString(str2)); in CreateBaseJSObject() 67 JSHandle<JSTaggedValue> handleValue2(thread, JSTaggedValue(3.6)); // 3.6 : test case in CreateBaseJSObject() 68 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsObject), handleKey2, handleValue2); in CreateBaseJSObject() 71 JSHandle<JSTaggedValue> handleKey3(factory->NewFromCanBeCompressString(str3)); in CreateBaseJSObject() [all …]
|
/ark/js_runtime/ecmascript/tests/ |
D | js_object_test.cpp | 69 JSHandle<GlobalEnv> globalEnv = thread->GetEcmaVM()->GetGlobalEnv(); in JSObjectTestCreate() 75 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 76 JSHandle<JSObject> jsobject = in HWTEST_F_L0() 77 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 83 JSHandle<JSTaggedValue> objFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 84 JSHandle<JSObject> jsobject = in HWTEST_F_L0() 85 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(objFunc), objFunc… in HWTEST_F_L0() 89 … JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString(array)); in HWTEST_F_L0() 90 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() 92 JSObject::SetProperty(thread, JSHandle<JSTaggedValue>(jsobject), key, value); in HWTEST_F_L0() [all …]
|
D | js_proxy_test.cpp | 63 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in JSObjectTestCreate() 69 JSHandle<JSTaggedValue> dynclass(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 70 JSHandle<JSTaggedValue> targetHandle( in HWTEST_F_L0() 71 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(dynclass), … in HWTEST_F_L0() 73 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("x")); in HWTEST_F_L0() 74 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() 78 JSHandle<JSTaggedValue> handlerHandle( in HWTEST_F_L0() 79 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(dynclass), … in HWTEST_F_L0() 82 JSHandle<JSProxy> proxyHandle = JSProxy::ProxyCreate(thread, targetHandle, handlerHandle); in HWTEST_F_L0() 102 JSHandle<JSTaggedValue> dynclass(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() [all …]
|
D | js_serializer_test.cpp | 69 JSHandle<JSTaggedValue> jsTrue(thread, JSTaggedValue::True()); in JSSpecialValueTest() 70 JSHandle<JSTaggedValue> jsFalse(thread, JSTaggedValue::False()); in JSSpecialValueTest() 71 JSHandle<JSTaggedValue> jsUndefined(thread, JSTaggedValue::Undefined()); in JSSpecialValueTest() 72 JSHandle<JSTaggedValue> jsNull(thread, JSTaggedValue::Null()); in JSSpecialValueTest() 73 JSHandle<JSTaggedValue> jsHole(thread, JSTaggedValue::Hole()); in JSSpecialValueTest() 76 JSHandle<JSTaggedValue> retTrue = deserializer.DeserializeJSTaggedValue(); in JSSpecialValueTest() 78 JSHandle<JSTaggedValue> retFalse = deserializer.DeserializeJSTaggedValue(); in JSSpecialValueTest() 80 JSHandle<JSTaggedValue> retUndefined = deserializer.DeserializeJSTaggedValue(); in JSSpecialValueTest() 81 JSHandle<JSTaggedValue> retNull = deserializer.DeserializeJSTaggedValue(); in JSSpecialValueTest() 82 JSHandle<JSTaggedValue> retHole = deserializer.DeserializeJSTaggedValue(); in JSSpecialValueTest() [all …]
|
D | js_arguments_test.cpp | 55 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in JSObjectTestCreate() 61 JSHandle<JSTaggedValue> argFunc(thread, JSObjectTestCreate(thread)); in HWTEST_F_L0() 62 JSHandle<JSObject> jsarg = in HWTEST_F_L0() 63 …thread->GetEcmaVM()->GetFactory()->NewJSObjectByConstructor(JSHandle<JSFunction>(argFunc), argFunc… in HWTEST_F_L0() 64 JSHandle<JSArguments> arg = thread->GetEcmaVM()->GetFactory()->NewJSArguments(); in HWTEST_F_L0() 67 … JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString(array)); in HWTEST_F_L0() 68 JSHandle<JSTaggedValue> value(thread, JSTaggedValue(1)); in HWTEST_F_L0() 71 JSHandle<JSTaggedValue> receiver = JSHandle<JSTaggedValue>::Cast(jsarg); in HWTEST_F_L0() 73 …EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsarg), key).GetValue()->GetInt(),… in HWTEST_F_L0() 76 JSHandle<JSTaggedValue> value2(thread, JSTaggedValue(2)); in HWTEST_F_L0() [all …]
|
D | tagged_value_test.cpp | 149 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, intV)); in HWTEST_F_L0() 153 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, doubleV)); in HWTEST_F_L0() 157 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, undefinedV)); in HWTEST_F_L0() 161 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, holeV)); in HWTEST_F_L0() 165 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, nullV)); in HWTEST_F_L0() 169 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, falseV)); in HWTEST_F_L0() 173 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, trueV)); in HWTEST_F_L0() 203 result = JSTaggedValue::ToNumber(thread, JSHandle<JSTaggedValue>(thread, intV)); in HWTEST_F_L0() 207 result = JSTaggedValue::ToNumber(thread, JSHandle<JSTaggedValue>(thread, doubleV)); in HWTEST_F_L0() 211 result = JSTaggedValue::ToNumber(thread, JSHandle<JSTaggedValue>(thread, undefinedV)); in HWTEST_F_L0() [all …]
|
/ark/js_runtime/ecmascript/base/ |
D | json_stringifier.h | 36 …JSHandle<JSTaggedValue> Stringify(const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedVal… 37 const JSHandle<JSTaggedValue> &gap); 44 void AddDeduplicateProp(const JSHandle<JSTaggedValue> &property); 46 …JSTaggedValue SerializeJSONProperty(const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedV… 47 …JSTaggedValue GetSerializeValue(const JSHandle<JSTaggedValue> &object, const JSHandle<JSTaggedValu… 48 … const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &replacer); 49 void SerializeObjectKey(const JSHandle<JSTaggedValue> &key, bool hasContent); 51 …bool SerializeJSONObject(const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &repl… 53 …bool SerializeJSArray(const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &replace… 54 …bool SerializeJSProxy(const JSHandle<JSTaggedValue> &object, const JSHandle<JSTaggedValue> &replac… [all …]
|
D | typed_array_helper.h | 30 const JSHandle<JSTaggedValue> &constructorName); 31 static JSHandle<JSObject> AllocateTypedArray(ObjectFactory *factory, EcmaVM *ecmaVm, 32 const JSHandle<JSTaggedValue> &constructorName, 33 const JSHandle<JSTaggedValue> &newTarget); 34 static JSHandle<JSObject> AllocateTypedArray(ObjectFactory *factory, EcmaVM *ecmaVm, 35 const JSHandle<JSTaggedValue> &constructorName, 36 … const JSHandle<JSTaggedValue> &newTarget, int32_t length); 37 … static JSHandle<JSObject> TypedArraySpeciesCreate(JSThread *thread, const JSHandle<JSObject> &obj, 39 …static JSHandle<JSObject> TypedArrayCreate(JSThread *thread, const JSHandle<JSTaggedValue> &constr… 41 static JSTaggedValue ValidateTypedArray(JSThread *thread, const JSHandle<JSTaggedValue> &value); [all …]
|
/ark/js_runtime/ecmascript/builtins/tests/ |
D | builtins_regexp_test.cpp | 65 JSTaggedValue CreateRegExpObjByPatternAndFlags(JSThread *thread, const JSHandle<EcmaString> &patter… in CreateRegExpObjByPatternAndFlags() 66 const JSHandle<EcmaString> &flags) in CreateRegExpObjByPatternAndFlags() 68 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in CreateRegExpObjByPatternAndFlags() 69 JSHandle<JSFunction> regexp(env->GetRegExpFunction()); in CreateRegExpObjByPatternAndFlags() 70 JSHandle<JSObject> globalObject(thread, env->GetGlobalObject()); in CreateRegExpObjByPatternAndFlags() 88 …JSHandle<EcmaString> pattern = thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("\\w+… in HWTEST_F_L0() 89 JSHandle<EcmaString> flags = thread->GetEcmaVM()->GetFactory()->NewFromCanBeCompressString("i"); in HWTEST_F_L0() 93 JSHandle<JSTaggedValue> regexpObject(thread, result); in HWTEST_F_L0() 96 JSHandle<JSRegExp> jsRegexp(thread, JSRegExp::Cast(regexpObject->GetTaggedObject())); in HWTEST_F_L0() 97 JSHandle<JSTaggedValue> originalSource(thread, jsRegexp->GetOriginalSource()); in HWTEST_F_L0() [all …]
|
D | builtins_reflect_test.cpp | 64 static JSHandle<JSFunction> TestObjectCreate(JSThread *thread) in TestObjectCreate() 66 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in TestObjectCreate() 67 return JSHandle<JSFunction>::Cast(env->GetObjectFunction()); in TestObjectCreate() 80 JSHandle<JSTaggedValue> thisValue = BuiltinsBase::GetThis(argv); in TestReflectApply() 84 … JSHandle<JSTaggedValue>(factory->NewFromCanBeCompressString("test_reflect_apply_a"))) in TestReflectApply() 89 … JSHandle<JSTaggedValue>(factory->NewFromCanBeCompressString("test_reflect_apply_b"))) in TestReflectApply() 100 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0() 105 …JSHandle<JSFunction> target = factory->NewJSFunction(env, reinterpret_cast<void *>(TestReflectAppl… in HWTEST_F_L0() 107 JSHandle<JSObject> thisArgument = in HWTEST_F_L0() 108 …factory->NewJSObjectByConstructor(TestObjectCreate(thread), JSHandle<JSTaggedValue>(TestObjectCrea… in HWTEST_F_L0() [all …]
|
/ark/js_runtime/ecmascript/ts_types/ |
D | ts_type_table.h | 50 CVector<JSHandle<EcmaString>> &recordImportMdoules); 52 …static GlobalTSTypeRef GetPropertyType(JSThread *thread, JSHandle<TSTypeTable> &table, TSTypeKind … 53 uint32_t index, JSHandle<EcmaString> propName); 55 static JSHandle<JSTaggedValue> ParseType(JSThread *thread, JSHandle<TSTypeTable> &table, 56 JSHandle<TaggedArray> &literal, 57 JSHandle<EcmaString> fileName, 58 CVector<JSHandle<EcmaString>> &recordImportMdoules); 60 …static JSHandle<TaggedArray> GetExportValueTable(JSThread *thread, JSHandle<TSTypeTable> typeTable… 74 static JSHandle<TSTypeTable> GenerateTypeTable(JSThread *thread, const panda_file::File &pf, 75 … CVector<JSHandle<EcmaString>> &recordImportMdoules); [all …]
|