@@ -76,7 +76,7 @@ static String get_function_name(Interpreter& interpreter, Value value)
76
76
77
77
Value ScopeNode::execute (Interpreter& interpreter, GlobalObject& global_object) const
78
78
{
79
- return interpreter.run (global_object, *this );
79
+ return interpreter.execute_statement (global_object, *this );
80
80
}
81
81
82
82
Value FunctionDeclaration::execute (Interpreter&, GlobalObject&) const
@@ -225,10 +225,10 @@ Value IfStatement::execute(Interpreter& interpreter, GlobalObject& global_object
225
225
return {};
226
226
227
227
if (predicate_result.to_boolean ())
228
- return interpreter.run (global_object, *m_consequent);
228
+ return interpreter.execute_statement (global_object, *m_consequent);
229
229
230
230
if (m_alternate)
231
- return interpreter.run (global_object, *m_alternate);
231
+ return interpreter.execute_statement (global_object, *m_alternate);
232
232
233
233
return js_undefined ();
234
234
}
@@ -239,7 +239,7 @@ Value WhileStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
239
239
while (m_test->execute (interpreter, global_object).to_boolean ()) {
240
240
if (interpreter.exception ())
241
241
return {};
242
- last_value = interpreter.run (global_object, *m_body);
242
+ last_value = interpreter.execute_statement (global_object, *m_body);
243
243
if (interpreter.exception ())
244
244
return {};
245
245
}
@@ -253,7 +253,7 @@ Value DoWhileStatement::execute(Interpreter& interpreter, GlobalObject& global_o
253
253
do {
254
254
if (interpreter.exception ())
255
255
return {};
256
- last_value = interpreter.run (global_object, *m_body);
256
+ last_value = interpreter.execute_statement (global_object, *m_body);
257
257
if (interpreter.exception ())
258
258
return {};
259
259
} while (m_test->execute (interpreter, global_object).to_boolean ());
@@ -293,7 +293,7 @@ Value ForStatement::execute(Interpreter& interpreter, GlobalObject& global_objec
293
293
return {};
294
294
if (!test_result.to_boolean ())
295
295
break ;
296
- last_value = interpreter.run (global_object, *m_body);
296
+ last_value = interpreter.execute_statement (global_object, *m_body);
297
297
if (interpreter.exception ())
298
298
return {};
299
299
if (interpreter.should_unwind ()) {
@@ -314,7 +314,7 @@ Value ForStatement::execute(Interpreter& interpreter, GlobalObject& global_objec
314
314
}
315
315
} else {
316
316
while (true ) {
317
- last_value = interpreter.run (global_object, *m_body);
317
+ last_value = interpreter.execute_statement (global_object, *m_body);
318
318
if (interpreter.exception ())
319
319
return {};
320
320
if (interpreter.should_unwind ()) {
@@ -381,7 +381,7 @@ Value ForInStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
381
381
interpreter.set_variable (variable_name, property_name.value_and_attributes (object).value , global_object);
382
382
if (interpreter.exception ())
383
383
return {};
384
- last_value = interpreter.run (global_object, *m_body);
384
+ last_value = interpreter.execute_statement (global_object, *m_body);
385
385
if (interpreter.exception ())
386
386
return {};
387
387
if (interpreter.should_unwind ()) {
@@ -421,7 +421,7 @@ Value ForOfStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
421
421
422
422
get_iterator_values (global_object, rhs_result, [&](Value value) {
423
423
interpreter.set_variable (variable_name, value, global_object);
424
- last_value = interpreter.run (global_object, *m_body);
424
+ last_value = interpreter.execute_statement (global_object, *m_body);
425
425
if (interpreter.exception ())
426
426
return IterationDecision::Break;
427
427
if (interpreter.should_unwind ()) {
@@ -1777,12 +1777,12 @@ void ThrowStatement::dump(int indent) const
1777
1777
1778
1778
Value TryStatement::execute (Interpreter& interpreter, GlobalObject& global_object) const
1779
1779
{
1780
- interpreter.run (global_object, block () , {}, ScopeType::Try);
1780
+ interpreter.execute_statement (global_object, m_block , {}, ScopeType::Try);
1781
1781
if (auto * exception = interpreter.exception ()) {
1782
1782
if (m_handler) {
1783
1783
interpreter.clear_exception ();
1784
1784
ArgumentVector arguments { { m_handler->parameter (), exception->value () } };
1785
- interpreter.run (global_object, m_handler->body (), move (arguments));
1785
+ interpreter.execute_statement (global_object, m_handler->body (), move (arguments));
1786
1786
}
1787
1787
}
1788
1788
0 commit comments