Home
last modified time | relevance | path

Searched refs:JSHandle (Results 1 – 25 of 325) sorted by relevance

12345678910>>...13

/ark/js_runtime/ecmascript/
Dbuiltins.h44 void Initialize(const JSHandle<GlobalEnv> &env, JSThread *thread);
51JSHandle<JSFunction> NewBuiltinConstructor(const JSHandle<GlobalEnv> &env, const JSHandle<JSObject…
54JSHandle<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 …]
Dobject_factory.h127 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();
144JSHandle<JSFunction> NewJSFunction(const JSHandle<GlobalEnv> &env, const void *nativeFunc = nullpt…
[all …]
Djs_bigint.h41 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 …]
Djs_object.h65 …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 …]
Djs_api_arraylist.h36 …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 …]
Djs_proxy.h28 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 …]
Djs_iterator.cpp27 JSTaggedValue JSIterator::IteratorCloseAndReturn(JSThread *thread, const JSHandle<JSTaggedValue> &i… in IteratorCloseAndReturn()
28 const JSHandle<JSTaggedValue> &status) in IteratorCloseAndReturn()
33JSHandle<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 …]
Dobject_factory.cpp104 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()
166JSHandle<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 …]
Djs_relative_time_format.cpp24 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()
53JSHandle<JSTaggedValue> property = JSHandle<JSTaggedValue>::Cast(globalConst->GetHandledNumberingS… in InitializeRelativeTimeFormat()
54 JSHandle<JSTaggedValue> undefinedValue(thread, JSTaggedValue::Undefined()); in InitializeRelativeTimeFormat()
55 JSHandle<JSTaggedValue> numberingSystemValue = in InitializeRelativeTimeFormat()
62JSHandle<EcmaString> numberingSystemString = JSHandle<EcmaString>::Cast(numberingSystemValue); in InitializeRelativeTimeFormat()
[all …]
Djs_tagged_value.h26 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 …]
Djs_iterator.h31 … 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 …]
Dtagged_tree.h45 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 …]
Dlinked_hash_table.h45 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 …]
Djs_function.cpp34 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()
82JSHandle<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/
Djson_stringifier_test.cpp54 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in CreateBaseJSObject()
56 JSHandle<JSTaggedValue> objectFunc(globalEnv->GetObjectFunction()); in CreateBaseJSObject()
58JSHandle<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/
Djs_object_test.cpp69 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()
89JSHandle<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 …]
Djs_proxy_test.cpp63 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 …]
Djs_serializer_test.cpp69 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 …]
Djs_arguments_test.cpp55 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()
67JSHandle<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 …]
Dtagged_value_test.cpp149 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/
Djson_stringifier.h36JSHandle<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 …]
Dtyped_array_helper.h30 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/
Dbuiltins_regexp_test.cpp65 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()
88JSHandle<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 …]
Dbuiltins_reflect_test.cpp64 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()
84JSHandle<JSTaggedValue>(factory->NewFromCanBeCompressString("test_reflect_apply_a"))) in TestReflectApply()
89JSHandle<JSTaggedValue>(factory->NewFromCanBeCompressString("test_reflect_apply_b"))) in TestReflectApply()
100 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
105JSHandle<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/
Dts_type_table.h50 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 …]

12345678910>>...13