/arkcompiler/toolchain/tooling/base/ |
D | pt_returns.cpp | 21 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() local 23 result->Add("debuggerId", std::to_string(debuggerId_).c_str()); in ToJson() 25 return result; in ToJson() 30 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() local 32 result->Add("breakpointId", id_.c_str()); in ToJson() 40 result->Add("locations", array); in ToJson() 42 return result; in ToJson() 47 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() local 56 result->Add("locations", array); in ToJson() 58 return result; in ToJson() [all …]
|
D | pt_events.cpp | 21 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() local 22 result->Add("breakpointId", breakpointId_.c_str()); in ToJson() 24 result->Add("location", location_->ToJson()); in ToJson() 28 object->Add("params", result); in ToJson() 35 std::unique_ptr<PtJson> result = PtJson::CreateObject(); in ToJson() local 43 result->Add("callFrames", array); in ToJson() 44 result->Add("reason", reason_.c_str()); in ToJson() 47 result->Add("data", data_.value()->ToJson()); in ToJson() 55 result->Add("hitBreakpoints", breakpoints); in ToJson() 60 object->Add("params", result); in ToJson() [all …]
|
D | pt_params.cpp | 23 Result ret; in Create() 27 if (ret == Result::SUCCESS) { in Create() 29 } else if (ret == Result::TYPE_ERROR) { // optional value in Create() 45 Result ret; in Create() 49 if (ret == Result::SUCCESS) { in Create() 56 if (ret == Result::SUCCESS) { in Create() 63 if (ret == Result::SUCCESS) { in Create() 65 } else if (ret == Result::TYPE_ERROR) { // optional value in Create() 70 if (ret == Result::SUCCESS) { in Create() 72 } else if (ret == Result::TYPE_ERROR) { // optional value in Create() [all …]
|
D | pt_json.cpp | 56 std::string result(str); in Stringify() local 58 return result; in Stringify() 351 Result PtJson::GetBool(const char *key, bool *value) const in GetBool() 355 return Result::NOT_EXIST; in GetBool() 358 return Result::TYPE_ERROR; in GetBool() 362 return Result::SUCCESS; in GetBool() 365 Result PtJson::GetInt(const char *key, int32_t *value) const in GetInt() 367 double result; in GetInt() local 368 Result ret = GetDouble(key, &result); in GetInt() 369 if (ret == Result::SUCCESS) { in GetInt() [all …]
|
D | pt_types.cpp | 935 Result ret; in Create() 939 if (ret == Result::SUCCESS) { in Create() 951 if (ret == Result::SUCCESS) { in Create() 957 } else if (ret == Result::TYPE_ERROR) { in Create() 963 if (ret == Result::SUCCESS) { in Create() 965 } else if (ret == Result::TYPE_ERROR) { in Create() 971 if (ret == Result::SUCCESS) { in Create() 973 } else if (ret == Result::TYPE_ERROR) { in Create() 979 if (ret == Result::SUCCESS) { in Create() 981 } else if (ret == Result::TYPE_ERROR) { in Create() [all …]
|
/arkcompiler/runtime_core/compiler/tests/ |
D | iterators_test.cpp | 33 std::vector<Inst *> result; in Check() local 35 result.push_back(inst); in Check() 37 EXPECT_EQ(result, expect_phis_); in Check() 39 result.clear(); in Check() 41 result.push_back(inst); in Check() 43 EXPECT_EQ(result, expect_insts_); in Check() 45 result.clear(); in Check() 47 result.push_back(inst); in Check() 49 EXPECT_EQ(result, expect_all_); in Check() 52 result.clear(); in Check() [all …]
|
/arkcompiler/ets_runtime/ecmascript/tests/ |
D | tagged_value_test.cpp | 146 JSTaggedValue result; in HWTEST_F_L0() local 149 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, intV)); in HWTEST_F_L0() 150 EXPECT_EQ(result.GetInt(), 100); in HWTEST_F_L0() 153 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, doubleV)); in HWTEST_F_L0() 154 EXPECT_EQ(result.GetDouble(), (double)100.0); in HWTEST_F_L0() 157 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, undefinedV)); in HWTEST_F_L0() 158 EXPECT_TRUE(result.IsUndefined()); in HWTEST_F_L0() 161 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, holeV)); in HWTEST_F_L0() 162 EXPECT_TRUE(result.IsHole()); in HWTEST_F_L0() 165 result = JSTaggedValue::ToPrimitive(thread, JSHandle<JSTaggedValue>(thread, nullV)); in HWTEST_F_L0() [all …]
|
/arkcompiler/toolchain/tooling/test/ |
D | pt_types_test.cpp | 55 BreakpointId result = BreakpointDetails::ToString(input); in HWTEST_F_L0() local 56 ASSERT_TRUE(result == "id:0:0:"); in HWTEST_F_L0() 63 bool result = BreakpointDetails::ParseBreakpointId(input, &detail); in HWTEST_F_L0() local 64 ASSERT_TRUE(!result); in HWTEST_F_L0() 66 result = BreakpointDetails::ParseBreakpointId(input, &detail); in HWTEST_F_L0() 67 ASSERT_TRUE(!result); in HWTEST_F_L0() 69 result = BreakpointDetails::ParseBreakpointId(input, &detail); in HWTEST_F_L0() 70 ASSERT_TRUE(!result); in HWTEST_F_L0() 72 result = BreakpointDetails::ParseBreakpointId(input, &detail); in HWTEST_F_L0() 73 ASSERT_TRUE(result); in HWTEST_F_L0() [all …]
|
D | debugger_events_test.cpp | 72 ASSERT_EQ(breakpointResolved.ToJson()->GetObject("params", &json), Result::SUCCESS); in HWTEST_F_L0() 74 ASSERT_EQ(json->GetString("breakpointId", &breakpointId), Result::SUCCESS); in HWTEST_F_L0() 78 ASSERT_EQ(json->GetObject("location", &locationJson), Result::SUCCESS); in HWTEST_F_L0() 80 ASSERT_EQ(locationJson->GetString("scriptId", &scriptId), Result::SUCCESS); in HWTEST_F_L0() 83 ASSERT_EQ(locationJson->GetInt("lineNumber", &lineNumber), Result::SUCCESS); in HWTEST_F_L0() 96 ASSERT_EQ(json->GetObject("params", ¶ms), Result::SUCCESS); in HWTEST_F_L0() 99 ASSERT_EQ(params->GetString("reason", &reason), Result::SUCCESS); in HWTEST_F_L0() 102 ASSERT_EQ(params->GetArray("callFrames", &callFrames), Result::SUCCESS); in HWTEST_F_L0() 111 ASSERT_EQ(json1->GetObject("params", ¶ms), Result::SUCCESS); in HWTEST_F_L0() 121 ASSERT_EQ(json->GetString("method", &method), Result::SUCCESS); in HWTEST_F_L0() [all …]
|
D | pt_json_test.cpp | 160 ASSERT_EQ(root->GetBool("a", &b), Result::SUCCESS); in HWTEST_F_L0() 162 ASSERT_EQ(root->GetInt("b", &i32), Result::SUCCESS); in HWTEST_F_L0() 164 ASSERT_EQ(root->GetDouble("c", &d), Result::SUCCESS); in HWTEST_F_L0() 166 ASSERT_EQ(root->GetInt64("d", &i64), Result::SUCCESS); in HWTEST_F_L0() 168 ASSERT_EQ(root->GetString("e", &str), Result::SUCCESS); in HWTEST_F_L0() 170 ASSERT_EQ(root->GetObject("f", &json), Result::SUCCESS); in HWTEST_F_L0() 171 ASSERT_EQ(json->GetString("ch", &str), Result::SUCCESS); in HWTEST_F_L0() 173 ASSERT_EQ(root->GetArray("g", &json), Result::SUCCESS); in HWTEST_F_L0() 185 std::string result = ptJson.Stringify(); in HWTEST_F_L0() local 186 ASSERT_EQ(result, ""); in HWTEST_F_L0() [all …]
|
D | dispatcher_test.cpp | 55 bool result = dispatchRequest->IsValid(); in HWTEST_F_L0() local 56 ASSERT_TRUE(!result); in HWTEST_F_L0() 59 result = dispatchRequest1->IsValid(); in HWTEST_F_L0() 60 ASSERT_TRUE(result); in HWTEST_F_L0() 63 result = dispatchRequest2->IsValid(); in HWTEST_F_L0() 64 ASSERT_TRUE(!result); in HWTEST_F_L0() 67 result = dispatchRequest3->IsValid(); in HWTEST_F_L0() 70 result = dispatchRequest9->IsValid(); in HWTEST_F_L0() 71 ASSERT_TRUE(!result); in HWTEST_F_L0() 74 result = dispatchRequest4->IsValid(); in HWTEST_F_L0() [all …]
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | logicalAssignment2targetesnext.ts | 31 declare const result: A constant 32 AssertType(result, "A"); 43 a.baz &&= result.baz 44 AssertType(a.baz &&= result.baz, "union"); 46 AssertType(result.baz, "union"); 48 b.baz ||= result.baz 49 AssertType(b.baz ||= result.baz, "union"); 51 AssertType(result.baz, "union"); 53 c.baz ??= result.baz 54 AssertType(c.baz ??= result.baz, "union"); [all …]
|
D | logicalAssignment2targetes2021.ts | 31 declare const result: A constant 32 AssertType(result, "A"); 43 a.baz &&= result.baz 44 AssertType(a.baz &&= result.baz, "union"); 46 AssertType(result.baz, "union"); 48 b.baz ||= result.baz 49 AssertType(b.baz ||= result.baz, "union"); 51 AssertType(result.baz, "union"); 53 c.baz ??= result.baz 54 AssertType(c.baz ??= result.baz, "union"); [all …]
|
D | logicalAssignment2targetes2015.ts | 31 declare const result: A constant 32 AssertType(result, "A"); 43 a.baz &&= result.baz 44 AssertType(a.baz &&= result.baz, "union"); 46 AssertType(result.baz, "union"); 48 b.baz ||= result.baz 49 AssertType(b.baz ||= result.baz, "union"); 51 AssertType(result.baz, "union"); 53 c.baz ??= result.baz 54 AssertType(c.baz ??= result.baz, "union"); [all …]
|
D | logicalAssignment2targetes2020.ts | 31 declare const result: A constant 32 AssertType(result, "A"); 43 a.baz &&= result.baz 44 AssertType(a.baz &&= result.baz, "union"); 46 AssertType(result.baz, "union"); 48 b.baz ||= result.baz 49 AssertType(b.baz ||= result.baz, "union"); 51 AssertType(result.baz, "union"); 53 c.baz ??= result.baz 54 AssertType(c.baz ??= result.baz, "union"); [all …]
|
D | truthinessCallExpressionCoercion3.ts | 26 function f(result: unknown) { 27 if ((result as I).always) { 28 AssertType((result as I).always, "() => void"); 29 AssertType((result as I), "I"); 30 AssertType(result as I, "I"); 31 AssertType(result, "unknown"); 33 AssertType(result, "unknown"); 34 return result 37 function g(result: unknown) { 38 if (((result as I)).always) { [all …]
|
D | useRegexpGroups.ts | 25 let result = re.exec("2015-01-02"); 26 AssertType(result, "RegExpExecArray"); 31 let date = result[0]; 33 AssertType(result[0], "string"); 34 AssertType(result, "RegExpExecArray"); 37 let year1 = result.groups.year; 39 AssertType(result.groups.year, "string"); 41 let year2 = result[1]; 43 AssertType(result[1], "string"); 44 AssertType(result, "RegExpExecArray"); [all …]
|
D | typeInferenceFBoundedTypeParams.ts | 23 function fold<a, r>(values: a[], result: r, fold: (result: r, value: a) => r): r { 28 result = fold(result, value); 29 AssertType(result = fold(result, value), "r"); 30 AssertType(result, "r"); 31 AssertType(fold(result, value), "r"); 33 AssertType(result, "r"); 36 AssertType(result, "r"); 37 return result; 51 …ype(fold( [1, 2, 3], [] as [string, string][], (result, value) => append( result, … 64 (result, value) => append( [all …]
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_math.cpp | 58 double result = base::NAN_VALUE; in Acos() local 59 // value == -NaN , <-1 or > 1,result is NaN in Acos() 61 result = std::acos(value); in Acos() 63 return GetTaggedDouble(result); in Acos() 77 double result = base::NAN_VALUE; in Acosh() local 79 result = std::acosh(value); in Acosh() 81 return GetTaggedDouble(result); in Acosh() 95 double result = base::NAN_VALUE; in Asin() local 97 result = std::asin(value); in Asin() 99 return GetTaggedDouble(result); in Asin() [all …]
|
/arkcompiler/ets_runtime/ecmascript/ |
D | elements.cpp | 23 CMap<ElementsKind, ConstantIndex> result; in InitializeHClassMap() local 24 result.emplace(ElementsKind::NONE, ConstantIndex::ELEMENT_NONE_HCLASS_INDEX); in InitializeHClassMap() 25 result.emplace(ElementsKind::INT, ConstantIndex::ELEMENT_INT_HCLASS_INDEX); in InitializeHClassMap() 26 result.emplace(ElementsKind::DOUBLE, ConstantIndex::ELEMENT_DOUBLE_HCLASS_INDEX); in InitializeHClassMap() 27 result.emplace(ElementsKind::NUMBER, ConstantIndex::ELEMENT_NUMBER_HCLASS_INDEX); in InitializeHClassMap() 28 result.emplace(ElementsKind::STRING, ConstantIndex::ELEMENT_STRING_HCLASS_INDEX); in InitializeHClassMap() 29 result.emplace(ElementsKind::OBJECT, ConstantIndex::ELEMENT_OBJECT_HCLASS_INDEX); in InitializeHClassMap() 30 result.emplace(ElementsKind::TAGGED, ConstantIndex::ELEMENT_TAGGED_HCLASS_INDEX); in InitializeHClassMap() 31 result.emplace(ElementsKind::HOLE_INT, ConstantIndex::ELEMENT_HOLE_INT_HCLASS_INDEX); in InitializeHClassMap() 32 result.emplace(ElementsKind::HOLE_DOUBLE, ConstantIndex::ELEMENT_HOLE_DOUBLE_HCLASS_INDEX); in InitializeHClassMap() [all …]
|
/arkcompiler/ets_runtime/ecmascript/compiler/ |
D | access_object_stub_builder.cpp | 33 DEFVARIABLE(result, VariableType::JS_ANY(), Hole()); in LoadObjByName() 37 builder.LoadICByName(&result, &tryFastPath, &slowPath, &exit, callback); in LoadObjByName() 41 result = GetPropertyByName(glue, receiver, propKey, callback); in LoadObjByName() 43 Branch(TaggedIsHole(*result), &slowPath, ¬Hole); in LoadObjByName() 53 result = CallRuntime(glue, RTSTUB_ID(LoadICByName), in LoadObjByName() 59 auto ret = *result; in LoadObjByName() 74 DEFVARIABLE(result, VariableType::JS_ANY(), Hole()); in DeprecatedLoadObjByName() 78 result = GetPropertyByName(glue, receiver, propKey, ProfileOperation()); in DeprecatedLoadObjByName() 79 Branch(TaggedIsHole(*result), &slowPath, &exit); in DeprecatedLoadObjByName() 83 result = CallRuntime(glue, RTSTUB_ID(LoadICByName), in DeprecatedLoadObjByName() [all …]
|
D | new_object_stub_builder.cpp | 28 void NewObjectStubBuilder::NewLexicalEnv(Variable *result, Label *exit, GateRef numSlots, GateRef p… in NewLexicalEnv() argument 36 AllocateInYoung(result, &afterAllocate); in NewLexicalEnv() 40 Branch(TaggedIsException(result->ReadVariable()), &hasPendingException, &noException); in NewLexicalEnv() 45 StoreHClass(glue_, result->ReadVariable(), hclass); in NewLexicalEnv() 48 result->ReadVariable(), Hole(), Int32(LexicalEnv::RESERVED_ENV_LENGTH), length); in NewLexicalEnv() 51 glue_, result->ReadVariable(), Int32(LexicalEnv::SCOPE_INFO_INDEX), Hole()); in NewLexicalEnv() 53 glue_, result->ReadVariable(), Int32(LexicalEnv::PARENT_ENV_INDEX), parent); in NewLexicalEnv() 69 GateRef result = NewJSObject(glue_, hclass); in NewJSArrayWithSize() local 75 SetElementsArray(VariableType::JS_POINTER(), glue_, result, arrayRet); in NewJSArrayWithSize() 76 return result; in NewJSArrayWithSize() [all …]
|
/arkcompiler/ets_runtime/test/moduletest/typedarrayat/ |
D | typedarrayat.js | 52 let result = [] 59 result.push(obj.at(-1) == 14); 60 result.push(obj.at(1.5) == 11); 61 result.push(obj.at(-3) == 12); 62 result.push(obj.at("3") == 13) 63 result.push(obj.at(-6) == undefined); 64 result.push(obj.at(5) == undefined); 65 result.push(obj.at({}) == 10); 66 for (let i = 0; i < result.length; i++) { 67 if (!result[i]) { [all …]
|
/arkcompiler/ets_runtime/test/moduletest/typearray/ |
D | typearray.js | 54 let result = [] 56 result.push(obj[0] == 0); 57 result.push(obj[1] == 0); 59 result.push(obj[0] == 123) 60 result.push(obj["a"] == undefined); 62 result.push(obj["a"] == "abc"); 64 result.push(obj["-0"] == undefined) 65 for (let i = 0; i < result.length; i++) { 66 if (!result[i]) { 74 let result = [] [all …]
|
/arkcompiler/ets_runtime/test/moduletest/arrayfindlast/ |
D | arrayfindlast.js | 24 var result = -1; variable 25 result = arr.findLast((element, index, array) => { 29 print(result); 30 result = arr.findLast((element) => { 33 print(result); 35 result = arr.findLastIndex((element, index, array) => { 41 print(result); 42 result = arr.findLastIndex((element, index, array) => { 45 print(result); 48 result = arr2.findLast((element, index, array) => { [all …]
|