| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/03.variance/01.invariance/ |
| D | invariance_function.params.yaml | 6 # http://www.apache.org/licenses/LICENSE-2.0 14 --- 16 - argtype: 18 input: 23 - argtype: 25 input: 30 - argtype: 32 input: 37 - argtype: 39 input: [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/containershashmapcommon_fuzzer/ |
| D | containershashmapcommon_fuzzer.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 21 #include "ecmascript/ecma_string-inl.h" 33 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectCreate() 34 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in JSObjectCreate() 35 return globalEnv->GetObjectFunction().GetObject<JSFunction>(); in JSObjectCreate() 40 auto factory = thread->GetEcmaVM()->GetFactory(); in CreateEcmaRuntimeCallInfo() 43 factory->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(hclass), hclass)); in CreateEcmaRuntimeCallInfo() 44 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined(); in CreateEcmaRuntimeCallInfo() 52 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in InitializeHashMapConstructor() 53 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in InitializeHashMapConstructor() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/stdlib-templates/escompat/ |
| D | list.escompat_regexp_instance.yaml | 1 # Copyright (c) 2021-2024 Huawei Device Co., Ltd. 6 # http://www.apache.org/licenses/LICENSE-2.0 14 - { 20 method_signature: { input: String }, 22 method_signature_desc: { input: StringSimple }, 37 test10: { input: '"table football"' }, 38 test20: { input: '"table football"' }, 39 test30: { input: '"table football"' }, 40 test40: { input: '"table football"' }, 41 test50: { input: '"aabaac"' }, [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/daterefnew_fuzzer/ |
| D | daterefnew_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 18 #include "ecmascript/ecma_string-inl.h" 32 LOG_ECMA(ERROR) << "illegal input!"; in DateRefNewFuzzTest() 35 double input = 0; in DateRefNewFuzzTest() local 39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in DateRefNewFuzzTest() 43 if (std::isnan(input)) { in DateRefNewFuzzTest() 44 input = ecmascript::base::NAN_VALUE; in DateRefNewFuzzTest() 46 DateRef::New(vm, input); in DateRefNewFuzzTest() 56 LOG_ECMA(ERROR) << "illegal input!"; in DateRefGetTimeFuzzTest() 59 double input = 0; in DateRefGetTimeFuzzTest() local [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/ |
| D | call_signature.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 20 #pragma clang diagnostic ignored "-Wshadow" 21 #pragma clang diagnostic ignored "-Wunused-parameter" 24 #pragma GCC diagnostic ignored "-Wshadow" 25 #pragma GCC diagnostic ignored "-Wunused-parameter" 37 /* 3 : 3 input parameters */ \ 41 /* 3 : 3 input parameters */ \ 47 callSign->SetParameters(params.data()); \ 48 callSign->SetCallConv(CallSignature::CallConv::CCallConv); 148 // 3 : 3 input parameters in DEF_CALL_SIGNATURE() [all …]
|
| /arkcompiler/ets_runtime/test/perform/string/ |
| D | expect_output.txt | 6 # http://www.apache.org/licenses/LICENSE-2.0 17 string split number of input parameters is 2 : 70 18 string split number of input parameters is 1 : 35 20 string indexOf input parameter is a substring : 14 21 string indexOf Input parameter is not a substring : 15 22 string indexOf number of input parameters is 2 : 11 23 string slice number of input parameters is 1 : 17 24 string slice number of input parameters is 2 : 18 25 string slice input parameter is negative : 18 31 string substr number of input parameters is 2 : 17 [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluereftobigint_fuzzer/ |
| D | jsvaluereftobigint_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 17 #include "ecmascript/ecma_string-inl.h" 30 LOG_ECMA(ERROR) << "illegal input!"; in JSValueRefToBigIntFuzztest() 33 char *input = new char[size](); in JSValueRefToBigIntFuzztest() local 34 if (memcpy_s(input, size, data, size) != 0) { in JSValueRefToBigIntFuzztest() 38 Local<JSValueRef> message = StringRef::NewFromUtf8(vm, input, (int)size); in JSValueRefToBigIntFuzztest() 39 message->ToBigInt(vm); in JSValueRefToBigIntFuzztest() 40 delete[] input; in JSValueRefToBigIntFuzztest() 41 input = nullptr; in JSValueRefToBigIntFuzztest() 51 LOG_ECMA(ERROR) << "illegal input!"; in JSValueRefTypeofFuzztest() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/optimizations/ |
| D | lowering.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 21 ASSERT(inst->GetOpcode() == Opcode::IfImm); in VisitIfImm() 22 LowerIf(inst->CastToIfImm()); in VisitIfImm() 28 ASSERT(cst->GetOpcode() == Opcode::Constant); in ConstantFitsCompareImm() 29 if (DataType::IsFloatType(cst->GetType())) { in ConstantFitsCompareImm() 32 int64_t val = cst->CastToConstant()->GetRawValue(); in ConstantFitsCompareImm() 39 ASSERT(cmp->GetOpcode() == Opcode::Compare); in BetterToSwapCompareInputs() 40 auto in0 = cmp->GetInput(0).GetInst(); in BetterToSwapCompareInputs() 41 auto in1 = cmp->GetInput(1).GetInst(); in BetterToSwapCompareInputs() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/jsvaluerefisbig64array_fuzzer/ |
| D | jsvaluerefisbig64array_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 17 #include "ecmascript/ecma_string-inl.h" 32 LOG_ECMA(ERROR) << "illegal input!"; in JSValueRefIsBigInt64ArrayFuzzTest() 35 int32_t input; in JSValueRefIsBigInt64ArrayFuzzTest() local 39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in JSValueRefIsBigInt64ArrayFuzzTest() 44 if (input > MaxMenory) { in JSValueRefIsBigInt64ArrayFuzzTest() 45 input = MaxMenory; in JSValueRefIsBigInt64ArrayFuzzTest() 47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in JSValueRefIsBigInt64ArrayFuzzTest() 49 typedArray->IsBigInt64Array(vm); in JSValueRefIsBigInt64ArrayFuzzTest() 59 LOG_ECMA(ERROR) << "illegal input!"; in JSValueRefIsBigUint64ArrayRefNewFuzzTest() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/baseline/ |
| D | baseline_call_signature.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 43 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 47 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 59 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 63 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 75 // 3 : 3 input parameters in DEF_CALL_SIGNATURE() 79 // 3 : 3 input parameters in DEF_CALL_SIGNATURE() 90 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 94 // 4 : 4 input parameters in DEF_CALL_SIGNATURE() 106 // 1 : 1 input parameters in DEF_CALL_SIGNATURE() [all …]
|
| /arkcompiler/ets_frontend/es2panda/ |
| D | README.md | 7 es2panda [OPTIONS] [input file] -- [arguments] 11 - `--debug-info`: Compile with debug info 12 - `--dump-assembly`: Dump pandasm 13 - `--dump-ast`: Dump the parsed AST 14 - `--dump-debug-info`: Dump debug info 15 - `--dump-size-stat`: Dump binary size statistics 16 - `--extension`: Parse the input as the given extension (options: js | ts | as) 17 - `--module`: Parse the input as module 18 - `--opt-level`: Compiler optimization level (options: 0 | 1 | 2) 19 - `--output`: Compiler binary output (.abc) [all …]
|
| /arkcompiler/ets_frontend/ets2panda/ |
| D | README.md | 7 es2panda [OPTIONS] [input file] -- [arguments] 11 - `--debug-info`: Compile with debug info 12 - `--dump-assembly`: Dump pandasm 13 - `--dump-ast`: Dump the parsed AST 14 - `--dump-debug-info`: Dump debug info 15 - `--dump-size-stat`: Dump binary size statistics 16 - `--extension`: Parse the input as the given extension (options: js | ts | as) 17 - `--module`: Parse the input as module 18 - `--opt-level`: Compiler optimization level (options: 0 | 1 | 2) 19 - `--output`: Compiler binary output (.abc) [all …]
|
| /arkcompiler/runtime_core/libpandabase/tests/ |
| D | mutex_test.cpp | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 40 static void *TestThread1(void *input) in TestThread1() argument 42 ASSERT(input != nullptr); in TestThread1() 43 ThreadRWLockArgs *arg = reinterpret_cast<ThreadRWLockArgs *>(input); in TestThread1() 44 arg->rwlock->WriteLock(); in TestThread1() 45 (*(arg->index))++; in TestThread1() 47 arg->rwlock->Unlock(); in TestThread1() 51 static void *TestThread2(void *input) in TestThread2() argument 53 ASSERT(input != nullptr); in TestThread2() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/arkts_header/ |
| D | arkts_header.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 35 static bool ProcessArgs(ark::PandArgParser &paParser, const ark::PandArg<std::string> &input, in ProcessArgs() argument 38 if (input.GetValue().empty() || help.GetValue()) { in ProcessArgs() 44 …std::string outputFilename = input.GetValue().substr(0, input.GetValue().find_last_of('.')) + ".h"; in ProcessArgs() 57 ark::PandArg<std::string> input("INPUT", "", "Input binary file"); in main() local 63 paParser.PushBackTail(&input); in main() 72 if (!ProcessArgs(paParser, input, output, help)) { in main() 76 auto inputFile = ark::panda_file::File::Open(input.GetValue()); in main() 78 LOG(ERROR, ETS_NAPI) << "Cannot open file '" << input.GetValue() << "'"; in main() [all …]
|
| /arkcompiler/runtime_core/compiler/optimizer/ir_builder/ |
| D | inst_builder-inl.h | 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 22 // NOLINTNEXTLINE(misc-definitions-in-headers) 23 // NOLINTNEXTLINE(misc-definitions-in-headers) 27 auto method = GetGraph()->GetMethod(); in BuildLoadFromPool() 30 auto save_state = CreateSaveState(Opcode::SaveState, GetPc(bc_inst->GetAddress())); in BuildLoadFromPool() 32 // NOLINTNEXTLINE(readability-magic-numbers) in BuildLoadFromPool() 34 …type_id = GetRuntime()->ResolveOffsetByIndex(GetGraph()->GetMethod(), bc_inst->GetId(0).AsIndex()); in BuildLoadFromPool() 35 inst = GetGraph()->CreateInstLoadString(DataType::REFERENCE, GetPc(bc_inst->GetAddress())); in BuildLoadFromPool() 36 inst->SetTypeId(type_id); in BuildLoadFromPool() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/regexp/tests/ |
| D | regexp_test.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 16 #include "ecmascript/ecma_string-inl.h" 42 chunk_ = thread->GetEcmaVM()->GetChunk(); in SetUp() 105 uint32_t startIndex = regExpGlobalResult->GetStartOfCaptureIndex(index).GetInt(); in GetSubString() 106 uint32_t len = regExpGlobalResult->GetEndOfCaptureIndex(index).GetInt() - startIndex; in GetSubString() 108 thread->GetEcmaVM(), inputStr, startIndex, len)); in GetSubString() 132 CString source("^[z-a]$"); in HWTEST_F_L0() 322 CString source("[b-ac-e]"); in HWTEST_F_L0() 332 CString source("[\\10b-G]"); in HWTEST_F_L0() 342 CString source("[\\0b-G]"); in HWTEST_F_L0() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/uint32arrayrefbytelength_fuzzer/ |
| D | uint32arrayrefbytelength_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 17 #include "ecmascript/ecma_string-inl.h" 32 LOG_ECMA(ERROR) << "illegal input!"; in Uint32ArrayRefByteLengthFuzzTest() 35 int32_t input; in Uint32ArrayRefByteLengthFuzzTest() local 39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in Uint32ArrayRefByteLengthFuzzTest() 44 if (input > MaxMenory) { in Uint32ArrayRefByteLengthFuzzTest() 45 input = MaxMenory; in Uint32ArrayRefByteLengthFuzzTest() 47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in Uint32ArrayRefByteLengthFuzzTest() 49 typedArray->ByteLength(vm); in Uint32ArrayRefByteLengthFuzzTest()
|
| /arkcompiler/toolchain/tooling/client/ark_multi/ |
| D | ReadMe.md | 13 #### Execute the content of the input.txt file 33 ark_multi 3 input.txt --icu-data-path "third_party/icu/ohos_icu4j/data" 39 - #### Using standalone build 49 2. Construct input file test262.txt 53 3. Execute multi-threaded testing 56 …ark_multi 6 arkcompiler/toolchain/tooling/client/ark_multi/test262.txt --icu-data-path "third_part… 64 1. Write the local abc path into input.txt 69 …hecking_function/ out/x64.debug/arkcompiler/toolchain/ark_multi 6 input.txt--icu-data-path "third_…
|
| /arkcompiler/runtime_core/abc2program/ |
| D | dump_utils.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 67 return it->second; in GetFunctionKindString() 74 return it->second; in LiteralTagToString() 87 return it->second; in GetLiteralIdIndex4Ins() 94 return it->second; in GetMappedLabel() 100 pandasm::Ins PandasmDumperUtils::DeepCopyIns(const pandasm::Ins &input) in DeepCopyIns() argument 103 res.opcode = input.opcode; in DeepCopyIns() 104 res.regs=input.regs; in DeepCopyIns() 105 res.ids=input.ids; in DeepCopyIns() 106 for (size_t i = 0; i < input.imms.size(); ++i) { in DeepCopyIns() [all …]
|
| /arkcompiler/runtime_core/libabckit/include/cpp/headers/ |
| D | instruction.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 33 // We restrict constructors in order to prevent C/C++ API mix-up by user. 153 * @brief Returns `inst` input under given `index`. 154 * @param [ in ] index - Index of input to be returned. 155 * @return input `Instruction` 160 * @brief Sets input, overwrites existing input. 162 * @param [ in ] index - Index of input to be set. 163 * @param [ in ] input - Input instruction to be set. 165 Instruction SetInput(uint32_t index, Instruction input) const; 169 * @param cb - Callback that will be invoked. [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/containersdequecommon_fuzzer/ |
| D | containersdequecommon_fuzzer.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 21 #include "ecmascript/ecma_string-inl.h" 27 #include "ecmascript/js_tagged_value-inl.h" 41 EcmaVM *ecmaVM = thread->GetEcmaVM(); in JSObjectCreate() 42 JSHandle<GlobalEnv> globalEnv = ecmaVM->GetGlobalEnv(); in JSObjectCreate() 43 return globalEnv->GetObjectFunction().GetObject<JSFunction>(); in JSObjectCreate() 48 auto factory = thread->GetEcmaVM()->GetFactory(); in CreateEcmaRuntimeCallInfo() 50 …JSHandle<JSTaggedValue> callee(factory->NewJSObjectByConstructor(JSHandle<JSFunction>::Cast(hclass… in CreateEcmaRuntimeCallInfo() 51 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined(); in CreateEcmaRuntimeCallInfo() 59 auto factory = thread->GetEcmaVM()->GetFactory(); in CreateJSAPIDeque() [all …]
|
| /arkcompiler/ets_runtime/test/fuzztest/arraybufferrefnewwithtwoparameters_fuzzer/ |
| D | arraybufferrefnewwithtwoparameters_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 18 #include "ecmascript/ecma_string-inl.h" 32 int32_t input; in ArrayBufferRefNewWithTwoParametersFuzzTest() local 39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in ArrayBufferRefNewWithTwoParametersFuzzTest() 43 ArrayBufferRef::New(vm, input); in ArrayBufferRefNewWithTwoParametersFuzzTest() 52 int32_t input; in ArrayBufferRef_New_IsDetach_Detach_ByteLength_GetBuffer_FuzzTest() local 59 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in ArrayBufferRef_New_IsDetach_Detach_ByteLength_GetBuffer_FuzzTest() 63 Local<ArrayBufferRef> arrayBuffer = ArrayBufferRef::New(vm, input); in ArrayBufferRef_New_IsDetach_Detach_ByteLength_GetBuffer_FuzzTest() 64 arrayBuffer->IsDetach(vm); in ArrayBufferRef_New_IsDetach_Detach_ByteLength_GetBuffer_FuzzTest() 65 arrayBuffer->Detach(vm); in ArrayBufferRef_New_IsDetach_Detach_ByteLength_GetBuffer_FuzzTest() [all …]
|
| /arkcompiler/runtime_core/static_core/quickener/ |
| D | quick.cpp | 2 * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 7 * http://www.apache.org/licenses/LICENSE-2.0 42 static bool ProcessArgs(ark::PandArgParser &pa_parser, const ark::PandArg<std::string> &input, in ProcessArgs() argument 45 if (input.GetValue().empty() || output.GetValue().empty() || help.GetValue()) { in ProcessArgs() 60 ark::PandArg<std::string> input("INPUT", "", "Path to the input binary file"); in main() local 66 pa_parser.PushBackTail(&input); in main() 74 if (!ProcessArgs(pa_parser, input, output, help)) { in main() 78 auto input_file = ark::panda_file::File::Open(input.GetValue()); in main() 80 LOG(ERROR, QUICKENER) << "Cannot open file '" << input.GetValue() << "'"; in main() 101 if (!container->Write(&writer, false)) { in main()
|
| /arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforfloat_fuzzer/ |
| D | builtinsarraybuffergetvaluefrombufferforfloat_fuzzer.cpp | 7 * http://www.apache.org/licenses/LICENSE-2.0 19 #include "ecmascript/ecma_string-inl.h" 41 JSThread *thread = vm->GetJSThread(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 42 JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 44 double input; in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() local 51 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 56 if (std::isnan(input) || JSTaggedValue::IsImpureNaN(input)) { in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 57 input = 0.0; in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 60 JSHandle<JSTaggedValue> bufferConstructor = env->GetArrayBufferFunction(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() 63 JSHandle<JSTaggedValue> val(thread, JSTaggedValue(input)); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
|
| /arkcompiler/runtime_core/static_core/runtime/tooling/inspector/evaluation/ |
| D | base64.h | 7 * http://www.apache.org/licenses/LICENSE-2.0 31 static std::optional<size_t> DecodedSize(Span<const uint8_t> input) in DecodedSize() argument 33 if (input.empty() || input.size() % ENCODED_GROUP_BYTES != 0) { in DecodedSize() 37 auto sz = input.size() / ENCODED_GROUP_BYTES * DECODED_GROUP_BYTES; in DecodedSize() 38 auto last = input.end() - 1; in DecodedSize() 39 for (size_t i = 0; i < MAX_PADDINGS && *last == PADDING_CHAR; ++i, --last) { in DecodedSize() 40 --sz; in DecodedSize() 59 static bool Decode(uint8_t *output, Span<const uint8_t> input) in Decode() argument 63 if (input.empty() || input.size() % ENCODED_GROUP_BYTES != 0) { in Decode() 69 auto srcIter = input.begin(); in Decode() [all …]
|