/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | throwStatements.ts | 59 throw aNumber; 64 throw aString; 71 throw aDate; 77 throw anObject; 83 throw anAny; 90 throw anOtherAny; 95 throw anUndefined; 102 throw aClass; 108 throw aGenericClass; 115 throw anObjectLiteral; [all …]
|
D | throwInEnclosingStatements.ts | 22 throw x; 26 <T>(x: T) => { throw x; 27 AssertType(<T>(x: T) => { throw x; }, "<T>(T) => never"); 39 throw y; 41 throw y; 49 throw z; 53 for (let i = 0; ;) { throw i; 57 for (let idx in {}) { throw idx; 61 do { throw null; }while(true) 68 while (j < 0) { throw j; [all …]
|
D | asyncIIFE.ts | 23 AssertType((async () => { await 10 throw new Error(); })(), "Promise<never>"); 24 AssertType((async () => { await 10 throw new Error(); }), "() => Promise<never>"); 25 AssertType(async () => { await 10 throw new Error(); }, "() => Promise<never>"); 31 throw new Error();
|
D | neverType.ts | 22 throw new Error(message); 29 throw new Error(message); 50 throw new Error(); 123 throw new Error(); 133 throw new Error(); 202 test(() => { throw new Error(); }) 203 AssertType(test(() => { throw new Error(); }), "string"); 205 AssertType(() => { throw new Error(); }, "() => never");
|
D | promiseTypeStrictNull.ts | 93 throw Error(); 150 throw Error(); 235 const p17 = p.catch(() => {throw 1}); 237 AssertType(p.catch(() => {throw 1}), "Promise<boolean>"); 239 AssertType(() => {throw 1}, "() => never"); 306 const p27 = p.then(() => {throw 1}); 308 AssertType(p.then(() => {throw 1}), "Promise<never>"); 310 AssertType(() => {throw 1}, "() => never"); 384 const p37 = p.then(undefined, () => {throw 1}); 386 AssertType(p.then(undefined, () => {throw 1}), "Promise<boolean>"); [all …]
|
/arkcompiler/ets_frontend/es2panda/test/parser/js/ |
D | test-throw-statement.js | 17 throw 123 18 throw 123; 19 throw '' 20 throw ''; 21 throw "" 22 throw ""; 23 throw undefined 24 throw undefined; 25 throw null 26 throw null; [all …]
|
/arkcompiler/ets_frontend/ts2panda/src/ |
D | syntaxChecker.ts | 130 …throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFil… 259 …throw new DiagnosticError(decl.node, DiagnosticCode.Declaration_name_conflicts_with_built_in_globa… 268 …throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, sourceNode, [decl.name… 283 …throw new DiagnosticError(node, DiagnosticCode.Jump_target_cannot_cross_function_boundary, jshelpe… 305 …throw new DiagnosticError(node, DiagnosticCode.A_continue_statement_can_only_jump_to_a_label_of_an… 341 throw new DiagnosticError(node, diagnosticCode, jshelpers.getSourceFileOfNode(node)); 348 …throw new DiagnosticError(node, DiagnosticCode.A_return_statement_can_only_be_used_within_a_functi… 359 …throw new DiagnosticError(node, DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_y… 364 throw new DiagnosticError(node, 368 throw new DiagnosticError(node, [all …]
|
D | syntaxCheckerForStrcitMode.ts | 38 …throw new DiagnosticError(unaryExpr, DiagnosticCode.A_delete_cannot_be_called_on_an_identifier_in_… 48 throw new DiagnosticError(node, DiagnosticCode.Octal_literals_are_not_allowed_in_strict_mode); 54 …throw new DiagnosticError(node, DiagnosticCode.Octal_escape_sequences_are_not_allowed_in_strict_mo… 58 throw new DiagnosticError(node, DiagnosticCode._8_and_9_are_not_allowed_in_strict_mode); 84 …throw new DiagnosticError(name, getStrictModeEvalOrArgumentsDiagnosticCode(contextNode), file, arg… 128 …throw new DiagnosticError(node, DiagnosticCode.Identifier_expected_0_is_a_reserved_word_at_the_top… 136 …throw new DiagnosticError(node, getStrictModeIdentifierDiagnosticCode(node), file, jshelpers.decla… 150 … throw new DiagnosticError(param.name, DiagnosticCode.Duplicate_identifier_0, undefined, args); 159 …throw new DiagnosticError(param, DiagnosticCode.use_strict_directive_cannot_be_used_with_non_simpl… 167 …throw new DiagnosticError(node, DiagnosticCode.A_with_statements_are_not_allowed_in_strict_mode, f… [all …]
|
/arkcompiler/ets_frontend/es2panda/test/bytecode/js/destructuring/ |
D | test-array-pattern-iterator-close-expected.txt | 26 throw.ifnotobject v10 49 throw 56 throw.ifnotobject v10 79 throw 121 throw 124 throw.ifnotobject v14 161 throw 163 throw.ifnotobject v14 166 throw 169 throw
|
/arkcompiler/runtime_core/tests/cts-generator/cts-template/ |
D | throw.yaml | 35 - file-name: "throw" 37 title: Throw exception 38 description: Throw an exception located in register. 40 - sig: throw v:in:ref 51 - sig: throw v:in:ref 62 throw %s 71 - values: ['throw'] 81 - sig: throw v:in:ref 93 throw %s 104 - sig: throw v:in:ref [all …]
|
/arkcompiler/ets_frontend/ts2panda/src/function/ |
D | asyncGeneratorFunctionBuilder.ts | 32 THROW, enumerator 163 // b. Else if received.[[Type]] is throw, then 165 pg.loadAccumulatorInt(node, ResumeMode.THROW); 168 // i. Let throw be ? GetMethod(iterator, "throw") 169 iter.getMethod("throw"); 171 // ii. If throw is not undefined, then 175 …// 1. NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* … 182 // not have a throw method. 183 // 6. Throw a TypeError exception. 209 // 1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »). [all …]
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
D | builtins_weak_map.cpp | 35 // 1.If NewTarget is undefined, throw a TypeError exception in WeakMapConstructor() 38 // throw type error in WeakMapConstructor() 68 // If IsCallable(adder) is false, throw a TypeError exception in WeakMapConstructor() 82 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 83 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Delete() 104 // 2.If Type(S) is not Object, throw a TypeError exception. in Has() 105 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Has() 126 // 2.If Type(S) is not Object, throw a TypeError exception. in Get() 127 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Get() 149 // 2.If Type(S) is not Object, throw a TypeError exception. in Set() [all …]
|
D | builtins_dataview.cpp | 37 // 1. If NewTarget is undefined, throw a TypeError exception. in DataViewConstructor() 42 // 2. If Type(buffer) is not Object, throw a TypeError exception. in DataViewConstructor() 46 // 3. If buffer does not have an [[ArrayBufferData]] internal slot, throw a TypeError exception. in DataViewConstructor() 56 // 7. If numberOffset ≠ offset or offset < 0, throw a RangeError exception. in DataViewConstructor() 61 // 8. If IsDetachedBuffer(buffer) is true, throw a TypeError exception. in DataViewConstructor() 68 // 10. If offset > bufferByteLength, throw a RangeError exception. in DataViewConstructor() 83 // If offset+viewByteLength > bufferByteLength, throw a RangeError exception. in DataViewConstructor() 116 // 2. f Type(O) is not Object, throw a TypeError exception. in GetBuffer() 120 // 3. If O does not have a [[ViewedArrayBuffer]] internal slot, throw a TypeError exception. in GetBuffer() 140 // 2. If Type(O) is not Object, throw a TypeError exception. in GetByteLength() [all …]
|
D | builtins_map.cpp | 33 // 1.If NewTarget is undefined, throw a TypeError exception in MapConstructor() 36 // throw type error in MapConstructor() 75 // 2.If Type(S) is not Object, throw a TypeError exception. in Set() 76 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Set() 97 // 2.If Type(S) is not Object, throw a TypeError exception. in Clear() 98 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Clear() 113 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 114 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Delete() 131 // 2.If Type(S) is not Object, throw a TypeError exception. in Has() 132 // 3.If S does not have a [[MapData]] internal slot, throw a TypeError exception. in Has() [all …]
|
D | builtins_set.cpp | 35 // 1.If NewTarget is undefined, throw a TypeError exception in SetConstructor() 38 // throw type error in SetConstructor() 66 // If IsCallable(adder) is false, throw a TypeError exception in SetConstructor() 113 // 2.If Type(S) is not Object, throw a TypeError exception. in Add() 114 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Add() 134 // 2.If Type(S) is not Object, throw a TypeError exception. in Clear() 135 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Clear() 152 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 153 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Delete() 172 // 2.If Type(S) is not Object, throw a TypeError exception. in Has() [all …]
|
D | builtins_weak_set.cpp | 34 // 1.If NewTarget is undefined, throw a TypeError exception in WeakSetConstructor() 37 // throw type error in WeakSetConstructor() 65 // If IsCallable(adder) is false, throw a TypeError exception in WeakSetConstructor() 116 // 2.If Type(S) is not Object, throw a TypeError exception. in Add() 117 // 3.If S does not have a [[WeakSetData]] internal slot, throw a TypeError exception. in Add() 123 // 4.If CanBeHeldWeakly(value) is false, throw a TypeError exception. in Add() 141 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 142 // 3.If S does not have a [[WeakSetData]] internal slot, throw a TypeError exception. in Delete() 164 // 2.If Type(S) is not Object, throw a TypeError exception. in Has() 165 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Has()
|
D | builtins_reflect.cpp | 29 // 1. If IsCallable(target) is false, throw a TypeError exception. in ReflectApply() 59 // 1. If IsConstructor(target) is false, throw a TypeError exception. in ReflectConstruct() 67 // 3. Else if IsConstructor(newTarget) is false, throw a TypeError exception. in ReflectConstruct() 93 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectDefineProperty() 117 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectDeleteProperty() 136 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGet() 162 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGetOwnPropertyDescriptor() 188 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectGetPrototypeOf() 204 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectHas() 222 // 1. If Type(target) is not Object, throw a TypeError exception. in ReflectIsExtensible() [all …]
|
/arkcompiler/ets_frontend/es2panda/compiler/function/ |
D | functionBuilder.cpp | 156 // .throw(value) in HandleCompletion() 160 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in HandleCompletion() 210 // b. Else if received.[[Type]] is throw, then in YieldStar() 212 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar() 215 // i. Let throw be ? GetMethod(iterator, "throw"). in YieldStar() 216 iterator.GetMethod("throw"); in YieldStar() 218 // ii. If throw is not undefined, then in YieldStar() 222 …// 1. NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* … in YieldStar() 229 // not have a throw method. in YieldStar() 230 // 6. Throw a TypeError exception. in YieldStar() [all …]
|
/arkcompiler/ets_runtime/test/moduletest/asyncgenerator/ |
D | asyncgeneratoryieldstar.js | 27 throw new Error('it should not get Symbol.iterator'); 34 throw reason; 49 throw new Error('abrupt completion closes iter'); 56 throw new Error('Promise incorrectly fulfilled.');
|
/arkcompiler/ets_runtime/test/aottest/builtins_array/ |
D | expect_output.txt | 21 throw exception 23 throw exception 25 throw exception
|
/arkcompiler/ets_runtime/test/aottest/throw/ |
D | throw.ts | 18 throw "Throw Test"; 25 throw 123;
|
/arkcompiler/runtime_core/bytecode_optimizer/tests/js/ |
D | optimizeTryCatch.js | 24 throw "null"; 27 throw "max"; 29 throw "min";
|
/arkcompiler/ets_runtime/test/moduletest/regexpcallthrow/ |
D | regexpcallthrow.js | 18 * @tc.desc:test throw in regular expressions 27 throw new Test262Error(); 36 print("call exec is throw error")
|
/arkcompiler/ets_frontend/ts2panda/templates/ |
D | builtinsMap.ts.erb | 53 … throw new Error("Intrinsic getSubCode subcode(" + ins.mnemonic + ") ir = " + ins.toString()); 75 throw new Error("<%= i-2%> parameters must be Imm <" + ins.toString() + ">"); 80 throw new Error("<%= i-2%> parameters must be VReg <" + ins.toString() + ">"); 85 throw new Error("<%= i-2%> parameters must be string <" + ins.toString() + ">"); 90 throw new Error("<%= i-2%> parameters must be string <" + ins.toString() + ">"); 109 … throw new Error("Intrinsic can't found subcode(" + ins.mnemonic + ") ir = " + ins.toString());
|
/arkcompiler/ets_runtime/test/aottest/try_catch_finally/ |
D | try_catch_finally.ts | 44 throw "ex1"; 61 throw "ex1"; 90 throw "ex1"; 104 throw "ex1";
|