Home
last modified time | relevance | path

Searched +full:input +full:- (Results 1 – 25 of 785) sorted by relevance

12345678910>>...32

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DspecedNoStackBlown.ts8 * http://www.apache.org/licenses/LICENSE-2.0
23 // Project: https://github.com/25th-floor/spected
28 …alue<ROOTINPUT, ROOTINPUT> = SpecValue<ROOTINPUT, ROOTINPUT>>(spec: SPEC, input: ROOTINPUT): Resul…
30 type Predicate<INPUT, ROOTINPUT> = (value: INPUT, inputs: ROOTINPUT) => boolean;
32 type ErrorMsg<INPUT> =
34 | ((value: INPUT, field: string) => any);
36 export type Spec<INPUT, ROOTINPUT = any> = [Predicate<INPUT, ROOTINPUT>, ErrorMsg<INPUT>];
38 export type SpecArray<INPUT, ROOTINPUT = any> = Array<Spec<INPUT, ROOTINPUT>>;
40 export type SpecFunction<INPUT, ROOTINPUT = any> = [INPUT] extends [ReadonlyArray<infer U>]
41 ? (value: INPUT) => ReadonlyArray<SpecArray<U, ROOTINPUT>>
[all …]
DtaggedTemplatesWithTypeArguments1.ts8 * http://www.apache.org/licenses/LICENSE-2.0
64 declare function g<Input, T, U, V>(
66 t: (i: Input) => T, u: (i: Input) => U, v: (i: Input) => V): T | U | V;
71 AssertType(g, "<Input, T, U, V>(TemplateStringsArray, (Input) => T, (Input) => U, (Input) => V) => …
106 prop: <T>(strs: TemplateStringsArray, x: (input: T) => T) => {
109 AssertType(input, "T");
117 export let c = obj["prop"]<Stuff> `${(input) => ({ ...input })}`
118 AssertType(obj["prop"]<Stuff> `${(input) => ({ ...input })}`, "{ returnedObjProp: Stuff; }");
122 AssertType(`${(input) => ({ ...input })}`, "string");
123 AssertType((input) => ({ ...input }), "(Stuff) => { x: number; y: string; z: boolean; }");
[all …]
DobservableInferenceCanBeMade.ts8 * http://www.apache.org/licenses/LICENSE-2.0
24 declare function from<O extends ObservableInput<any>>(input: O): Observable<ObservedValueOf<O>>;
38 function asObservable(input: string | ObservableInput<string>): Observable<string> {
39 AssertType(typeof input === 'string' ? of(input) : from(input), "Observable<string>");
40 AssertType(typeof input === 'string', "boolean");
41 AssertType(typeof input, "union");
42 AssertType(input, "union");
44 AssertType(of(input), "Observable<string>");
46 AssertType(input, "string");
47 AssertType(from(input), "Observable<string>");
[all …]
DuntypedArgumentInLambdaExpression.ts8 * http://www.apache.org/licenses/LICENSE-2.0
23 f((input): string => {
25 AssertType((input): string => { return "." + input;}, "(string) => string");
26 AssertType(input, "string");
27 AssertType(f((input): string => { return "." + input;}), "any");
29 AssertType("." + input, "string");
31 AssertType(input, "string");
32 return "." + input;
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/jsDeclarationsFunctionClassesCjsExportAssignment/
Dcontext.js8 * http://www.apache.org/licenses/LICENSE-2.0
30 * Input type definition
32 * @typedef {Object} Input
49 * @param {Input} input
52 function Context(input) { argument
60 AssertType(new Context(input), "Context");
62 AssertType(input, "Input");
63 return new Context(input)
65 this.state = this.construct(input);
66 AssertType(this.state = this.construct(input), "State");
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dcall_signature.cpp7 * 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"
28 #include "llvm-c/Core.h"
39 /* 3 : 3 input parameters */ \
43 /* 3 : 3 input parameters */ \
49 callSign->SetParameters(params.data()); \
50 callSign->SetCallConv(CallSignature::CallConv::CCallConv);
[all …]
Dtest_stubs_signature.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
21 // 7 : 7 input parameters in DEF_CALL_SIGNATURE()
25 std::array<VariableType, 7> params = { // 7 : 7 input parameters in DEF_CALL_SIGNATURE()
34 callSign->SetParameters(params.data()); in DEF_CALL_SIGNATURE()
35 callSign->SetCallConv(CallSignature::CallConv::WebKitJSCallConv); in DEF_CALL_SIGNATURE()
40 // 7 : 7 input parameters in DEF_CALL_SIGNATURE()
44 std::array<VariableType, 7> params = { // 7 : 7 input parameters in DEF_CALL_SIGNATURE()
53 callSign->SetParameters(params.data()); in DEF_CALL_SIGNATURE()
54 callSign->SetCallConv(CallSignature::CallConv::WebKitJSCallConv); in DEF_CALL_SIGNATURE()
59 // 7 : 7 input parameters in DEF_CALL_SIGNATURE()
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/jsDeclarationsImportAliasExposedWithinNamespaceCjs/
Dfile2.js8 * http://www.apache.org/licenses/LICENSE-2.0
39 /** @typedef {boolean|myTypes.typeC} testFnTypes.input */
44 * @param {testFnTypes.input} input - Input.
48 function testFn(input) { argument
49 if (typeof input === 'number') {
50 AssertType(typeof input === 'number', "boolean");
51 AssertType(typeof input, "union");
52 AssertType(input, "union");
55 AssertType(2 * input, "number");
57 AssertType(input, "never");
[all …]
/arkcompiler/runtime_core/compiler/optimizer/optimizations/
Dlowering.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
23 ASSERT(inst->GetOpcode() == Opcode::IfImm); in VisitIfImm()
24 LowerIf(inst->CastToIfImm()); in VisitIfImm()
30 ASSERT(cst->GetOpcode() == Opcode::Constant); in ConstantFitsCompareImm()
31 if (DataType::IsFloatType(cst->GetType())) { in ConstantFitsCompareImm()
34 int64_t val = cst->CastToConstant()->GetRawValue(); in ConstantFitsCompareImm()
41 ASSERT(cmp->GetOpcode() == Opcode::Compare); in BetterToSwapCompareInputs()
42 auto in0 = cmp->GetInput(0).GetInst(); in BetterToSwapCompareInputs()
43 auto in1 = cmp->GetInput(1).GetInst(); in BetterToSwapCompareInputs()
[all …]
/arkcompiler/ets_frontend/es2panda/
DREADME.md7 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_runtime/ecmascript/base/
Dmath_helper.h2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
22 #define panda_bit_utils_ctz __builtin_ctz // NOLINT(cppcoreguidelines-macro-usage)
23 #define panda_bit_utils_ctzll __builtin_ctzll // NOLINT(cppcoreguidelines-macro-usage)
38 static double Asinh(double input) in Asinh() argument
41 if (input == 0 && !std::signbit(input)) { in Asinh()
46 return std::asinh(input); in Asinh()
49 static inline double Atanh(double input) in Atanh() argument
52 if (input == 0 && std::signbit(input)) { in Atanh()
53 … // -0.0(double) is the special case for std::atanh() function compiled in linux for windows. in Atanh()
[all …]
/arkcompiler/runtime_core/libpandabase/tests/
Dmutex_test.cpp2 * 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/ets_runtime/ecmascript/regexp/tests/
Dregexp_test.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
16 #include "ecmascript/ecma_string-inl.h"
42 chunk_ = thread->GetEcmaVM()->GetChunk(); in SetUp()
120 CString source("^[z-a]$"); in HWTEST_F_L0()
310 CString source("[b-ac-e]"); in HWTEST_F_L0()
320 CString source("[\\10b-G]"); in HWTEST_F_L0()
330 CString source("[\\0b-G]"); in HWTEST_F_L0()
440 CString source("[\\d-a]"); in HWTEST_F_L0()
450 CString source("[\\s-a]"); in HWTEST_F_L0()
460 CString source("[\\s-\\w]"); in HWTEST_F_L0()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir_builder/
Dinst_builder-inl.h2 * 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/test/fuzztest/containersdequecommon_fuzzer/
Dcontainersdequecommon_fuzzer.h7 * 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_frontend/es2panda/aot/
Doptions.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
75 static std::vector<std::string> GetStringItems(std::string &input, const std::string &delimiter) in GetStringItems() argument
80 while ((pos = input.find(delimiter)) != std::string::npos) { in GetStringItems()
81 token = input.substr(0, pos); in GetStringItems()
85 input.erase(0, pos + delimiter.length()); in GetStringItems()
87 if (!input.empty()) { in GetStringItems()
88 items.push_back(input); in GetStringItems()
94 bool Options::CollectInputFilesFromFileList(const std::string &input, const std::string &inputExten… in CollectInputFilesFromFileList() argument
98 ifs.open(panda::os::file::File::GetExtendedFilePath(input)); in CollectInputFilesFromFileList()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/builtinsarraybuffergetvaluefrombufferforfloat_fuzzer/
Dbuiltinsarraybuffergetvaluefrombufferforfloat_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
19 #include "ecmascript/ecma_string-inl.h"
39 JSThread *thread = vm->GetJSThread(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
40 JSHandle<GlobalEnv> env = vm->GetGlobalEnv(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
42 double input; in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest() local
49 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
54 if (std::isnan(input) || JSTaggedValue::IsImpureNaN(input)) { in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
55 input = 0.0; in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
58 JSHandle<JSTaggedValue> bufferConstructor = env->GetArrayBufferFunction(); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
60 JSHandle<JSTaggedValue> val(thread, JSTaggedValue(input)); in BuiltinsArrayBufferGetValueFromBufferForFloatFuzzTest()
/arkcompiler/runtime_core/bytecode_optimizer/
Dreg_acc_alloc.cpp2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
7 * http://www.apache.org/licenses/LICENSE-2.0
30 compiler::BasicBlock *block = src_inst->GetBasicBlock(); in IsAccWriteBetween()
31 compiler::Inst *inst = src_inst->GetNext(); in IsAccWriteBetween()
38 if (block->GetSuccsBlocks().size() > 1) { in IsAccWriteBetween()
42 ASSERT(block->GetSuccsBlocks().size() == 1); in IsAccWriteBetween()
43 block = block->GetSuccessor(0); in IsAccWriteBetween()
46 if (!dst_inst->IsPhi() && block->GetPredsBlocks().size() > 1) { in IsAccWriteBetween()
49 } while (block->IsEmpty() && !block->HasPhi()); in IsAccWriteBetween()
53 inst = *(block->AllInsts()); in IsAccWriteBetween()
[all …]
/arkcompiler/ets_runtime/test/fuzztest/daterefnew_fuzzer/
Ddaterefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
34 double input = 0; in DateRefNewFuzzTest() local
38 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in DateRefNewFuzzTest()
42 if (std::isnan(input)) { in DateRefNewFuzzTest()
43 input = ecmascript::base::NAN_VALUE; in DateRefNewFuzzTest()
45 DateRef::New(vm, input); in DateRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/int8arrayrefnew_fuzzer/
Dint8arrayrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
32 int32_t input; in Int8ArrayRefNewFuzzTest() local
39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in Int8ArrayRefNewFuzzTest()
44 if (input > MaxMenory) { in Int8ArrayRefNewFuzzTest()
45 input = MaxMenory; in Int8ArrayRefNewFuzzTest()
47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in Int8ArrayRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/bigint64arrayrefnew_fuzzer/
Dbigint64arrayrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
32 int32_t input; in BigInt64ArrayRefNewFuzzTest() local
39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in BigInt64ArrayRefNewFuzzTest()
44 if (input > MaxMenory) { in BigInt64ArrayRefNewFuzzTest()
45 input = MaxMenory; in BigInt64ArrayRefNewFuzzTest()
47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in BigInt64ArrayRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/uint32arrayrefnew_fuzzer/
Duint32arrayrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
32 int32_t input; in Uint32ArrayRefNewFuzzTest() local
39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in Uint32ArrayRefNewFuzzTest()
44 if (input > MaxMenory) { in Uint32ArrayRefNewFuzzTest()
45 input = MaxMenory; in Uint32ArrayRefNewFuzzTest()
47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in Uint32ArrayRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/uint8arrayrefnew_fuzzer/
Duint8arrayrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
32 int32_t input; in Uint8ArrayRefNewFuzzTest() local
39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in Uint8ArrayRefNewFuzzTest()
44 if (input > MaxMenory) { in Uint8ArrayRefNewFuzzTest()
45 input = MaxMenory; in Uint8ArrayRefNewFuzzTest()
47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in Uint8ArrayRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/dataviewrefnew_fuzzer/
Ddataviewrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
32 int32_t input; in DataViewRefNewFuzzTest() local
39 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in DataViewRefNewFuzzTest()
44 if (input > MaxMenory) { in DataViewRefNewFuzzTest()
45 input = MaxMenory; in DataViewRefNewFuzzTest()
47 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in DataViewRefNewFuzzTest()
/arkcompiler/ets_runtime/test/fuzztest/float32arrayrefnew_fuzzer/
Dfloat32arrayrefnew_fuzzer.cpp7 * http://www.apache.org/licenses/LICENSE-2.0
18 #include "ecmascript/ecma_string-inl.h"
33 int32_t input; in Float32ArrayRefNewFuzzTest() local
40 if (memcpy_s(&input, MAXBYTELEN, data, size) != 0) { in Float32ArrayRefNewFuzzTest()
45 if (input > MaxMenory) { in Float32ArrayRefNewFuzzTest()
46 input = MaxMenory; in Float32ArrayRefNewFuzzTest()
48 Local<ArrayBufferRef> ref = ArrayBufferRef::New(vm, input); in Float32ArrayRefNewFuzzTest()

12345678910>>...32