• Home
  • Raw
  • Download

Lines Matching +full:parser +full:-

7  *     http://www.apache.org/licenses/LICENSE-2.0
39 auto *jsHClass = obj->GetClass(); in CheckSendableConstraint()
40 if (!jsHClass->IsJSShared()) { in CheckSendableConstraint()
43 if (jsHClass->IsExtensible()) { in CheckSendableConstraint()
52 auto proto = jsHClass->GetPrototype(thread); in CheckSendableConstraint()
63 auto *jsHClass = obj->GetClass(); in CheckSendableProps()
64 auto layoutValue = jsHClass->GetLayout(thread); in CheckSendableProps()
70 auto *propsValue = TaggedArray::Cast(jsObj->GetProperties(thread)); in CheckSendableProps()
71 if (propsValue->IsDictionaryMode()) { in CheckSendableProps()
72 for (int idx = 0; idx < static_cast<int>(jsHClass->NumberOfProps()); idx++) { in CheckSendableProps()
73 auto attr = layoutInfo->GetAttr(thread, idx); in CheckSendableProps()
79 … LOG_ECMA(ERROR) << "sendable check failed. supposed to be un-writable. idx: " << idx; in CheckSendableProps()
83 auto val = propsValue->Get(thread, idx - jsHClass->GetInlinedProperties()); in CheckSendableProps()
97 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
98 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
100 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromASCII("1234")); in HWTEST_F_L0()
102 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
103 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0()
105 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromASCII("true")); in HWTEST_F_L0()
107 JSHandle<JSTaggedValue> result3 = parser.Parse(handleStr3); in HWTEST_F_L0()
110 JSHandle<JSTaggedValue> handleMsg4(factory->NewFromASCII("false")); in HWTEST_F_L0()
112 JSHandle<JSTaggedValue> result4 = parser.Parse(handleStr4); in HWTEST_F_L0()
115 JSHandle<JSTaggedValue> handleMsg5(factory->NewFromASCII("trus")); in HWTEST_F_L0()
117 JSHandle<JSTaggedValue> result5 = parser.Parse(handleStr5); in HWTEST_F_L0()
123 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
124 Utf16JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
129 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromUtf16(&array1Utf16[0], array1Utf16Len)); in HWTEST_F_L0()
131 JSHandle<JSTaggedValue> result2 = parser.Parse(*handleStr2); in HWTEST_F_L0()
132 EXPECT_EQ(result2->GetNumber(), 1234); in HWTEST_F_L0()
136 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromUtf16(&array2Utf16[0], array2Utf16Len)); in HWTEST_F_L0()
138 JSHandle<JSTaggedValue> result3 = parser.Parse(*handleStr3); in HWTEST_F_L0()
143 JSHandle<JSTaggedValue> handleMsg4(factory->NewFromUtf16(&array3Utf16[0], array3Utf16Len)); in HWTEST_F_L0()
145 JSHandle<JSTaggedValue> result4 = parser.Parse(*handleStr4); in HWTEST_F_L0()
152 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
153 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
154 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII( in HWTEST_F_L0()
158 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
159 result->D(thread); in HWTEST_F_L0()
165 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
166 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
167 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII("[100,2.5,\"abc\"]")); in HWTEST_F_L0()
169 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
170 result->D(thread); in HWTEST_F_L0()
176 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
177 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
178 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII("{\"epf\":100,\"key1\":400}")); in HWTEST_F_L0()
180 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
186 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
187 JSHandle<EcmaString> emptyString(thread->GlobalConstants()->GetHandledEmptyString()); in HWTEST_F_L0()
188 JSHandle<JSTaggedValue> result = parser.Parse(emptyString); in HWTEST_F_L0()
189 EXPECT_TRUE(result->IsException()); in HWTEST_F_L0()
194 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
195 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
197 JSHandle<EcmaString> handleStr(factory->NewFromASCII("\"\"")); in HWTEST_F_L0()
198 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
199 EXPECT_FALSE(result->IsException()); in HWTEST_F_L0()
204 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
205 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
207 …factory->NewFromASCII(R"({"innerEntry": {"x":1, "y":"abc", "str": "innerStr"}, "x": 1, "str": "out… in HWTEST_F_L0()
209 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
210 result->D(thread); in HWTEST_F_L0()
211 EXPECT_FALSE(result->IsException()); in HWTEST_F_L0()
217 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
218 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
219 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII(R"({})")); in HWTEST_F_L0()
221 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
222 result->D(thread); in HWTEST_F_L0()
228 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
229 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
230 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII(R"([])")); in HWTEST_F_L0()
232 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
233 result->D(thread); in HWTEST_F_L0()
239 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
240 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
241 JSHandle<JSTaggedValue> handleMsg(factory->NewFromASCII(R"([1, 2, 3])")); in HWTEST_F_L0()
243 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
244 result->D(thread); in HWTEST_F_L0()
250 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
251 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
253 … factory->NewFromASCII(R"({"innerEntry": {"array": [1, 2, 3]}, "x": 1, "str": "outerStr"})")); in HWTEST_F_L0()
255 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()
256 result->D(thread); in HWTEST_F_L0()
262 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in HWTEST_F_L0()
264 constructor.Update(env->GetSObjectFunction()); in HWTEST_F_L0()
265 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
266 JSHandle<JSObject> root = factory->NewJSObjectByConstructor(constructor); in HWTEST_F_L0()
267 JSHandle<JSTaggedValue> rootName(factory->GetEmptyString()); in HWTEST_F_L0()
271 ASSERT_TRUE(!result->IsUndefined()); in HWTEST_F_L0()
276 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
277 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
279 JSHandle<JSTaggedValue> handleMsg1(factory->NewFromASCII("tr")); in HWTEST_F_L0()
281 JSHandle<JSTaggedValue> result1 = parser.Parse(handleStr1); in HWTEST_F_L0()
284 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromASCII("fa")); in HWTEST_F_L0()
286 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
289 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromASCII("falss")); in HWTEST_F_L0()
291 JSHandle<JSTaggedValue> result3 = parser.Parse(handleStr3); in HWTEST_F_L0()
297 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
298 Utf8JsonParser parser(thread, TransformType::SENDABLE); in HWTEST_F_L0() local
300 JSHandle<JSTaggedValue> handleMsg1(factory->NewFromASCII(R"([1, 2, 3})")); in HWTEST_F_L0()
302 JSHandle<JSTaggedValue> result1 = parser.Parse(handleStr1); in HWTEST_F_L0()
305 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromASCII(R"({"innerEntry""entry"})")); in HWTEST_F_L0()
307 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
310 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromASCII("1s2")); in HWTEST_F_L0()
312 JSHandle<JSTaggedValue> result3 = parser.Parse(handleStr3); in HWTEST_F_L0()
315 JSHandle<JSTaggedValue> handleMsg4(factory->NewFromASCII("122-")); in HWTEST_F_L0()
317 JSHandle<JSTaggedValue> result4 = parser.Parse(handleStr4); in HWTEST_F_L0()
320 JSHandle<JSTaggedValue> handleMsg5(factory->NewFromASCII("122+")); in HWTEST_F_L0()
322 JSHandle<JSTaggedValue> result5 = parser.Parse(handleStr5); in HWTEST_F_L0()
328 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
333 factory->NewFromASCII(R"({"small":1234})")); in HWTEST_F_L0()
341 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromASCII(R"({"big":1122334455667788999})")); in HWTEST_F_L0()
349 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromASCII(R"({"large":1122334455667788999})")); in HWTEST_F_L0()
357 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
360 Utf8JsonParser parser(thread, TransformType::SENDABLE, options); in HWTEST_F_L0() local
362 JSHandle<JSTaggedValue> handleMsg1(factory->NewFromASCII(R"({})")); in HWTEST_F_L0()
364 JSHandle<JSTaggedValue> result1 = parser.Parse(handleStr1); in HWTEST_F_L0()
367 JSHandle<JSTaggedValue> handleMsg2(factory->NewFromASCII(R"({"innerEntry""entry"})")); in HWTEST_F_L0()
369 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
372 JSHandle<JSTaggedValue> handleMsg3(factory->NewFromASCII(R"({"innerEntry"})")); in HWTEST_F_L0()
374 JSHandle<JSTaggedValue> result3 = parser.Parse(handleStr3); in HWTEST_F_L0()
377 JSHandle<JSTaggedValue> handleMsg4(factory->NewFromASCII(R"({)")); in HWTEST_F_L0()
379 JSHandle<JSTaggedValue> result4 = parser.Parse(handleStr4); in HWTEST_F_L0()
385 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
388 Utf8JsonParser parser(thread, TransformType::NORMAL, options); in HWTEST_F_L0() local
390 JSHandle<JSTaggedValue> handleMsg1(factory->NewFromASCII(R"({})")); in HWTEST_F_L0()
392 JSHandle<JSTaggedValue> result1 = parser.Parse(handleStr1); in HWTEST_F_L0()
396 … factory->NewFromASCII(R"({"innerEntry": {"array": [1, 2, 3]}, "x": 1, "str": "outerStr"})")); in HWTEST_F_L0()
398 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
404 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
407 Utf8JsonParser parser(thread, TransformType::NORMAL, options); in HWTEST_F_L0() local
409 JSHandle<JSTaggedValue> handleMsg1(factory->NewFromASCII(R"({"shortExp":1.79e+308})")); in HWTEST_F_L0()
411 JSHandle<JSTaggedValue> result1 = parser.Parse(handleStr1); in HWTEST_F_L0()
415 factory->NewFromASCII(R"({"longExp":1.7976931348623157e+308})")); in HWTEST_F_L0()
417 JSHandle<JSTaggedValue> result2 = parser.Parse(handleStr2); in HWTEST_F_L0()
423 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HWTEST_F_L0()
426 Utf8JsonParser parser(thread, TransformType::SENDABLE, options); in HWTEST_F_L0() local
429 … factory->NewFromASCII(R"({"innerEntry": {"array": [1, 2, 3]}, "x": 1, "str": "outerStr"})")); in HWTEST_F_L0()
431 JSHandle<JSTaggedValue> result = parser.Parse(handleStr); in HWTEST_F_L0()