| /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… 340 throw new DiagnosticError(node, diagnosticCode, jshelpers.getSourceFileOfNode(node)); 347 …throw new DiagnosticError(node, DiagnosticCode.A_return_statement_can_only_be_used_within_a_functi… 358 …throw new DiagnosticError(node, DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_y… 363 …throw new DiagnosticError(node, DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_fu… 366 …throw new DiagnosticError(node, DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_fu… [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/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 …]
|
| D | generatorFunctionBuilder.ts | 29 enum ResumeMode { Return = 0, Throw, Next }; enumerator 148 // call throw 150 pandaGen.loadObjProperty(expr, iterator.getObject(), "throw"); 153 // whether iterator.[[throw]] exists 158 // NOTE: If iterator does not have a throw method, this throw is 245 // .throw(value) 248 pandaGen.loadAccumulatorInt(node, ResumeMode.Throw); 254 pandaGen.throw(node);
|
| /arkcompiler/ets_runtime/ecmascript/builtins/ |
| 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_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() 125 // 2.If Type(S) is not Object, throw a TypeError exception. in Get() 126 // 3.If S does not have a [[WeakMapData]] internal slot, throw a TypeError exception. in Get() 146 // 2.If Type(S) is not Object, throw a TypeError exception. in Set() [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() 151 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 152 // 3.If S does not have a [[SetData]] internal slot, throw a TypeError exception. in Delete() 170 // 2.If Type(S) is not Object, throw a TypeError exception. in Has() [all …]
|
| 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 …]
|
| 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() 143 // 2.If Type(S) is not Object, throw a TypeError exception. in Delete() 144 // 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_symbol.cpp | 37 // 1.If NewTarget is not undefined, throw a TypeError exception. in SymbolConstructor() 74 // If s does not have a [[SymbolData]] internal slot, throw a TypeError exception. in ToString() 82 // If Type(s) is not Object, throw a TypeError exception. in ToString() 133 // If Type(s) is not Object, throw a TypeError exception. in ValueOf() 138 // If s does not have a [[SymbolData]] internal slot, throw a TypeError exception. in ValueOf() 140 // If s does not have a [[SymbolData]] internal slot, throw a TypeError exception. in ValueOf() 180 // 1.If Type(sym) is not Symbol, throw a TypeError exception. in KeyFor() 213 // 3.If Type(s) is not Object, throw a TypeError exception. in ToPrimitive() 219 // 4.If s does not have a [[SymbolData]] internal slot, throw a TypeError exception. in ToPrimitive() 222 // If s does not have a [[SymbolData]] internal slot, throw a TypeError exception. in ToPrimitive() [all …]
|
| D | builtins_sharedarraybuffer.cpp | 40 // 1. If NewTarget is undefined, throw a TypeError exception. in SharedArrayBufferConstructor() 142 // 2. If Type(O) is not Object, throw a TypeError exception. in GetByteLength() 146 // 3. If O does not have an [[ArrayBufferData]] internal slot, throw a TypeError exception. in GetByteLength() 168 // 2. If Type(O) is not Object, throw a TypeError exception. in Slice() 173 // 3. If O does not have an [[ArrayBufferData]] internal slot, throw a TypeError exception. in Slice() 177 // 4. If IsSharedArrayBuffer(O) is false, throw a TypeError exception. in Slice() 228 // 17. If new does not have an [[ArrayBufferData]] internal slot, throw a TypeError exception. in Slice() 232 // 18. If IsSharedArrayBuffer(new) is false, throw a TypeError exception. in Slice() 236 // 19. If SameValue(new, O) is true, throw a TypeError exception. in Slice() 241 …// 20. If the value of new’s [[ArrayBufferByteLength]] internal slot < newLen, throw a TypeError e… in Slice()
|
| /arkcompiler/ets_frontend/es2panda/compiler/function/ |
| D | functionBuilder.cpp | 151 // .throw(value) in HandleCompletion() 155 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in HandleCompletion() 205 // b. Else if received.[[Type]] is throw, then in YieldStar() 207 pg_->LoadAccumulatorInt(node, static_cast<int32_t>(ResumeMode::THROW)); in YieldStar() 210 // i. Let throw be ? GetMethod(iterator, "throw"). in YieldStar() 211 iterator.GetMethod("throw"); in YieldStar() 213 // ii. If throw is not undefined, then in YieldStar() 217 …// 1. NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* … in YieldStar() 224 // not have a throw method. in YieldStar() 225 // 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.');
|
| D | asyncgeneratorthrow.js | 33 print("asyncgenerator throw start"); 35 it.throw(new Error('async generator wrong')) // async generator wrong 37 print("asyncgenerator throw end");
|
| /arkcompiler/ets_runtime/test/aottest/builtins_array/ |
| D | expect_output.txt | 21 throw exception 23 throw exception 25 throw exception
|
| D | builtins_array.ts | 32 print("throw exception"); 39 print("throw exception"); 46 print("throw exception");
|
| /arkcompiler/ets_runtime/test/aottest/throw/ |
| D | throw.ts | 18 throw "Throw Test"; 25 throw 123;
|
| /arkcompiler/ets_runtime/test/aottest/try_catch_finally/ |
| D | try_catch_finally.ts | 41 throw "ex1"; 58 throw "ex1"; 87 throw "ex1"; 101 throw "ex1";
|
| /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/ecmascript/ |
| D | js_proxy.cpp | 30 // 1. If Type(target) is not Object, throw a TypeError exception. in ProxyCreate() 36 // 2. If Type(handler) is not Object, throw a TypeError exception. in ProxyCreate() 55 // 2. If handler is null, throw a TypeError exception. in GetPrototype() 82 // 10. If Type(handlerProto) is neither Object nor Null, throw a TypeError exception. in GetPrototype() 99 // 16. If SameValue(handlerProto, targetProto) is false, throw a TypeError exception. in GetPrototype() 116 // 3. If handler is null, throw a TypeError exception. in SetPrototype() 162 …// 16. If booleanTrapResult is true and SameValue(V, targetProto) is false, throw a TypeError exce… in SetPrototype() 176 // 2. If handler is null, throw a TypeError exception. in IsExtensible() 209 // 12. If SameValue(booleanTrapResult, targetResult) is false, throw a TypeError exception. in IsExtensible() 223 // 2. If handler is null, throw a TypeError exception. in PreventExtensions() [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/ |
| D | test262harness.js | 24 return { type: 'throw', value: e }; 28 throw new Test262Error('gc() not yet supported.'); 38 throw new Test262Error('agent.* not yet supported.');
|