Index: src/interpreter/interpreter-generator.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter-generator.cc |
similarity index 81% |
copy from src/interpreter/interpreter.cc |
copy to src/interpreter/interpreter-generator.cc |
index 6af06fddbb74311de367d9aaca53e09592a8e0c6..62d62270311d4ebab3b8104fba9db3ed0b832d2c 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter-generator.cc |
@@ -1,32 +1,24 @@ |
-// Copyright 2015 the V8 project authors. All rights reserved. |
+// Copyright 2017 the V8 project authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "src/interpreter/interpreter.h" |
+#include "src/interpreter/interpreter-generator.h" |
#include <array> |
-#include <fstream> |
-#include <memory> |
+#include <tuple> |
-#include "src/ast/prettyprinter.h" |
#include "src/builtins/builtins-arguments.h" |
#include "src/builtins/builtins-constructor.h" |
#include "src/builtins/builtins-forin.h" |
+#include "src/code-events.h" |
#include "src/code-factory.h" |
-#include "src/compilation-info.h" |
-#include "src/compiler.h" |
-#include "src/counters.h" |
-#include "src/debug/debug.h" |
#include "src/factory.h" |
#include "src/ic/accessor-assembler.h" |
#include "src/interpreter/bytecode-flags.h" |
-#include "src/interpreter/bytecode-generator.h" |
#include "src/interpreter/bytecodes.h" |
#include "src/interpreter/interpreter-assembler.h" |
#include "src/interpreter/interpreter-intrinsics.h" |
-#include "src/log.h" |
#include "src/objects-inl.h" |
-#include "src/zone/zone.h" |
namespace v8 { |
namespace internal { |
@@ -36,300 +28,133 @@ using compiler::Node; |
typedef CodeStubAssembler::Label Label; |
typedef CodeStubAssembler::Variable Variable; |
-#define __ assembler-> |
- |
-class InterpreterCompilationJob final : public CompilationJob { |
+class InterpreterGenerator { |
public: |
- explicit InterpreterCompilationJob(CompilationInfo* info); |
+ explicit InterpreterGenerator(Isolate* isolate) : isolate_(isolate) {} |
- protected: |
- Status PrepareJobImpl() final; |
- Status ExecuteJobImpl() final; |
- Status FinalizeJobImpl() final; |
+// Bytecode handler generator functions. |
+#define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
+ void Do##Name(InterpreterAssembler* assembler); |
+ BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) |
+#undef DECLARE_BYTECODE_HANDLER_GENERATOR |
private: |
- class TimerScope final { |
- public: |
- TimerScope(RuntimeCallStats* stats, RuntimeCallStats::CounterId counter_id) |
- : stats_(stats) { |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
- RuntimeCallStats::Enter(stats_, &timer_, counter_id); |
- } |
- } |
- |
- explicit TimerScope(RuntimeCallCounter* counter) : stats_(nullptr) { |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
- timer_.Start(counter, nullptr); |
- } |
- } |
- |
- ~TimerScope() { |
- if (V8_UNLIKELY(FLAG_runtime_stats)) { |
- if (stats_) { |
- RuntimeCallStats::Leave(stats_, &timer_); |
- } else { |
- timer_.Stop(); |
- } |
- } |
- } |
- |
- private: |
- RuntimeCallStats* stats_; |
- RuntimeCallTimer timer_; |
- }; |
- |
- BytecodeGenerator* generator() { return &generator_; } |
- |
- BytecodeGenerator generator_; |
- RuntimeCallStats* runtime_call_stats_; |
- RuntimeCallCounter background_execute_counter_; |
- bool print_bytecode_; |
- |
- DISALLOW_COPY_AND_ASSIGN(InterpreterCompilationJob); |
+ // Generates code to perform the binary operation via |Generator|. |
+ template <class Generator> |
+ void DoBinaryOpWithFeedback(InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the comparison via |Generator| while gathering |
+ // type feedback. |
+ void DoCompareOpWithFeedback(Token::Value compare_op, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the bitwise binary operation corresponding to |
+ // |bitwise_op| while gathering type feedback. |
+ void DoBitwiseBinaryOp(Token::Value bitwise_op, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the binary operation via |Generator| using |
+ // an immediate value rather the accumulator as the rhs operand. |
+ template <class Generator> |
+ void DoBinaryOpWithImmediate(InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the unary operation via |Generator| while |
+ // gatering type feedback. |
+ template <class Generator> |
+ void DoUnaryOpWithFeedback(InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the comparison operation associated with |
+ // |compare_op|. |
+ void DoCompareOp(Token::Value compare_op, InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a global store via |ic|. |
+ void DoStaGlobal(Callable ic, InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a named property store via |ic|. |
+ void DoStoreIC(Callable ic, InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a keyed property store via |ic|. |
+ void DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a JS call that collects type feedback. |
+ void DoJSCall(InterpreterAssembler* assembler, TailCallMode tail_call_mode); |
+ |
+ // Generates code to perform a JS call with a known number of arguments that |
+ // collects type feedback. |
+ void DoJSCallN(InterpreterAssembler* assembler, int n); |
+ |
+ // Generates code to perform delete via function_id. |
+ void DoDelete(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a lookup slot load via |function_id|. |
+ void DoLdaLookupSlot(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a lookup slot load via |function_id| that can |
+ // fast path to a context slot load. |
+ void DoLdaLookupContextSlot(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a lookup slot load via |function_id| that can |
+ // fast path to a global load. |
+ void DoLdaLookupGlobalSlot(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform a lookup slot store depending on |
+ // |language_mode|. |
+ void DoStaLookupSlot(LanguageMode language_mode, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to load a global property. |
+ void BuildLoadGlobalIC(int slot_operand_index, int name_operand_index, |
+ TypeofMode typeof_mode, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to load a property. |
+ void BuildLoadIC(int recv_operand_index, int slot_operand_index, |
+ int name_operand_index, InterpreterAssembler* assembler); |
+ |
+ // Generates code to prepare the result for ForInPrepare. Cache data |
+ // are placed into the consecutive series of registers starting at |
+ // |output_register|. |
+ void BuildForInPrepareResult(Node* output_register, Node* cache_type, |
+ Node* cache_array, Node* cache_length, |
+ InterpreterAssembler* assembler); |
+ |
+ // Generates code to perform the unary operation via |callable|. |
+ Node* BuildUnaryOp(Callable callable, InterpreterAssembler* assembler); |
+ |
+ Isolate* isolate_; |
}; |
-Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { |
- memset(dispatch_table_, 0, sizeof(dispatch_table_)); |
-} |
- |
-void Interpreter::Initialize() { |
- if (!ShouldInitializeDispatchTable()) return; |
- Zone zone(isolate_->allocator(), ZONE_NAME); |
- HandleScope scope(isolate_); |
- |
- if (FLAG_trace_ignition_dispatches) { |
- static const int kBytecodeCount = static_cast<int>(Bytecode::kLast) + 1; |
- bytecode_dispatch_counters_table_.reset( |
- new uintptr_t[kBytecodeCount * kBytecodeCount]); |
- memset(bytecode_dispatch_counters_table_.get(), 0, |
- sizeof(uintptr_t) * kBytecodeCount * kBytecodeCount); |
- } |
- |
- // Generate bytecode handlers for all bytecodes and scales. |
- const OperandScale kOperandScales[] = { |
-#define VALUE(Name, _) OperandScale::k##Name, |
- OPERAND_SCALE_LIST(VALUE) |
-#undef VALUE |
- }; |
- |
- for (OperandScale operand_scale : kOperandScales) { |
-#define GENERATE_CODE(Name, ...) \ |
- InstallBytecodeHandler(&zone, Bytecode::k##Name, operand_scale, \ |
- &Interpreter::Do##Name); |
- BYTECODE_LIST(GENERATE_CODE) |
-#undef GENERATE_CODE |
- } |
- |
- // Fill unused entries will the illegal bytecode handler. |
- size_t illegal_index = |
- GetDispatchTableIndex(Bytecode::kIllegal, OperandScale::kSingle); |
- for (size_t index = 0; index < arraysize(dispatch_table_); ++index) { |
- if (dispatch_table_[index] == nullptr) { |
- dispatch_table_[index] = dispatch_table_[illegal_index]; |
- } |
- } |
- |
- // Initialization should have been successful. |
- DCHECK(IsDispatchTableInitialized()); |
-} |
- |
-bool Interpreter::ReuseExistingHandler(Bytecode bytecode, |
- OperandScale operand_scale) { |
- size_t index = GetDispatchTableIndex(bytecode, operand_scale); |
- switch (bytecode) { |
- case Bytecode::kCallProperty: |
- case Bytecode::kCallProperty0: |
- case Bytecode::kCallProperty1: |
- case Bytecode::kCallProperty2: { |
- const int offset = static_cast<int>(Bytecode::kCallProperty) - |
- static_cast<int>(Bytecode::kCall); |
- STATIC_ASSERT(offset == |
- static_cast<int>(Bytecode::kCallProperty0) - |
- static_cast<int>(Bytecode::kCall0)); |
- STATIC_ASSERT(offset == |
- static_cast<int>(Bytecode::kCallProperty1) - |
- static_cast<int>(Bytecode::kCall1)); |
- STATIC_ASSERT(offset == |
- static_cast<int>(Bytecode::kCallProperty2) - |
- static_cast<int>(Bytecode::kCall2)); |
- CHECK_LT(offset, index); |
- dispatch_table_[index] = dispatch_table_[index - offset]; |
- return true; |
- break; |
- } |
- default: |
- return false; |
- } |
-} |
- |
-void Interpreter::InstallBytecodeHandler(Zone* zone, Bytecode bytecode, |
- OperandScale operand_scale, |
- BytecodeGeneratorFunc generator) { |
- if (!Bytecodes::BytecodeHasHandler(bytecode, operand_scale)) return; |
- if (ReuseExistingHandler(bytecode, operand_scale)) return; |
- |
- size_t index = GetDispatchTableIndex(bytecode, operand_scale); |
- InterpreterDispatchDescriptor descriptor(isolate_); |
+Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode, |
+ OperandScale operand_scale) { |
+ Zone zone(isolate->allocator(), ZONE_NAME); |
+ InterpreterDispatchDescriptor descriptor(isolate); |
compiler::CodeAssemblerState state( |
- isolate_, zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER), |
+ isolate, &zone, descriptor, Code::ComputeFlags(Code::BYTECODE_HANDLER), |
Bytecodes::ToString(bytecode), Bytecodes::ReturnCount(bytecode)); |
InterpreterAssembler assembler(&state, bytecode, operand_scale); |
if (Bytecodes::MakesCallAlongCriticalPath(bytecode)) { |
assembler.SaveBytecodeOffset(); |
} |
- (this->*generator)(&assembler); |
- Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); |
- dispatch_table_[index] = code->entry(); |
- TraceCodegen(code); |
- PROFILE(isolate_, CodeCreateEvent( |
- CodeEventListener::BYTECODE_HANDLER_TAG, |
- AbstractCode::cast(*code), |
- Bytecodes::ToString(bytecode, operand_scale).c_str())); |
-} |
- |
-Code* Interpreter::GetBytecodeHandler(Bytecode bytecode, |
- OperandScale operand_scale) { |
- DCHECK(IsDispatchTableInitialized()); |
- DCHECK(Bytecodes::BytecodeHasHandler(bytecode, operand_scale)); |
- size_t index = GetDispatchTableIndex(bytecode, operand_scale); |
- Address code_entry = dispatch_table_[index]; |
- return Code::GetCodeFromTargetAddress(code_entry); |
-} |
- |
-// static |
-size_t Interpreter::GetDispatchTableIndex(Bytecode bytecode, |
- OperandScale operand_scale) { |
- static const size_t kEntriesPerOperandScale = 1u << kBitsPerByte; |
- size_t index = static_cast<size_t>(bytecode); |
- switch (operand_scale) { |
- case OperandScale::kSingle: |
- return index; |
- case OperandScale::kDouble: |
- return index + kEntriesPerOperandScale; |
- case OperandScale::kQuadruple: |
- return index + 2 * kEntriesPerOperandScale; |
- } |
- UNREACHABLE(); |
- return 0; |
-} |
- |
-void Interpreter::IterateDispatchTable(ObjectVisitor* v) { |
- for (int i = 0; i < kDispatchTableSize; i++) { |
- Address code_entry = dispatch_table_[i]; |
- Object* code = code_entry == nullptr |
- ? nullptr |
- : Code::GetCodeFromTargetAddress(code_entry); |
- Object* old_code = code; |
- v->VisitPointer(&code); |
- if (code != old_code) { |
- dispatch_table_[i] = reinterpret_cast<Code*>(code)->entry(); |
- } |
- } |
-} |
- |
-// static |
-int Interpreter::InterruptBudget() { |
- return FLAG_interrupt_budget * kCodeSizeMultiplier; |
-} |
- |
-namespace { |
- |
-bool ShouldPrintBytecode(Handle<SharedFunctionInfo> shared) { |
- if (!FLAG_print_bytecode) return false; |
- |
- // Checks whether function passed the filter. |
- if (shared->is_toplevel()) { |
- Vector<const char> filter = CStrVector(FLAG_print_bytecode_filter); |
- return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*'); |
- } else { |
- return shared->PassesFilter(FLAG_print_bytecode_filter); |
- } |
-} |
- |
-} // namespace |
- |
-InterpreterCompilationJob::InterpreterCompilationJob(CompilationInfo* info) |
- : CompilationJob(info->isolate(), info, "Ignition"), |
- generator_(info), |
- runtime_call_stats_(info->isolate()->counters()->runtime_call_stats()), |
- background_execute_counter_("CompileBackgroundIgnition"), |
- print_bytecode_(ShouldPrintBytecode(info->shared_info())) {} |
- |
-InterpreterCompilationJob::Status InterpreterCompilationJob::PrepareJobImpl() { |
- CodeGenerator::MakeCodePrologue(info(), "interpreter"); |
- |
- if (print_bytecode_) { |
- OFStream os(stdout); |
- std::unique_ptr<char[]> name = info()->GetDebugName(); |
- os << "[generating bytecode for function: " << info()->GetDebugName().get() |
- << "]" << std::endl |
- << std::flush; |
- } |
- |
- return SUCCEEDED; |
-} |
- |
-InterpreterCompilationJob::Status InterpreterCompilationJob::ExecuteJobImpl() { |
- TimerScope runtimeTimer = |
- executed_on_background_thread() |
- ? TimerScope(&background_execute_counter_) |
- : TimerScope(runtime_call_stats_, &RuntimeCallStats::CompileIgnition); |
- // TODO(lpy): add support for background compilation RCS trace. |
- TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileIgnition"); |
- |
- generator()->GenerateBytecode(stack_limit()); |
- |
- if (generator()->HasStackOverflow()) { |
- return FAILED; |
- } |
- return SUCCEEDED; |
-} |
- |
-InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() { |
- // Add background runtime call stats. |
- if (V8_UNLIKELY(FLAG_runtime_stats && executed_on_background_thread())) { |
- runtime_call_stats_->CompileBackgroundIgnition.Add( |
- &background_execute_counter_); |
- } |
- |
- RuntimeCallTimerScope runtimeTimer( |
- runtime_call_stats_, &RuntimeCallStats::CompileIgnitionFinalization); |
- |
- Handle<BytecodeArray> bytecodes = generator()->FinalizeBytecode(isolate()); |
- if (generator()->HasStackOverflow()) { |
- return FAILED; |
- } |
- |
- if (print_bytecode_) { |
- OFStream os(stdout); |
- bytecodes->Print(os); |
- os << std::flush; |
- } |
- |
- info()->SetBytecodeArray(bytecodes); |
- info()->SetCode(info()->isolate()->builtins()->InterpreterEntryTrampoline()); |
- return SUCCEEDED; |
-} |
- |
-CompilationJob* Interpreter::NewCompilationJob(CompilationInfo* info) { |
- return new InterpreterCompilationJob(info); |
-} |
+ InterpreterGenerator generator(isolate); |
-bool Interpreter::IsDispatchTableInitialized() { |
- return dispatch_table_[0] != nullptr; |
-} |
- |
-bool Interpreter::ShouldInitializeDispatchTable() { |
- if (FLAG_trace_ignition || FLAG_trace_ignition_codegen || |
- FLAG_trace_ignition_dispatches) { |
- // Regenerate table to add bytecode tracing operations, print the assembly |
- // code generated by TurboFan or instrument handlers with dispatch counters. |
- return true; |
+ switch (bytecode) { |
+#define CALL_GENERATOR(Name, ...) \ |
+ case Bytecode::k##Name: \ |
+ generator.Do##Name(&assembler); \ |
+ break; |
+ BYTECODE_LIST(CALL_GENERATOR); |
+#undef CALL_GENERATOR |
} |
- return !IsDispatchTableInitialized(); |
-} |
-void Interpreter::TraceCodegen(Handle<Code> code) { |
+ Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); |
+ PROFILE(isolate, CodeCreateEvent( |
+ CodeEventListener::BYTECODE_HANDLER_TAG, |
+ AbstractCode::cast(*code), |
+ Bytecodes::ToString(bytecode, operand_scale).c_str())); |
#ifdef ENABLE_DISASSEMBLER |
if (FLAG_trace_ignition_codegen) { |
OFStream os(stdout); |
@@ -337,84 +162,15 @@ void Interpreter::TraceCodegen(Handle<Code> code) { |
os << std::flush; |
} |
#endif // ENABLE_DISASSEMBLER |
+ return code; |
} |
-const char* Interpreter::LookupNameOfBytecodeHandler(Code* code) { |
-#ifdef ENABLE_DISASSEMBLER |
-#define RETURN_NAME(Name, ...) \ |
- if (dispatch_table_[Bytecodes::ToByte(Bytecode::k##Name)] == \ |
- code->entry()) { \ |
- return #Name; \ |
- } |
- BYTECODE_LIST(RETURN_NAME) |
-#undef RETURN_NAME |
-#endif // ENABLE_DISASSEMBLER |
- return nullptr; |
-} |
- |
-uintptr_t Interpreter::GetDispatchCounter(Bytecode from, Bytecode to) const { |
- int from_index = Bytecodes::ToByte(from); |
- int to_index = Bytecodes::ToByte(to); |
- return bytecode_dispatch_counters_table_[from_index * kNumberOfBytecodes + |
- to_index]; |
-} |
- |
-Local<v8::Object> Interpreter::GetDispatchCountersObject() { |
- v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(isolate_); |
- Local<v8::Context> context = isolate->GetCurrentContext(); |
- |
- Local<v8::Object> counters_map = v8::Object::New(isolate); |
- |
- // Output is a JSON-encoded object of objects. |
- // |
- // The keys on the top level object are source bytecodes, |
- // and corresponding value are objects. Keys on these last are the |
- // destinations of the dispatch and the value associated is a counter for |
- // the correspondent source-destination dispatch chain. |
- // |
- // Only non-zero counters are written to file, but an entry in the top-level |
- // object is always present, even if the value is empty because all counters |
- // for that source are zero. |
- |
- for (int from_index = 0; from_index < kNumberOfBytecodes; ++from_index) { |
- Bytecode from_bytecode = Bytecodes::FromByte(from_index); |
- Local<v8::Object> counters_row = v8::Object::New(isolate); |
- |
- for (int to_index = 0; to_index < kNumberOfBytecodes; ++to_index) { |
- Bytecode to_bytecode = Bytecodes::FromByte(to_index); |
- uintptr_t counter = GetDispatchCounter(from_bytecode, to_bytecode); |
- |
- if (counter > 0) { |
- std::string to_name = Bytecodes::ToString(to_bytecode); |
- Local<v8::String> to_name_object = |
- v8::String::NewFromUtf8(isolate, to_name.c_str(), |
- NewStringType::kNormal) |
- .ToLocalChecked(); |
- Local<v8::Number> counter_object = v8::Number::New(isolate, counter); |
- CHECK(counters_row |
- ->DefineOwnProperty(context, to_name_object, counter_object) |
- .IsJust()); |
- } |
- } |
- |
- std::string from_name = Bytecodes::ToString(from_bytecode); |
- Local<v8::String> from_name_object = |
- v8::String::NewFromUtf8(isolate, from_name.c_str(), |
- NewStringType::kNormal) |
- .ToLocalChecked(); |
- |
- CHECK( |
- counters_map->DefineOwnProperty(context, from_name_object, counters_row) |
- .IsJust()); |
- } |
- |
- return counters_map; |
-} |
+#define __ assembler-> |
// LdaZero |
// |
// Load literal '0' into the accumulator. |
-void Interpreter::DoLdaZero(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaZero(InterpreterAssembler* assembler) { |
Node* zero_value = __ NumberConstant(0.0); |
__ SetAccumulator(zero_value); |
__ Dispatch(); |
@@ -423,7 +179,7 @@ void Interpreter::DoLdaZero(InterpreterAssembler* assembler) { |
// LdaSmi <imm> |
// |
// Load an integer literal into the accumulator as a Smi. |
-void Interpreter::DoLdaSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaSmi(InterpreterAssembler* assembler) { |
Node* smi_int = __ BytecodeOperandImmSmi(0); |
__ SetAccumulator(smi_int); |
__ Dispatch(); |
@@ -432,7 +188,7 @@ void Interpreter::DoLdaSmi(InterpreterAssembler* assembler) { |
// LdaConstant <idx> |
// |
// Load constant literal at |idx| in the constant pool into the accumulator. |
-void Interpreter::DoLdaConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaConstant(InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* constant = __ LoadConstantPoolEntry(index); |
__ SetAccumulator(constant); |
@@ -442,7 +198,7 @@ void Interpreter::DoLdaConstant(InterpreterAssembler* assembler) { |
// LdaUndefined |
// |
// Load Undefined into the accumulator. |
-void Interpreter::DoLdaUndefined(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaUndefined(InterpreterAssembler* assembler) { |
Node* undefined_value = |
__ HeapConstant(isolate_->factory()->undefined_value()); |
__ SetAccumulator(undefined_value); |
@@ -452,7 +208,7 @@ void Interpreter::DoLdaUndefined(InterpreterAssembler* assembler) { |
// LdaNull |
// |
// Load Null into the accumulator. |
-void Interpreter::DoLdaNull(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaNull(InterpreterAssembler* assembler) { |
Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
__ SetAccumulator(null_value); |
__ Dispatch(); |
@@ -461,7 +217,7 @@ void Interpreter::DoLdaNull(InterpreterAssembler* assembler) { |
// LdaTheHole |
// |
// Load TheHole into the accumulator. |
-void Interpreter::DoLdaTheHole(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaTheHole(InterpreterAssembler* assembler) { |
Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
__ SetAccumulator(the_hole_value); |
__ Dispatch(); |
@@ -470,7 +226,7 @@ void Interpreter::DoLdaTheHole(InterpreterAssembler* assembler) { |
// LdaTrue |
// |
// Load True into the accumulator. |
-void Interpreter::DoLdaTrue(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaTrue(InterpreterAssembler* assembler) { |
Node* true_value = __ HeapConstant(isolate_->factory()->true_value()); |
__ SetAccumulator(true_value); |
__ Dispatch(); |
@@ -479,7 +235,7 @@ void Interpreter::DoLdaTrue(InterpreterAssembler* assembler) { |
// LdaFalse |
// |
// Load False into the accumulator. |
-void Interpreter::DoLdaFalse(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaFalse(InterpreterAssembler* assembler) { |
Node* false_value = __ HeapConstant(isolate_->factory()->false_value()); |
__ SetAccumulator(false_value); |
__ Dispatch(); |
@@ -488,7 +244,7 @@ void Interpreter::DoLdaFalse(InterpreterAssembler* assembler) { |
// Ldar <src> |
// |
// Load accumulator with value from register <src>. |
-void Interpreter::DoLdar(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdar(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* value = __ LoadRegister(reg_index); |
__ SetAccumulator(value); |
@@ -498,7 +254,7 @@ void Interpreter::DoLdar(InterpreterAssembler* assembler) { |
// Star <dst> |
// |
// Store accumulator to register <dst>. |
-void Interpreter::DoStar(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStar(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* accumulator = __ GetAccumulator(); |
__ StoreRegister(accumulator, reg_index); |
@@ -508,7 +264,7 @@ void Interpreter::DoStar(InterpreterAssembler* assembler) { |
// Mov <src> <dst> |
// |
// Stores the value of register <src> to register <dst>. |
-void Interpreter::DoMov(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoMov(InterpreterAssembler* assembler) { |
Node* src_index = __ BytecodeOperandReg(0); |
Node* src_value = __ LoadRegister(src_index); |
Node* dst_index = __ BytecodeOperandReg(1); |
@@ -516,10 +272,10 @@ void Interpreter::DoMov(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::BuildLoadGlobalIC(int slot_operand_index, |
- int name_operand_index, |
- TypeofMode typeof_mode, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::BuildLoadGlobalIC(int slot_operand_index, |
+ int name_operand_index, |
+ TypeofMode typeof_mode, |
+ InterpreterAssembler* assembler) { |
// Must be kept in sync with AccessorAssembler::LoadGlobalIC. |
// Load the global via the LoadGlobalIC. |
@@ -589,7 +345,7 @@ void Interpreter::BuildLoadGlobalIC(int slot_operand_index, |
// |
// Load the global with name in constant pool entry <name_index> into the |
// accumulator using FeedBackVector slot <slot> outside of a typeof. |
-void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaGlobal(InterpreterAssembler* assembler) { |
static const int kNameOperandIndex = 0; |
static const int kSlotOperandIndex = 1; |
@@ -601,7 +357,8 @@ void Interpreter::DoLdaGlobal(InterpreterAssembler* assembler) { |
// |
// Load the global with name in constant pool entry <name_index> into the |
// accumulator using FeedBackVector slot <slot> inside of a typeof. |
-void Interpreter::DoLdaGlobalInsideTypeof(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaGlobalInsideTypeof( |
+ InterpreterAssembler* assembler) { |
static const int kNameOperandIndex = 0; |
static const int kSlotOperandIndex = 1; |
@@ -609,7 +366,8 @@ void Interpreter::DoLdaGlobalInsideTypeof(InterpreterAssembler* assembler) { |
assembler); |
} |
-void Interpreter::DoStaGlobal(Callable ic, InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaGlobal(Callable ic, |
+ InterpreterAssembler* assembler) { |
// Get the global object. |
Node* context = __ GetContext(); |
Node* native_context = __ LoadNativeContext(context); |
@@ -633,7 +391,7 @@ void Interpreter::DoStaGlobal(Callable ic, InterpreterAssembler* assembler) { |
// |
// Store the value in the accumulator into the global with name in constant pool |
// entry <name_index> using FeedBackVector slot <slot> in sloppy mode. |
-void Interpreter::DoStaGlobalSloppy(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaGlobalSloppy(InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); |
DoStaGlobal(ic, assembler); |
} |
@@ -642,7 +400,7 @@ void Interpreter::DoStaGlobalSloppy(InterpreterAssembler* assembler) { |
// |
// Store the value in the accumulator into the global with name in constant pool |
// entry <name_index> using FeedBackVector slot <slot> in strict mode. |
-void Interpreter::DoStaGlobalStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaGlobalStrict(InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); |
DoStaGlobal(ic, assembler); |
} |
@@ -651,7 +409,7 @@ void Interpreter::DoStaGlobalStrict(InterpreterAssembler* assembler) { |
// |
// Load the object in |slot_index| of the context at |depth| in the context |
// chain starting at |context| into the accumulator. |
-void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaContextSlot(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* context = __ LoadRegister(reg_index); |
Node* slot_index = __ BytecodeOperandIdx(1); |
@@ -666,7 +424,8 @@ void Interpreter::DoLdaContextSlot(InterpreterAssembler* assembler) { |
// |
// Load the object in |slot_index| of the context at |depth| in the context |
// chain starting at |context| into the accumulator. |
-void Interpreter::DoLdaImmutableContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaImmutableContextSlot( |
+ InterpreterAssembler* assembler) { |
// TODO(danno) Share the actual code object rather creating a duplicate one. |
DoLdaContextSlot(assembler); |
} |
@@ -674,7 +433,8 @@ void Interpreter::DoLdaImmutableContextSlot(InterpreterAssembler* assembler) { |
// LdaCurrentContextSlot <slot_index> |
// |
// Load the object in |slot_index| of the current context into the accumulator. |
-void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaCurrentContextSlot( |
+ InterpreterAssembler* assembler) { |
Node* slot_index = __ BytecodeOperandIdx(0); |
Node* slot_context = __ GetContext(); |
Node* result = __ LoadContextElement(slot_context, slot_index); |
@@ -685,7 +445,7 @@ void Interpreter::DoLdaCurrentContextSlot(InterpreterAssembler* assembler) { |
// LdaImmutableCurrentContextSlot <slot_index> |
// |
// Load the object in |slot_index| of the current context into the accumulator. |
-void Interpreter::DoLdaImmutableCurrentContextSlot( |
+void InterpreterGenerator::DoLdaImmutableCurrentContextSlot( |
InterpreterAssembler* assembler) { |
// TODO(danno) Share the actual code object rather creating a duplicate one. |
DoLdaCurrentContextSlot(assembler); |
@@ -695,7 +455,7 @@ void Interpreter::DoLdaImmutableCurrentContextSlot( |
// |
// Stores the object in the accumulator into |slot_index| of the context at |
// |depth| in the context chain starting at |context|. |
-void Interpreter::DoStaContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaContextSlot(InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* context = __ LoadRegister(reg_index); |
@@ -710,7 +470,8 @@ void Interpreter::DoStaContextSlot(InterpreterAssembler* assembler) { |
// |
// Stores the object in the accumulator into |slot_index| of the current |
// context. |
-void Interpreter::DoStaCurrentContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaCurrentContextSlot( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* slot_index = __ BytecodeOperandIdx(0); |
Node* slot_context = __ GetContext(); |
@@ -718,8 +479,8 @@ void Interpreter::DoStaCurrentContextSlot(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::DoLdaLookupSlot(Runtime::FunctionId function_id, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupSlot(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler) { |
Node* name_index = __ BytecodeOperandIdx(0); |
Node* name = __ LoadConstantPoolEntry(name_index); |
Node* context = __ GetContext(); |
@@ -732,7 +493,7 @@ void Interpreter::DoLdaLookupSlot(Runtime::FunctionId function_id, |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically. |
-void Interpreter::DoLdaLookupSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupSlot(InterpreterAssembler* assembler) { |
DoLdaLookupSlot(Runtime::kLoadLookupSlot, assembler); |
} |
@@ -740,12 +501,13 @@ void Interpreter::DoLdaLookupSlot(InterpreterAssembler* assembler) { |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically without causing a NoReferenceError. |
-void Interpreter::DoLdaLookupSlotInsideTypeof(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupSlotInsideTypeof( |
+ InterpreterAssembler* assembler) { |
DoLdaLookupSlot(Runtime::kLoadLookupSlotInsideTypeof, assembler); |
} |
-void Interpreter::DoLdaLookupContextSlot(Runtime::FunctionId function_id, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupContextSlot( |
+ Runtime::FunctionId function_id, InterpreterAssembler* assembler) { |
Node* context = __ GetContext(); |
Node* name_index = __ BytecodeOperandIdx(0); |
Node* slot_index = __ BytecodeOperandIdx(1); |
@@ -778,7 +540,8 @@ void Interpreter::DoLdaLookupContextSlot(Runtime::FunctionId function_id, |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically. |
-void Interpreter::DoLdaLookupContextSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupContextSlot( |
+ InterpreterAssembler* assembler) { |
DoLdaLookupContextSlot(Runtime::kLoadLookupSlot, assembler); |
} |
@@ -786,13 +549,13 @@ void Interpreter::DoLdaLookupContextSlot(InterpreterAssembler* assembler) { |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically without causing a NoReferenceError. |
-void Interpreter::DoLdaLookupContextSlotInsideTypeof( |
+void InterpreterGenerator::DoLdaLookupContextSlotInsideTypeof( |
InterpreterAssembler* assembler) { |
DoLdaLookupContextSlot(Runtime::kLoadLookupSlotInsideTypeof, assembler); |
} |
-void Interpreter::DoLdaLookupGlobalSlot(Runtime::FunctionId function_id, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupGlobalSlot( |
+ Runtime::FunctionId function_id, InterpreterAssembler* assembler) { |
Node* context = __ GetContext(); |
Node* depth = __ BytecodeOperandUImm(2); |
@@ -829,7 +592,8 @@ void Interpreter::DoLdaLookupGlobalSlot(Runtime::FunctionId function_id, |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically. |
-void Interpreter::DoLdaLookupGlobalSlot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaLookupGlobalSlot( |
+ InterpreterAssembler* assembler) { |
DoLdaLookupGlobalSlot(Runtime::kLoadLookupSlot, assembler); |
} |
@@ -837,13 +601,13 @@ void Interpreter::DoLdaLookupGlobalSlot(InterpreterAssembler* assembler) { |
// |
// Lookup the object with the name in constant pool entry |name_index| |
// dynamically without causing a NoReferenceError. |
-void Interpreter::DoLdaLookupGlobalSlotInsideTypeof( |
+void InterpreterGenerator::DoLdaLookupGlobalSlotInsideTypeof( |
InterpreterAssembler* assembler) { |
DoLdaLookupGlobalSlot(Runtime::kLoadLookupSlotInsideTypeof, assembler); |
} |
-void Interpreter::DoStaLookupSlot(LanguageMode language_mode, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaLookupSlot(LanguageMode language_mode, |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
Node* name = __ LoadConstantPoolEntry(index); |
@@ -860,7 +624,8 @@ void Interpreter::DoStaLookupSlot(LanguageMode language_mode, |
// |
// Store the object in accumulator to the object with the name in constant |
// pool entry |name_index| in sloppy mode. |
-void Interpreter::DoStaLookupSlotSloppy(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaLookupSlotSloppy( |
+ InterpreterAssembler* assembler) { |
DoStaLookupSlot(LanguageMode::SLOPPY, assembler); |
} |
@@ -868,13 +633,15 @@ void Interpreter::DoStaLookupSlotSloppy(InterpreterAssembler* assembler) { |
// |
// Store the object in accumulator to the object with the name in constant |
// pool entry |name_index| in strict mode. |
-void Interpreter::DoStaLookupSlotStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaLookupSlotStrict( |
+ InterpreterAssembler* assembler) { |
DoStaLookupSlot(LanguageMode::STRICT, assembler); |
} |
-void Interpreter::BuildLoadIC(int recv_operand_index, int slot_operand_index, |
- int name_operand_index, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::BuildLoadIC(int recv_operand_index, |
+ int slot_operand_index, |
+ int name_operand_index, |
+ InterpreterAssembler* assembler) { |
__ Comment("BuildLoadIC"); |
// Load vector and slot. |
@@ -913,7 +680,7 @@ void Interpreter::BuildLoadIC(int recv_operand_index, int slot_operand_index, |
// |
// Calls the LoadIC at FeedBackVector slot <slot> for <object> and the name at |
// constant pool entry <name_index>. |
-void Interpreter::DoLdaNamedProperty(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaNamedProperty(InterpreterAssembler* assembler) { |
static const int kRecvOperandIndex = 0; |
static const int kNameOperandIndex = 1; |
static const int kSlotOperandIndex = 2; |
@@ -926,7 +693,7 @@ void Interpreter::DoLdaNamedProperty(InterpreterAssembler* assembler) { |
// |
// Calls the KeyedLoadIC at FeedBackVector slot <slot> for <object> and the key |
// in the accumulator. |
-void Interpreter::DoLdaKeyedProperty(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaKeyedProperty(InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate_); |
Node* code_target = __ HeapConstant(ic.code()); |
Node* reg_index = __ BytecodeOperandReg(0); |
@@ -942,7 +709,8 @@ void Interpreter::DoLdaKeyedProperty(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStoreIC(Callable ic, |
+ InterpreterAssembler* assembler) { |
Node* code_target = __ HeapConstant(ic.code()); |
Node* object_reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(object_reg_index); |
@@ -963,7 +731,8 @@ void Interpreter::DoStoreIC(Callable ic, InterpreterAssembler* assembler) { |
// Calls the sloppy mode StoreIC at FeedBackVector slot <slot> for <object> and |
// the name in constant pool entry <name_index> with the value in the |
// accumulator. |
-void Interpreter::DoStaNamedPropertySloppy(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaNamedPropertySloppy( |
+ InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY); |
DoStoreIC(ic, assembler); |
} |
@@ -973,7 +742,8 @@ void Interpreter::DoStaNamedPropertySloppy(InterpreterAssembler* assembler) { |
// Calls the strict mode StoreIC at FeedBackVector slot <slot> for <object> and |
// the name in constant pool entry <name_index> with the value in the |
// accumulator. |
-void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaNamedPropertyStrict( |
+ InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::StoreICInOptimizedCode(isolate_, STRICT); |
DoStoreIC(ic, assembler); |
} |
@@ -983,12 +753,14 @@ void Interpreter::DoStaNamedPropertyStrict(InterpreterAssembler* assembler) { |
// Calls the StoreOwnIC at FeedBackVector slot <slot> for <object> and |
// the name in constant pool entry <name_index> with the value in the |
// accumulator. |
-void Interpreter::DoStaNamedOwnProperty(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaNamedOwnProperty( |
+ InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::StoreOwnICInOptimizedCode(isolate_); |
DoStoreIC(ic, assembler); |
} |
-void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoKeyedStoreIC(Callable ic, |
+ InterpreterAssembler* assembler) { |
Node* code_target = __ HeapConstant(ic.code()); |
Node* object_reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(object_reg_index); |
@@ -1008,7 +780,8 @@ void Interpreter::DoKeyedStoreIC(Callable ic, InterpreterAssembler* assembler) { |
// |
// Calls the sloppy mode KeyStoreIC at FeedBackVector slot <slot> for <object> |
// and the key <key> with the value in the accumulator. |
-void Interpreter::DoStaKeyedPropertySloppy(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaKeyedPropertySloppy( |
+ InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY); |
DoKeyedStoreIC(ic, assembler); |
} |
@@ -1017,7 +790,8 @@ void Interpreter::DoStaKeyedPropertySloppy(InterpreterAssembler* assembler) { |
// |
// Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> |
// and the key <key> with the value in the accumulator. |
-void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaKeyedPropertyStrict( |
+ InterpreterAssembler* assembler) { |
Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT); |
DoKeyedStoreIC(ic, assembler); |
} |
@@ -1030,7 +804,8 @@ void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) { |
// |
// This definition is not observable and is used only for definitions |
// in object or class literals. |
-void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaDataPropertyInLiteral( |
+ InterpreterAssembler* assembler) { |
Node* object = __ LoadRegister(__ BytecodeOperandReg(0)); |
Node* name = __ LoadRegister(__ BytecodeOperandReg(1)); |
Node* value = __ GetAccumulator(); |
@@ -1045,7 +820,8 @@ void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCollectTypeProfile( |
+ InterpreterAssembler* assembler) { |
Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); |
Node* value = __ GetAccumulator(); |
Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1)); |
@@ -1063,7 +839,8 @@ void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { |
// Load the contents of a module variable into the accumulator. The variable is |
// identified by <cell_index>. <depth> is the depth of the current context |
// relative to the module context. |
-void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLdaModuleVariable( |
+ InterpreterAssembler* assembler) { |
Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
Node* depth = __ BytecodeOperandUImm(1); |
@@ -1105,7 +882,8 @@ void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { |
// |
// Store accumulator to the module variable identified by <cell_index>. |
// <depth> is the depth of the current context relative to the module context. |
-void Interpreter::DoStaModuleVariable(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStaModuleVariable( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* cell_index = __ BytecodeOperandImmIntPtr(0); |
Node* depth = __ BytecodeOperandUImm(1); |
@@ -1144,7 +922,7 @@ void Interpreter::DoStaModuleVariable(InterpreterAssembler* assembler) { |
// |
// Saves the current context in <context>, and pushes the accumulator as the |
// new current context. |
-void Interpreter::DoPushContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoPushContext(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* new_context = __ GetAccumulator(); |
Node* old_context = __ GetContext(); |
@@ -1156,7 +934,7 @@ void Interpreter::DoPushContext(InterpreterAssembler* assembler) { |
// PopContext <context> |
// |
// Pops the current context and sets <context> as the new context. |
-void Interpreter::DoPopContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoPopContext(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* context = __ LoadRegister(reg_index); |
__ SetContext(context); |
@@ -1164,8 +942,8 @@ void Interpreter::DoPopContext(InterpreterAssembler* assembler) { |
} |
// TODO(mythria): Remove this function once all CompareOps record type feedback. |
-void Interpreter::DoCompareOp(Token::Value compare_op, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCompareOp(Token::Value compare_op, |
+ InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* lhs = __ LoadRegister(reg_index); |
Node* rhs = __ GetAccumulator(); |
@@ -1186,7 +964,8 @@ void Interpreter::DoCompareOp(Token::Value compare_op, |
} |
template <class Generator> |
-void Interpreter::DoBinaryOpWithFeedback(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBinaryOpWithFeedback( |
+ InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* lhs = __ LoadRegister(reg_index); |
Node* rhs = __ GetAccumulator(); |
@@ -1199,8 +978,8 @@ void Interpreter::DoBinaryOpWithFeedback(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCompareOpWithFeedback( |
+ Token::Value compare_op, InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* lhs = __ LoadRegister(reg_index); |
Node* rhs = __ GetAccumulator(); |
@@ -1403,40 +1182,40 @@ void Interpreter::DoCompareOpWithFeedback(Token::Value compare_op, |
// Add <src> |
// |
// Add register <src> to accumulator. |
-void Interpreter::DoAdd(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoAdd(InterpreterAssembler* assembler) { |
DoBinaryOpWithFeedback<AddWithFeedbackStub>(assembler); |
} |
// Sub <src> |
// |
// Subtract register <src> from accumulator. |
-void Interpreter::DoSub(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoSub(InterpreterAssembler* assembler) { |
DoBinaryOpWithFeedback<SubtractWithFeedbackStub>(assembler); |
} |
// Mul <src> |
// |
// Multiply accumulator by register <src>. |
-void Interpreter::DoMul(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoMul(InterpreterAssembler* assembler) { |
DoBinaryOpWithFeedback<MultiplyWithFeedbackStub>(assembler); |
} |
// Div <src> |
// |
// Divide register <src> by accumulator. |
-void Interpreter::DoDiv(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDiv(InterpreterAssembler* assembler) { |
DoBinaryOpWithFeedback<DivideWithFeedbackStub>(assembler); |
} |
// Mod <src> |
// |
// Modulo register <src> by accumulator. |
-void Interpreter::DoMod(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoMod(InterpreterAssembler* assembler) { |
DoBinaryOpWithFeedback<ModulusWithFeedbackStub>(assembler); |
} |
-void Interpreter::DoBitwiseBinaryOp(Token::Value bitwise_op, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseBinaryOp(Token::Value bitwise_op, |
+ InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* lhs = __ LoadRegister(reg_index); |
Node* rhs = __ GetAccumulator(); |
@@ -1510,21 +1289,21 @@ void Interpreter::DoBitwiseBinaryOp(Token::Value bitwise_op, |
// BitwiseOr <src> |
// |
// BitwiseOr register <src> to accumulator. |
-void Interpreter::DoBitwiseOr(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseOr(InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::BIT_OR, assembler); |
} |
// BitwiseXor <src> |
// |
// BitwiseXor register <src> to accumulator. |
-void Interpreter::DoBitwiseXor(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseXor(InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::BIT_XOR, assembler); |
} |
// BitwiseAnd <src> |
// |
// BitwiseAnd register <src> to accumulator. |
-void Interpreter::DoBitwiseAnd(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseAnd(InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::BIT_AND, assembler); |
} |
@@ -1534,7 +1313,7 @@ void Interpreter::DoBitwiseAnd(InterpreterAssembler* assembler) { |
// Register <src> is converted to an int32 and the accumulator to uint32 |
// before the operation. 5 lsb bits from the accumulator are used as count |
// i.e. <src> << (accumulator & 0x1F). |
-void Interpreter::DoShiftLeft(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoShiftLeft(InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::SHL, assembler); |
} |
@@ -1544,7 +1323,7 @@ void Interpreter::DoShiftLeft(InterpreterAssembler* assembler) { |
// Result is sign extended. Register <src> is converted to an int32 and the |
// accumulator to uint32 before the operation. 5 lsb bits from the accumulator |
// are used as count i.e. <src> >> (accumulator & 0x1F). |
-void Interpreter::DoShiftRight(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoShiftRight(InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::SAR, assembler); |
} |
@@ -1554,7 +1333,8 @@ void Interpreter::DoShiftRight(InterpreterAssembler* assembler) { |
// Result is zero-filled. The accumulator and register <src> are converted to |
// uint32 before the operation 5 lsb bits from the accumulator are used as |
// count i.e. <src> << (accumulator & 0x1F). |
-void Interpreter::DoShiftRightLogical(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoShiftRightLogical( |
+ InterpreterAssembler* assembler) { |
DoBitwiseBinaryOp(Token::SHR, assembler); |
} |
@@ -1562,7 +1342,7 @@ void Interpreter::DoShiftRightLogical(InterpreterAssembler* assembler) { |
// |
// Adds an immediate value <imm> to register <reg>. For this |
// operation <reg> is the lhs operand and <imm> is the <rhs> operand. |
-void Interpreter::DoAddSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoAddSmi(InterpreterAssembler* assembler) { |
Variable var_result(assembler, MachineRepresentation::kTagged); |
Label fastpath(assembler), slowpath(assembler, Label::kDeferred), |
end(assembler); |
@@ -1616,7 +1396,7 @@ void Interpreter::DoAddSmi(InterpreterAssembler* assembler) { |
// |
// Subtracts an immediate value <imm> to register <reg>. For this |
// operation <reg> is the lhs operand and <imm> is the rhs operand. |
-void Interpreter::DoSubSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoSubSmi(InterpreterAssembler* assembler) { |
Variable var_result(assembler, MachineRepresentation::kTagged); |
Label fastpath(assembler), slowpath(assembler, Label::kDeferred), |
end(assembler); |
@@ -1670,7 +1450,7 @@ void Interpreter::DoSubSmi(InterpreterAssembler* assembler) { |
// |
// BitwiseOr <reg> with <imm>. For this operation <reg> is the lhs |
// operand and <imm> is the rhs operand. |
-void Interpreter::DoBitwiseOrSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseOrSmi(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(1); |
Node* left = __ LoadRegister(reg_index); |
Node* right = __ BytecodeOperandImmSmi(0); |
@@ -1697,7 +1477,7 @@ void Interpreter::DoBitwiseOrSmi(InterpreterAssembler* assembler) { |
// |
// BitwiseAnd <reg> with <imm>. For this operation <reg> is the lhs |
// operand and <imm> is the rhs operand. |
-void Interpreter::DoBitwiseAndSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoBitwiseAndSmi(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(1); |
Node* left = __ LoadRegister(reg_index); |
Node* right = __ BytecodeOperandImmSmi(0); |
@@ -1725,7 +1505,7 @@ void Interpreter::DoBitwiseAndSmi(InterpreterAssembler* assembler) { |
// Left shifts register <src> by the count specified in <imm>. |
// Register <src> is converted to an int32 before the operation. The 5 |
// lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). |
-void Interpreter::DoShiftLeftSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoShiftLeftSmi(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(1); |
Node* left = __ LoadRegister(reg_index); |
Node* right = __ BytecodeOperandImmSmi(0); |
@@ -1754,7 +1534,7 @@ void Interpreter::DoShiftLeftSmi(InterpreterAssembler* assembler) { |
// Right shifts register <src> by the count specified in <imm>. |
// Register <src> is converted to an int32 before the operation. The 5 |
// lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). |
-void Interpreter::DoShiftRightSmi(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoShiftRightSmi(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(1); |
Node* left = __ LoadRegister(reg_index); |
Node* right = __ BytecodeOperandImmSmi(0); |
@@ -1778,8 +1558,8 @@ void Interpreter::DoShiftRightSmi(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-Node* Interpreter::BuildUnaryOp(Callable callable, |
- InterpreterAssembler* assembler) { |
+Node* InterpreterGenerator::BuildUnaryOp(Callable callable, |
+ InterpreterAssembler* assembler) { |
Node* target = __ HeapConstant(callable.code()); |
Node* accumulator = __ GetAccumulator(); |
Node* context = __ GetContext(); |
@@ -1787,7 +1567,8 @@ Node* Interpreter::BuildUnaryOp(Callable callable, |
} |
template <class Generator> |
-void Interpreter::DoUnaryOpWithFeedback(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoUnaryOpWithFeedback( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* context = __ GetContext(); |
Node* slot_index = __ BytecodeOperandIdx(0); |
@@ -1801,7 +1582,7 @@ void Interpreter::DoUnaryOpWithFeedback(InterpreterAssembler* assembler) { |
// ToName |
// |
// Convert the object referenced by the accumulator to a name. |
-void Interpreter::DoToName(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoToName(InterpreterAssembler* assembler) { |
Node* object = __ GetAccumulator(); |
Node* context = __ GetContext(); |
Node* result = __ ToName(context, object); |
@@ -1812,7 +1593,7 @@ void Interpreter::DoToName(InterpreterAssembler* assembler) { |
// ToNumber |
// |
// Convert the object referenced by the accumulator to a number. |
-void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoToNumber(InterpreterAssembler* assembler) { |
Node* object = __ GetAccumulator(); |
Node* context = __ GetContext(); |
Node* result = __ ToNumber(context, object); |
@@ -1823,7 +1604,7 @@ void Interpreter::DoToNumber(InterpreterAssembler* assembler) { |
// ToObject |
// |
// Convert the object referenced by the accumulator to a JSReceiver. |
-void Interpreter::DoToObject(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoToObject(InterpreterAssembler* assembler) { |
Node* result = BuildUnaryOp(CodeFactory::ToObject(isolate_), assembler); |
__ StoreRegister(result, __ BytecodeOperandReg(0)); |
__ Dispatch(); |
@@ -1832,7 +1613,7 @@ void Interpreter::DoToObject(InterpreterAssembler* assembler) { |
// Inc |
// |
// Increments value in the accumulator by one. |
-void Interpreter::DoInc(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoInc(InterpreterAssembler* assembler) { |
typedef CodeStubAssembler::Label Label; |
typedef compiler::Node Node; |
typedef CodeStubAssembler::Variable Variable; |
@@ -1970,7 +1751,7 @@ void Interpreter::DoInc(InterpreterAssembler* assembler) { |
// Dec |
// |
// Decrements value in the accumulator by one. |
-void Interpreter::DoDec(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDec(InterpreterAssembler* assembler) { |
typedef CodeStubAssembler::Label Label; |
typedef compiler::Node Node; |
typedef CodeStubAssembler::Variable Variable; |
@@ -2110,7 +1891,8 @@ void Interpreter::DoDec(InterpreterAssembler* assembler) { |
// Perform logical-not on the accumulator, first casting the |
// accumulator to a boolean value if required. |
// ToBooleanLogicalNot |
-void Interpreter::DoToBooleanLogicalNot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoToBooleanLogicalNot( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Variable result(assembler, MachineRepresentation::kTagged); |
Label if_true(assembler), if_false(assembler), end(assembler); |
@@ -2136,7 +1918,7 @@ void Interpreter::DoToBooleanLogicalNot(InterpreterAssembler* assembler) { |
// |
// Perform logical-not on the accumulator, which must already be a boolean |
// value. |
-void Interpreter::DoLogicalNot(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoLogicalNot(InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Variable result(assembler, MachineRepresentation::kTagged); |
Label if_true(assembler), if_false(assembler), end(assembler); |
@@ -2166,15 +1948,15 @@ void Interpreter::DoLogicalNot(InterpreterAssembler* assembler) { |
// |
// Load the accumulator with the string representating type of the |
// object in the accumulator. |
-void Interpreter::DoTypeOf(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTypeOf(InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* result = assembler->Typeof(value); |
__ SetAccumulator(result); |
__ Dispatch(); |
} |
-void Interpreter::DoDelete(Runtime::FunctionId function_id, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDelete(Runtime::FunctionId function_id, |
+ InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(reg_index); |
Node* key = __ GetAccumulator(); |
@@ -2188,7 +1970,8 @@ void Interpreter::DoDelete(Runtime::FunctionId function_id, |
// |
// Delete the property specified in the accumulator from the object |
// referenced by the register operand following strict mode semantics. |
-void Interpreter::DoDeletePropertyStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDeletePropertyStrict( |
+ InterpreterAssembler* assembler) { |
DoDelete(Runtime::kDeleteProperty_Strict, assembler); |
} |
@@ -2196,7 +1979,8 @@ void Interpreter::DoDeletePropertyStrict(InterpreterAssembler* assembler) { |
// |
// Delete the property specified in the accumulator from the object |
// referenced by the register operand following sloppy mode semantics. |
-void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDeletePropertySloppy( |
+ InterpreterAssembler* assembler) { |
DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); |
} |
@@ -2204,7 +1988,8 @@ void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { |
// |
// Get the super constructor from the object referenced by the accumulator. |
// The result is stored in register |reg|. |
-void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoGetSuperConstructor( |
+ InterpreterAssembler* assembler) { |
Node* active_function = __ GetAccumulator(); |
Node* context = __ GetContext(); |
Node* result = __ GetSuperConstructor(active_function, context); |
@@ -2213,8 +1998,8 @@ void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) { |
__ Dispatch(); |
} |
-void Interpreter::DoJSCall(InterpreterAssembler* assembler, |
- TailCallMode tail_call_mode) { |
+void InterpreterGenerator::DoJSCall(InterpreterAssembler* assembler, |
+ TailCallMode tail_call_mode) { |
Node* function_reg = __ BytecodeOperandReg(0); |
Node* function = __ LoadRegister(function_reg); |
Node* receiver_reg = __ BytecodeOperandReg(1); |
@@ -2232,7 +2017,8 @@ void Interpreter::DoJSCall(InterpreterAssembler* assembler, |
__ Dispatch(); |
} |
-void Interpreter::DoJSCallN(InterpreterAssembler* assembler, int arg_count) { |
+void InterpreterGenerator::DoJSCallN(InterpreterAssembler* assembler, |
+ int arg_count) { |
const int kReceiverOperandIndex = 1; |
const int kReceiverOperandCount = 1; |
const int kSlotOperandIndex = |
@@ -2266,38 +2052,38 @@ void Interpreter::DoJSCallN(InterpreterAssembler* assembler, int arg_count) { |
// Call a JSfunction or Callable in |callable| with the |receiver| and |
// |arg_count| arguments in subsequent registers. Collect type feedback |
// into |feedback_slot_id| |
-void Interpreter::DoCall(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCall(InterpreterAssembler* assembler) { |
DoJSCall(assembler, TailCallMode::kDisallow); |
} |
-void Interpreter::DoCall0(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCall0(InterpreterAssembler* assembler) { |
DoJSCallN(assembler, 0); |
} |
-void Interpreter::DoCall1(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCall1(InterpreterAssembler* assembler) { |
DoJSCallN(assembler, 1); |
} |
-void Interpreter::DoCall2(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCall2(InterpreterAssembler* assembler) { |
DoJSCallN(assembler, 2); |
} |
-void Interpreter::DoCallProperty(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallProperty(InterpreterAssembler* assembler) { |
// Same as Call |
UNREACHABLE(); |
} |
-void Interpreter::DoCallProperty0(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallProperty0(InterpreterAssembler* assembler) { |
// Same as Call0 |
UNREACHABLE(); |
} |
-void Interpreter::DoCallProperty1(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallProperty1(InterpreterAssembler* assembler) { |
// Same as Call1 |
UNREACHABLE(); |
} |
-void Interpreter::DoCallProperty2(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallProperty2(InterpreterAssembler* assembler) { |
// Same as Call2 |
UNREACHABLE(); |
} |
@@ -2307,7 +2093,7 @@ void Interpreter::DoCallProperty2(InterpreterAssembler* assembler) { |
// Tail call a JSfunction or Callable in |callable| with the |receiver| and |
// |arg_count| arguments in subsequent registers. Collect type feedback |
// into |feedback_slot_id| |
-void Interpreter::DoTailCall(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTailCall(InterpreterAssembler* assembler) { |
DoJSCall(assembler, TailCallMode::kAllow); |
} |
@@ -2316,7 +2102,7 @@ void Interpreter::DoTailCall(InterpreterAssembler* assembler) { |
// Call the runtime function |function_id| with the first argument in |
// register |first_arg| and |arg_count| arguments in subsequent |
// registers. |
-void Interpreter::DoCallRuntime(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallRuntime(InterpreterAssembler* assembler) { |
Node* function_id = __ BytecodeOperandRuntimeId(0); |
Node* first_arg_reg = __ BytecodeOperandReg(1); |
Node* first_arg = __ RegisterLocation(first_arg_reg); |
@@ -2332,7 +2118,7 @@ void Interpreter::DoCallRuntime(InterpreterAssembler* assembler) { |
// Implements the semantic equivalent of calling the runtime function |
// |function_id| with the first argument in |first_arg| and |arg_count| |
// arguments in subsequent registers. |
-void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoInvokeIntrinsic(InterpreterAssembler* assembler) { |
Node* function_id = __ BytecodeOperandIntrinsicId(0); |
Node* first_arg_reg = __ BytecodeOperandReg(1); |
Node* arg_count = __ BytecodeOperandCount(2); |
@@ -2350,7 +2136,8 @@ void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) { |
// first argument in register |first_arg| and |arg_count| arguments in |
// subsequent registers. Returns the result in <first_return> and |
// <first_return + 1> |
-void Interpreter::DoCallRuntimeForPair(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallRuntimeForPair( |
+ InterpreterAssembler* assembler) { |
// Call the runtime function. |
Node* function_id = __ BytecodeOperandRuntimeId(0); |
Node* first_arg_reg = __ BytecodeOperandReg(1); |
@@ -2373,7 +2160,7 @@ void Interpreter::DoCallRuntimeForPair(InterpreterAssembler* assembler) { |
// |
// Call the JS runtime function that has the |context_index| with the receiver |
// in register |receiver| and |arg_count| arguments in subsequent registers. |
-void Interpreter::DoCallJSRuntime(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallJSRuntime(InterpreterAssembler* assembler) { |
Node* context_index = __ BytecodeOperandIdx(0); |
Node* receiver_reg = __ BytecodeOperandReg(1); |
Node* first_arg = __ RegisterLocation(receiver_reg); |
@@ -2399,7 +2186,7 @@ void Interpreter::DoCallJSRuntime(InterpreterAssembler* assembler) { |
// |first_arg| and |arg_count - 1| arguments in subsequent registers. The |
// final argument is always a spread. |
// |
-void Interpreter::DoCallWithSpread(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCallWithSpread(InterpreterAssembler* assembler) { |
Node* callable_reg = __ BytecodeOperandReg(0); |
Node* callable = __ LoadRegister(callable_reg); |
Node* receiver_reg = __ BytecodeOperandReg(1); |
@@ -2422,7 +2209,8 @@ void Interpreter::DoCallWithSpread(InterpreterAssembler* assembler) { |
// |first_arg| and |arg_count| arguments in subsequent registers. The final |
// argument is always a spread. The new.target is in the accumulator. |
// |
-void Interpreter::DoConstructWithSpread(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoConstructWithSpread( |
+ InterpreterAssembler* assembler) { |
Node* new_target = __ GetAccumulator(); |
Node* constructor_reg = __ BytecodeOperandReg(0); |
Node* constructor = __ LoadRegister(constructor_reg); |
@@ -2442,7 +2230,7 @@ void Interpreter::DoConstructWithSpread(InterpreterAssembler* assembler) { |
// register |first_arg| and |arg_count| arguments in subsequent |
// registers. The new.target is in the accumulator. |
// |
-void Interpreter::DoConstruct(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoConstruct(InterpreterAssembler* assembler) { |
Node* new_target = __ GetAccumulator(); |
Node* constructor_reg = __ BytecodeOperandReg(0); |
Node* constructor = __ LoadRegister(constructor_reg); |
@@ -2461,28 +2249,28 @@ void Interpreter::DoConstruct(InterpreterAssembler* assembler) { |
// TestEqual <src> |
// |
// Test if the value in the <src> register equals the accumulator. |
-void Interpreter::DoTestEqual(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestEqual(InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::EQ, assembler); |
} |
// TestEqualStrict <src> |
// |
// Test if the value in the <src> register is strictly equal to the accumulator. |
-void Interpreter::DoTestEqualStrict(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestEqualStrict(InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::EQ_STRICT, assembler); |
} |
// TestLessThan <src> |
// |
// Test if the value in the <src> register is less than the accumulator. |
-void Interpreter::DoTestLessThan(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestLessThan(InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::LT, assembler); |
} |
// TestGreaterThan <src> |
// |
// Test if the value in the <src> register is greater than the accumulator. |
-void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestGreaterThan(InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::GT, assembler); |
} |
@@ -2490,7 +2278,8 @@ void Interpreter::DoTestGreaterThan(InterpreterAssembler* assembler) { |
// |
// Test if the value in the <src> register is less than or equal to the |
// accumulator. |
-void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestLessThanOrEqual( |
+ InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::LTE, assembler); |
} |
@@ -2498,7 +2287,8 @@ void Interpreter::DoTestLessThanOrEqual(InterpreterAssembler* assembler) { |
// |
// Test if the value in the <src> register is greater than or equal to the |
// accumulator. |
-void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestGreaterThanOrEqual( |
+ InterpreterAssembler* assembler) { |
DoCompareOpWithFeedback(Token::Value::GTE, assembler); |
} |
@@ -2506,7 +2296,7 @@ void Interpreter::DoTestGreaterThanOrEqual(InterpreterAssembler* assembler) { |
// |
// Test if the object referenced by the register operand is a property of the |
// object referenced by the accumulator. |
-void Interpreter::DoTestIn(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestIn(InterpreterAssembler* assembler) { |
DoCompareOp(Token::IN, assembler); |
} |
@@ -2514,7 +2304,7 @@ void Interpreter::DoTestIn(InterpreterAssembler* assembler) { |
// |
// Test if the object referenced by the <src> register is an an instance of type |
// referenced by the accumulator. |
-void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestInstanceOf(InterpreterAssembler* assembler) { |
DoCompareOp(Token::INSTANCEOF, assembler); |
} |
@@ -2522,7 +2312,7 @@ void Interpreter::DoTestInstanceOf(InterpreterAssembler* assembler) { |
// |
// Test if the value in the <src> register equals to null/undefined. This is |
// done by checking undetectable bit on the map of the object. |
-void Interpreter::DoTestUndetectable(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestUndetectable(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(reg_index); |
@@ -2553,7 +2343,7 @@ void Interpreter::DoTestUndetectable(InterpreterAssembler* assembler) { |
// TestNull <src> |
// |
// Test if the value in the <src> register is strictly equal to null. |
-void Interpreter::DoTestNull(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestNull(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(reg_index); |
Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
@@ -2576,7 +2366,7 @@ void Interpreter::DoTestNull(InterpreterAssembler* assembler) { |
// TestUndefined <src> |
// |
// Test if the value in the <src> register is strictly equal to undefined. |
-void Interpreter::DoTestUndefined(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestUndefined(InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(reg_index); |
Node* undefined_value = |
@@ -2601,7 +2391,7 @@ void Interpreter::DoTestUndefined(InterpreterAssembler* assembler) { |
// |
// Tests if the object in the <accumulator> is typeof the literal represented |
// by |literal_flag|. |
-void Interpreter::DoTestTypeOf(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoTestTypeOf(InterpreterAssembler* assembler) { |
Node* object = __ GetAccumulator(); |
Node* literal_flag = __ BytecodeOperandFlag(0); |
@@ -2720,7 +2510,7 @@ void Interpreter::DoTestTypeOf(InterpreterAssembler* assembler) { |
// Jump <imm> |
// |
// Jump by number of bytes represented by the immediate operand |imm|. |
-void Interpreter::DoJump(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJump(InterpreterAssembler* assembler) { |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
__ Jump(relative_jump); |
} |
@@ -2728,7 +2518,7 @@ void Interpreter::DoJump(InterpreterAssembler* assembler) { |
// JumpConstant <idx> |
// |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool. |
-void Interpreter::DoJumpConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpConstant(InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
__ Jump(relative_jump); |
@@ -2739,7 +2529,7 @@ void Interpreter::DoJumpConstant(InterpreterAssembler* assembler) { |
// Jump by number of bytes represented by an immediate operand if the |
// accumulator contains true. This only works for boolean inputs, and |
// will misbehave if passed arbitrary input values. |
-void Interpreter::DoJumpIfTrue(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfTrue(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
Node* true_value = __ BooleanConstant(true); |
@@ -2753,7 +2543,8 @@ void Interpreter::DoJumpIfTrue(InterpreterAssembler* assembler) { |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the accumulator contains true. This only works for boolean inputs, and |
// will misbehave if passed arbitrary input values. |
-void Interpreter::DoJumpIfTrueConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfTrueConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
@@ -2768,7 +2559,7 @@ void Interpreter::DoJumpIfTrueConstant(InterpreterAssembler* assembler) { |
// Jump by number of bytes represented by an immediate operand if the |
// accumulator contains false. This only works for boolean inputs, and |
// will misbehave if passed arbitrary input values. |
-void Interpreter::DoJumpIfFalse(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfFalse(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
Node* false_value = __ BooleanConstant(false); |
@@ -2782,7 +2573,8 @@ void Interpreter::DoJumpIfFalse(InterpreterAssembler* assembler) { |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the accumulator contains false. This only works for boolean inputs, and |
// will misbehave if passed arbitrary input values. |
-void Interpreter::DoJumpIfFalseConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfFalseConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
@@ -2796,7 +2588,8 @@ void Interpreter::DoJumpIfFalseConstant(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is true when the object is cast to boolean. |
-void Interpreter::DoJumpIfToBooleanTrue(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfToBooleanTrue( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
Label if_true(assembler), if_false(assembler); |
@@ -2812,7 +2605,7 @@ void Interpreter::DoJumpIfToBooleanTrue(InterpreterAssembler* assembler) { |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the object referenced by the accumulator is true when the object is cast |
// to boolean. |
-void Interpreter::DoJumpIfToBooleanTrueConstant( |
+void InterpreterGenerator::DoJumpIfToBooleanTrueConstant( |
InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
@@ -2829,7 +2622,8 @@ void Interpreter::DoJumpIfToBooleanTrueConstant( |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is false when the object is cast to boolean. |
-void Interpreter::DoJumpIfToBooleanFalse(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfToBooleanFalse( |
+ InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
Label if_true(assembler), if_false(assembler); |
@@ -2845,7 +2639,7 @@ void Interpreter::DoJumpIfToBooleanFalse(InterpreterAssembler* assembler) { |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the object referenced by the accumulator is false when the object is cast |
// to boolean. |
-void Interpreter::DoJumpIfToBooleanFalseConstant( |
+void InterpreterGenerator::DoJumpIfToBooleanFalseConstant( |
InterpreterAssembler* assembler) { |
Node* value = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
@@ -2862,7 +2656,7 @@ void Interpreter::DoJumpIfToBooleanFalseConstant( |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is the null constant. |
-void Interpreter::DoJumpIfNull(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfNull(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
@@ -2873,7 +2667,8 @@ void Interpreter::DoJumpIfNull(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the object referenced by the accumulator is the null constant. |
-void Interpreter::DoJumpIfNullConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfNullConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
Node* index = __ BytecodeOperandIdx(0); |
@@ -2885,7 +2680,7 @@ void Interpreter::DoJumpIfNullConstant(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is the undefined constant. |
-void Interpreter::DoJumpIfUndefined(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfUndefined(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* undefined_value = |
__ HeapConstant(isolate_->factory()->undefined_value()); |
@@ -2897,7 +2692,8 @@ void Interpreter::DoJumpIfUndefined(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the object referenced by the accumulator is the undefined constant. |
-void Interpreter::DoJumpIfUndefinedConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfUndefinedConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* undefined_value = |
__ HeapConstant(isolate_->factory()->undefined_value()); |
@@ -2910,7 +2706,7 @@ void Interpreter::DoJumpIfUndefinedConstant(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is a JSReceiver. |
-void Interpreter::DoJumpIfJSReceiver(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfJSReceiver(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
@@ -2931,7 +2727,8 @@ void Interpreter::DoJumpIfJSReceiver(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool if |
// the object referenced by the accumulator is a JSReceiver. |
-void Interpreter::DoJumpIfJSReceiverConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfJSReceiverConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* index = __ BytecodeOperandIdx(0); |
Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
@@ -2953,7 +2750,7 @@ void Interpreter::DoJumpIfJSReceiverConstant(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes represented by an immediate operand if the object |
// referenced by the accumulator is the hole. |
-void Interpreter::DoJumpIfNotHole(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfNotHole(InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
@@ -2964,7 +2761,8 @@ void Interpreter::DoJumpIfNotHole(InterpreterAssembler* assembler) { |
// |
// Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
// if the object referenced by the accumulator is the hole constant. |
-void Interpreter::DoJumpIfNotHoleConstant(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpIfNotHoleConstant( |
+ InterpreterAssembler* assembler) { |
Node* accumulator = __ GetAccumulator(); |
Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
Node* index = __ BytecodeOperandIdx(0); |
@@ -2977,7 +2775,7 @@ void Interpreter::DoJumpIfNotHoleConstant(InterpreterAssembler* assembler) { |
// Jump by number of bytes represented by the immediate operand |imm|. Also |
// performs a loop nesting check and potentially triggers OSR in case the |
// current OSR level matches (or exceeds) the specified |loop_depth|. |
-void Interpreter::DoJumpLoop(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoJumpLoop(InterpreterAssembler* assembler) { |
Node* relative_jump = __ BytecodeOperandUImmWord(0); |
Node* loop_depth = __ BytecodeOperandImm(1); |
Node* osr_level = __ LoadOSRNestingLevel(); |
@@ -3005,7 +2803,8 @@ void Interpreter::DoJumpLoop(InterpreterAssembler* assembler) { |
// |
// Creates a regular expression literal for literal index <literal_idx> with |
// <flags> and the pattern in <pattern_idx>. |
-void Interpreter::DoCreateRegExpLiteral(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateRegExpLiteral( |
+ InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* pattern = __ LoadConstantPoolEntry(index); |
Node* literal_index = __ BytecodeOperandIdxSmi(1); |
@@ -3023,7 +2822,8 @@ void Interpreter::DoCreateRegExpLiteral(InterpreterAssembler* assembler) { |
// |
// Creates an array literal for literal index <literal_idx> with |
// CreateArrayLiteral flags <flags> and constant elements in <element_idx>. |
-void Interpreter::DoCreateArrayLiteral(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateArrayLiteral( |
+ InterpreterAssembler* assembler) { |
Node* literal_index = __ BytecodeOperandIdxSmi(1); |
Node* closure = __ LoadRegister(Register::function_closure()); |
Node* context = __ GetContext(); |
@@ -3064,7 +2864,8 @@ void Interpreter::DoCreateArrayLiteral(InterpreterAssembler* assembler) { |
// |
// Creates an object literal for literal index <literal_idx> with |
// CreateObjectLiteralFlags <flags> and constant elements in <element_idx>. |
-void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateObjectLiteral( |
+ InterpreterAssembler* assembler) { |
Node* literal_index = __ BytecodeOperandIdxSmi(1); |
Node* bytecode_flags = __ BytecodeOperandFlag(2); |
Node* closure = __ LoadRegister(Register::function_closure()); |
@@ -3113,7 +2914,7 @@ void Interpreter::DoCreateObjectLiteral(InterpreterAssembler* assembler) { |
// |
// Creates a new closure for SharedFunctionInfo at position |index| in the |
// constant pool and with the PretenureFlag <tenured>. |
-void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateClosure(InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* shared = __ LoadConstantPoolEntry(index); |
Node* flags = __ BytecodeOperandFlag(2); |
@@ -3150,7 +2951,8 @@ void Interpreter::DoCreateClosure(InterpreterAssembler* assembler) { |
// |
// Creates a new block context with the scope info constant at |index| and the |
// closure in the accumulator. |
-void Interpreter::DoCreateBlockContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateBlockContext( |
+ InterpreterAssembler* assembler) { |
Node* index = __ BytecodeOperandIdx(0); |
Node* scope_info = __ LoadConstantPoolEntry(index); |
Node* closure = __ GetAccumulator(); |
@@ -3165,7 +2967,8 @@ void Interpreter::DoCreateBlockContext(InterpreterAssembler* assembler) { |
// Creates a new context for a catch block with the |exception| in a register, |
// the variable name at |name_idx|, the ScopeInfo at |scope_info_idx|, and the |
// closure in the accumulator. |
-void Interpreter::DoCreateCatchContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateCatchContext( |
+ InterpreterAssembler* assembler) { |
Node* exception_reg = __ BytecodeOperandReg(0); |
Node* exception = __ LoadRegister(exception_reg); |
Node* name_idx = __ BytecodeOperandIdx(1); |
@@ -3182,7 +2985,8 @@ void Interpreter::DoCreateCatchContext(InterpreterAssembler* assembler) { |
// CreateFunctionContext <slots> |
// |
// Creates a new context with number of |slots| for the function closure. |
-void Interpreter::DoCreateFunctionContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateFunctionContext( |
+ InterpreterAssembler* assembler) { |
Node* closure = __ LoadRegister(Register::function_closure()); |
Node* slots = __ BytecodeOperandUImm(0); |
Node* context = __ GetContext(); |
@@ -3195,7 +2999,8 @@ void Interpreter::DoCreateFunctionContext(InterpreterAssembler* assembler) { |
// CreateEvalContext <slots> |
// |
// Creates a new context with number of |slots| for an eval closure. |
-void Interpreter::DoCreateEvalContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateEvalContext( |
+ InterpreterAssembler* assembler) { |
Node* closure = __ LoadRegister(Register::function_closure()); |
Node* slots = __ BytecodeOperandUImm(0); |
Node* context = __ GetContext(); |
@@ -3210,7 +3015,8 @@ void Interpreter::DoCreateEvalContext(InterpreterAssembler* assembler) { |
// Creates a new context with the ScopeInfo at |scope_info_idx| for a |
// with-statement with the object in |register| and the closure in the |
// accumulator. |
-void Interpreter::DoCreateWithContext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateWithContext( |
+ InterpreterAssembler* assembler) { |
Node* reg_index = __ BytecodeOperandReg(0); |
Node* object = __ LoadRegister(reg_index); |
Node* scope_info_idx = __ BytecodeOperandIdx(1); |
@@ -3225,7 +3031,8 @@ void Interpreter::DoCreateWithContext(InterpreterAssembler* assembler) { |
// CreateMappedArguments |
// |
// Creates a new mapped arguments object. |
-void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateMappedArguments( |
+ InterpreterAssembler* assembler) { |
Node* closure = __ LoadRegister(Register::function_closure()); |
Node* context = __ GetContext(); |
@@ -3266,7 +3073,8 @@ void Interpreter::DoCreateMappedArguments(InterpreterAssembler* assembler) { |
// CreateUnmappedArguments |
// |
// Creates a new unmapped arguments object. |
-void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateUnmappedArguments( |
+ InterpreterAssembler* assembler) { |
Node* context = __ GetContext(); |
Node* closure = __ LoadRegister(Register::function_closure()); |
ArgumentsBuiltinsAssembler builtins_assembler(assembler->state()); |
@@ -3279,7 +3087,8 @@ void Interpreter::DoCreateUnmappedArguments(InterpreterAssembler* assembler) { |
// CreateRestParameter |
// |
// Creates a new rest parameter array. |
-void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoCreateRestParameter( |
+ InterpreterAssembler* assembler) { |
Node* closure = __ LoadRegister(Register::function_closure()); |
Node* context = __ GetContext(); |
ArgumentsBuiltinsAssembler builtins_assembler(assembler->state()); |
@@ -3291,7 +3100,7 @@ void Interpreter::DoCreateRestParameter(InterpreterAssembler* assembler) { |
// StackCheck |
// |
// Performs a stack guard check. |
-void Interpreter::DoStackCheck(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoStackCheck(InterpreterAssembler* assembler) { |
Label ok(assembler), stack_check_interrupt(assembler, Label::kDeferred); |
Node* interrupt = __ StackCheckTriggeredInterrupt(); |
@@ -3312,7 +3121,8 @@ void Interpreter::DoStackCheck(InterpreterAssembler* assembler) { |
// |
// Sets the pending message to the value in the accumulator, and returns the |
// previous pending message in the accumulator. |
-void Interpreter::DoSetPendingMessage(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoSetPendingMessage( |
+ InterpreterAssembler* assembler) { |
Node* pending_message = __ ExternalConstant( |
ExternalReference::address_of_pending_message_obj(isolate_)); |
Node* previous_message = |
@@ -3327,7 +3137,7 @@ void Interpreter::DoSetPendingMessage(InterpreterAssembler* assembler) { |
// Throw |
// |
// Throws the exception in the accumulator. |
-void Interpreter::DoThrow(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoThrow(InterpreterAssembler* assembler) { |
Node* exception = __ GetAccumulator(); |
Node* context = __ GetContext(); |
__ CallRuntime(Runtime::kThrow, context, exception); |
@@ -3338,7 +3148,7 @@ void Interpreter::DoThrow(InterpreterAssembler* assembler) { |
// ReThrow |
// |
// Re-throws the exception in the accumulator. |
-void Interpreter::DoReThrow(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoReThrow(InterpreterAssembler* assembler) { |
Node* exception = __ GetAccumulator(); |
Node* context = __ GetContext(); |
__ CallRuntime(Runtime::kReThrow, context, exception); |
@@ -3349,7 +3159,7 @@ void Interpreter::DoReThrow(InterpreterAssembler* assembler) { |
// Return |
// |
// Return the value in the accumulator. |
-void Interpreter::DoReturn(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoReturn(InterpreterAssembler* assembler) { |
__ UpdateInterruptBudgetOnReturn(); |
Node* accumulator = __ GetAccumulator(); |
__ Return(accumulator); |
@@ -3358,7 +3168,7 @@ void Interpreter::DoReturn(InterpreterAssembler* assembler) { |
// Debugger |
// |
// Call runtime to handle debugger statement. |
-void Interpreter::DoDebugger(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoDebugger(InterpreterAssembler* assembler) { |
Node* context = __ GetContext(); |
__ CallStub(CodeFactory::HandleDebuggerStatement(isolate_), context); |
__ Dispatch(); |
@@ -3368,7 +3178,7 @@ void Interpreter::DoDebugger(InterpreterAssembler* assembler) { |
// |
// Call runtime to handle a debug break. |
#define DEBUG_BREAK(Name, ...) \ |
- void Interpreter::Do##Name(InterpreterAssembler* assembler) { \ |
+ void InterpreterGenerator::Do##Name(InterpreterAssembler* assembler) { \ |
Node* context = __ GetContext(); \ |
Node* accumulator = __ GetAccumulator(); \ |
Node* original_handler = \ |
@@ -3379,10 +3189,9 @@ void Interpreter::DoDebugger(InterpreterAssembler* assembler) { |
DEBUG_BREAK_BYTECODE_LIST(DEBUG_BREAK); |
#undef DEBUG_BREAK |
-void Interpreter::BuildForInPrepareResult(Node* output_register, |
- Node* cache_type, Node* cache_array, |
- Node* cache_length, |
- InterpreterAssembler* assembler) { |
+void InterpreterGenerator::BuildForInPrepareResult( |
+ Node* output_register, Node* cache_type, Node* cache_array, |
+ Node* cache_length, InterpreterAssembler* assembler) { |
__ StoreRegister(cache_type, output_register); |
output_register = __ NextRegister(output_register); |
__ StoreRegister(cache_array, output_register); |
@@ -3398,7 +3207,7 @@ void Interpreter::BuildForInPrepareResult(Node* output_register, |
// The result is output in registers |cache_info_triple| to |
// |cache_info_triple + 2|, with the registers holding cache_type, cache_array, |
// and cache_length respectively. |
-void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoForInPrepare(InterpreterAssembler* assembler) { |
Node* object_register = __ BytecodeOperandReg(0); |
Node* output_register = __ BytecodeOperandReg(1); |
Node* receiver = __ LoadRegister(object_register); |
@@ -3442,7 +3251,7 @@ void Interpreter::DoForInPrepare(InterpreterAssembler* assembler) { |
// ForInNext <receiver> <index> <cache_info_pair> |
// |
// Returns the next enumerable property in the the accumulator. |
-void Interpreter::DoForInNext(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoForInNext(InterpreterAssembler* assembler) { |
Node* receiver_reg = __ BytecodeOperandReg(0); |
Node* receiver = __ LoadRegister(receiver_reg); |
Node* index_reg = __ BytecodeOperandReg(1); |
@@ -3488,7 +3297,7 @@ void Interpreter::DoForInNext(InterpreterAssembler* assembler) { |
// ForInContinue <index> <cache_length> |
// |
// Returns false if the end of the enumerable properties has been reached. |
-void Interpreter::DoForInContinue(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoForInContinue(InterpreterAssembler* assembler) { |
Node* index_reg = __ BytecodeOperandReg(0); |
Node* index = __ LoadRegister(index_reg); |
Node* cache_length_reg = __ BytecodeOperandReg(1); |
@@ -3515,7 +3324,7 @@ void Interpreter::DoForInContinue(InterpreterAssembler* assembler) { |
// |
// Increments the loop counter in register |index| and stores the result |
// in the accumulator. |
-void Interpreter::DoForInStep(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoForInStep(InterpreterAssembler* assembler) { |
Node* index_reg = __ BytecodeOperandReg(0); |
Node* index = __ LoadRegister(index_reg); |
Node* one = __ SmiConstant(Smi::FromInt(1)); |
@@ -3527,35 +3336,37 @@ void Interpreter::DoForInStep(InterpreterAssembler* assembler) { |
// Wide |
// |
// Prefix bytecode indicating next bytecode has wide (16-bit) operands. |
-void Interpreter::DoWide(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoWide(InterpreterAssembler* assembler) { |
__ DispatchWide(OperandScale::kDouble); |
} |
// ExtraWide |
// |
// Prefix bytecode indicating next bytecode has extra-wide (32-bit) operands. |
-void Interpreter::DoExtraWide(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoExtraWide(InterpreterAssembler* assembler) { |
__ DispatchWide(OperandScale::kQuadruple); |
} |
// Illegal |
// |
// An invalid bytecode aborting execution if dispatched. |
-void Interpreter::DoIllegal(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoIllegal(InterpreterAssembler* assembler) { |
__ Abort(kInvalidBytecode); |
} |
// Nop |
// |
// No operation. |
-void Interpreter::DoNop(InterpreterAssembler* assembler) { __ Dispatch(); } |
+void InterpreterGenerator::DoNop(InterpreterAssembler* assembler) { |
+ __ Dispatch(); |
+} |
// SuspendGenerator <generator> |
// |
// Exports the register file and stores it into the generator. Also stores the |
// current context, the state given in the accumulator, and the current bytecode |
// offset (for debugging purposes) into the generator. |
-void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoSuspendGenerator(InterpreterAssembler* assembler) { |
Node* generator_reg = __ BytecodeOperandReg(0); |
Node* generator = __ LoadRegister(generator_reg); |
@@ -3597,7 +3408,7 @@ void Interpreter::DoSuspendGenerator(InterpreterAssembler* assembler) { |
// Imports the register file stored in the generator. Also loads the |
// generator's state and stores it in the accumulator, before overwriting it |
// with kGeneratorExecuting. |
-void Interpreter::DoResumeGenerator(InterpreterAssembler* assembler) { |
+void InterpreterGenerator::DoResumeGenerator(InterpreterAssembler* assembler) { |
Node* generator_reg = __ BytecodeOperandReg(0); |
Node* generator = __ LoadRegister(generator_reg); |
@@ -3608,7 +3419,7 @@ void Interpreter::DoResumeGenerator(InterpreterAssembler* assembler) { |
__ LoadObjectField(generator, JSGeneratorObject::kContinuationOffset); |
Node* new_state = __ Int32Constant(JSGeneratorObject::kGeneratorExecuting); |
__ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
- __ SmiTag(new_state)); |
+ __ SmiTag(new_state)); |
__ SetAccumulator(old_state); |
__ Dispatch(); |