|
@@ -76,7 +76,7 @@ static String get_function_name(Interpreter& interpreter, Value value)
|
|
|
|
|
|
Value ScopeNode::execute(Interpreter& interpreter, GlobalObject& global_object) const
|
|
|
{
|
|
|
- return interpreter.run(global_object, *this);
|
|
|
+ return interpreter.execute_statement(global_object, *this);
|
|
|
}
|
|
|
|
|
|
Value FunctionDeclaration::execute(Interpreter&, GlobalObject&) const
|
|
@@ -225,10 +225,10 @@ Value IfStatement::execute(Interpreter& interpreter, GlobalObject& global_object
|
|
|
return {};
|
|
|
|
|
|
if (predicate_result.to_boolean())
|
|
|
- return interpreter.run(global_object, *m_consequent);
|
|
|
+ return interpreter.execute_statement(global_object, *m_consequent);
|
|
|
|
|
|
if (m_alternate)
|
|
|
- return interpreter.run(global_object, *m_alternate);
|
|
|
+ return interpreter.execute_statement(global_object, *m_alternate);
|
|
|
|
|
|
return js_undefined();
|
|
|
}
|
|
@@ -239,7 +239,7 @@ Value WhileStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
|
|
|
while (m_test->execute(interpreter, global_object).to_boolean()) {
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
}
|
|
@@ -253,7 +253,7 @@ Value DoWhileStatement::execute(Interpreter& interpreter, GlobalObject& global_o
|
|
|
do {
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
} while (m_test->execute(interpreter, global_object).to_boolean());
|
|
@@ -293,7 +293,7 @@ Value ForStatement::execute(Interpreter& interpreter, GlobalObject& global_objec
|
|
|
return {};
|
|
|
if (!test_result.to_boolean())
|
|
|
break;
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
if (interpreter.should_unwind()) {
|
|
@@ -314,7 +314,7 @@ Value ForStatement::execute(Interpreter& interpreter, GlobalObject& global_objec
|
|
|
}
|
|
|
} else {
|
|
|
while (true) {
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
if (interpreter.should_unwind()) {
|
|
@@ -381,7 +381,7 @@ Value ForInStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
|
|
|
interpreter.set_variable(variable_name, property_name.value_and_attributes(object).value, global_object);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return {};
|
|
|
if (interpreter.should_unwind()) {
|
|
@@ -421,7 +421,7 @@ Value ForOfStatement::execute(Interpreter& interpreter, GlobalObject& global_obj
|
|
|
|
|
|
get_iterator_values(global_object, rhs_result, [&](Value value) {
|
|
|
interpreter.set_variable(variable_name, value, global_object);
|
|
|
- last_value = interpreter.run(global_object, *m_body);
|
|
|
+ last_value = interpreter.execute_statement(global_object, *m_body);
|
|
|
if (interpreter.exception())
|
|
|
return IterationDecision::Break;
|
|
|
if (interpreter.should_unwind()) {
|
|
@@ -1777,12 +1777,12 @@ void ThrowStatement::dump(int indent) const
|
|
|
|
|
|
Value TryStatement::execute(Interpreter& interpreter, GlobalObject& global_object) const
|
|
|
{
|
|
|
- interpreter.run(global_object, block(), {}, ScopeType::Try);
|
|
|
+ interpreter.execute_statement(global_object, m_block, {}, ScopeType::Try);
|
|
|
if (auto* exception = interpreter.exception()) {
|
|
|
if (m_handler) {
|
|
|
interpreter.clear_exception();
|
|
|
ArgumentVector arguments { { m_handler->parameter(), exception->value() } };
|
|
|
- interpreter.run(global_object, m_handler->body(), move(arguments));
|
|
|
+ interpreter.execute_statement(global_object, m_handler->body(), move(arguments));
|
|
|
}
|
|
|
}
|
|
|
|