Home
last modified time | relevance | path

Searched full:throw (Results 1 – 25 of 369) sorted by relevance

12345678910>>...15

/arkcompiler/ets_frontend/es2panda/test/parser/js/
Dtest-throw-statement.js17 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/
DsyntaxChecker.ts130throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, jshelpers.getSourceFil…
259throw new DiagnosticError(decl.node, DiagnosticCode.Declaration_name_conflicts_with_built_in_globa…
268throw new DiagnosticError(decl.node, DiagnosticCode.Duplicate_identifier_0, sourceNode, [decl.name…
283throw new DiagnosticError(node, DiagnosticCode.Jump_target_cannot_cross_function_boundary, jshelpe…
305throw new DiagnosticError(node, DiagnosticCode.A_continue_statement_can_only_jump_to_a_label_of_an…
340 throw new DiagnosticError(node, diagnosticCode, jshelpers.getSourceFileOfNode(node));
347throw new DiagnosticError(node, DiagnosticCode.A_return_statement_can_only_be_used_within_a_functi…
358throw new DiagnosticError(node, DiagnosticCode._0_is_not_a_valid_meta_property_for_keyword_1_Did_y…
363throw new DiagnosticError(node, DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_fu…
366throw new DiagnosticError(node, DiagnosticCode.Meta_property_0_is_only_allowed_in_the_body_of_a_fu…
[all …]
DsyntaxCheckerForStrcitMode.ts38throw 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);
54throw 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);
84throw new DiagnosticError(name, getStrictModeEvalOrArgumentsDiagnosticCode(contextNode), file, arg…
128throw new DiagnosticError(node, DiagnosticCode.Identifier_expected_0_is_a_reserved_word_at_the_top…
136throw new DiagnosticError(node, getStrictModeIdentifierDiagnosticCode(node), file, jshelpers.decla…
150throw new DiagnosticError(param.name, DiagnosticCode.Duplicate_identifier_0, undefined, args);
159throw new DiagnosticError(param, DiagnosticCode.use_strict_directive_cannot_be_used_with_non_simpl…
167throw new DiagnosticError(node, DiagnosticCode.A_with_statements_are_not_allowed_in_strict_mode, f…
[all …]
/arkcompiler/runtime_core/tests/cts-generator/cts-template/
Dthrow.yaml35 - 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/
DasyncGeneratorFunctionBuilder.ts32 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 …]
DgeneratorFunctionBuilder.ts29 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/
Dbuiltins_dataview.cpp37 // 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 …]
Dbuiltins_weak_map.cpp35 // 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 …]
Dbuiltins_map.cpp33 // 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 …]
Dbuiltins_set.cpp35 // 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 …]
Dbuiltins_reflect.cpp29 // 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 …]
Dbuiltins_weak_set.cpp34 // 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()
Dbuiltins_symbol.cpp37 // 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 …]
Dbuiltins_sharedarraybuffer.cpp40 // 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/
DfunctionBuilder.cpp151 // .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/
Dasyncgeneratoryieldstar.js27 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.');
Dasyncgeneratorthrow.js33 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/
Dexpect_output.txt21 throw exception
23 throw exception
25 throw exception
Dbuiltins_array.ts32 print("throw exception");
39 print("throw exception");
46 print("throw exception");
/arkcompiler/ets_runtime/test/aottest/throw/
Dthrow.ts18 throw "Throw Test";
25 throw 123;
/arkcompiler/ets_runtime/test/aottest/try_catch_finally/
Dtry_catch_finally.ts41 throw "ex1";
58 throw "ex1";
87 throw "ex1";
101 throw "ex1";
/arkcompiler/ets_runtime/test/moduletest/regexpcallthrow/
Dregexpcallthrow.js18 * @tc.desc:test throw in regular expressions
27 throw new Test262Error();
36 print("call exec is throw error")
/arkcompiler/ets_frontend/ts2panda/templates/
DbuiltinsMap.ts.erb53throw 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() + ">");
109throw new Error("Intrinsic can't found subcode(" + ins.mnemonic + ") ir = " + ins.toString());
/arkcompiler/ets_runtime/ecmascript/
Djs_proxy.cpp30 // 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/
Dtest262harness.js24 return { type: 'throw', value: e };
28 throw new Test262Error('gc() not yet supported.');
38 throw new Test262Error('agent.* not yet supported.');

12345678910>>...15