| Index: src/interpreter/interpreter.cc
|
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
|
| index 5929047cbb61c95395fe433f5a6117018750fd6a..020c662dd5973b9669cca1deca32914d6d228508 100644
|
| --- a/src/interpreter/interpreter.cc
|
| +++ b/src/interpreter/interpreter.cc
|
| @@ -96,21 +96,34 @@ void Interpreter::DoLdaZero(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Load an 8-bit integer literal into the accumulator as a Smi.
|
| void Interpreter::DoLdaSmi8(compiler::InterpreterAssembler* assembler) {
|
| - Node* raw_int = __ BytecodeOperandImm8(0);
|
| + Node* raw_int = __ BytecodeOperandImm(0);
|
| Node* smi_int = __ SmiTag(raw_int);
|
| __ SetAccumulator(smi_int);
|
| __ Dispatch();
|
| }
|
|
|
|
|
| +void Interpreter::DoLoadConstant(compiler::InterpreterAssembler* assembler) {
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| + Node* constant = __ LoadConstantPoolEntry(index);
|
| + __ SetAccumulator(constant);
|
| + __ Dispatch();
|
| +}
|
| +
|
| +
|
| // LdaConstant <idx>
|
| //
|
| // Load constant literal at |idx| in the constant pool into the accumulator.
|
| void Interpreter::DoLdaConstant(compiler::InterpreterAssembler* assembler) {
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| - Node* constant = __ LoadConstantPoolEntry(index);
|
| - __ SetAccumulator(constant);
|
| - __ Dispatch();
|
| + DoLoadConstant(assembler);
|
| +}
|
| +
|
| +
|
| +// LdaConstantWide <idx>
|
| +//
|
| +// Load constant literal at |idx| in the constant pool into the accumulator.
|
| +void Interpreter::DoLdaConstantWide(compiler::InterpreterAssembler* assembler) {
|
| + DoLoadConstant(assembler);
|
| }
|
|
|
|
|
| @@ -169,7 +182,7 @@ void Interpreter::DoLdaFalse(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Load accumulator with value from register <src>.
|
| void Interpreter::DoLdar(compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* value = __ LoadRegister(reg_index);
|
| __ SetAccumulator(value);
|
| __ Dispatch();
|
| @@ -180,7 +193,7 @@ void Interpreter::DoLdar(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Store accumulator to register <dst>.
|
| void Interpreter::DoStar(compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* accumulator = __ GetAccumulator();
|
| __ StoreRegister(accumulator, reg_index);
|
| __ Dispatch();
|
| @@ -195,9 +208,9 @@ void Interpreter::DoLoadGlobal(Callable ic,
|
|
|
| // Load the global via the LoadIC.
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* constant_index = __ BytecodeOperandIdx8(0);
|
| + Node* constant_index = __ BytecodeOperandIdx(0);
|
| Node* name = __ LoadConstantPoolEntry(constant_index);
|
| - Node* raw_slot = __ BytecodeOperandIdx8(1);
|
| + Node* raw_slot = __ BytecodeOperandIdx(1);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| Node* result = __ CallIC(ic.descriptor(), code_target, global, name, smi_slot,
|
| @@ -230,6 +243,30 @@ void Interpreter::DoLdaGlobalStrict(compiler::InterpreterAssembler* assembler) {
|
| }
|
|
|
|
|
| +// LdaGlobalSloppyWide <name_index> <slot>
|
| +//
|
| +// Load the global with name in constant pool entry <name_index> into the
|
| +// accumulator using FeedBackVector slot <slot> in sloppy mode.
|
| +void Interpreter::DoLdaGlobalSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
| + SLOPPY, UNINITIALIZED);
|
| + DoLoadGlobal(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// LdaGlobalSloppyWide <name_index> <slot>
|
| +//
|
| +// Load the global with name in constant pool entry <name_index> into the
|
| +// accumulator using FeedBackVector slot <slot> in strict mode.
|
| +void Interpreter::DoLdaGlobalStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
| + STRICT, UNINITIALIZED);
|
| + DoLoadGlobal(ic, assembler);
|
| +}
|
| +
|
| +
|
| void Interpreter::DoStoreGlobal(Callable ic,
|
| compiler::InterpreterAssembler* assembler) {
|
| // Get the global object.
|
| @@ -238,10 +275,10 @@ void Interpreter::DoStoreGlobal(Callable ic,
|
|
|
| // Store the global via the StoreIC.
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* constant_index = __ BytecodeOperandIdx8(0);
|
| + Node* constant_index = __ BytecodeOperandIdx(0);
|
| Node* name = __ LoadConstantPoolEntry(constant_index);
|
| Node* value = __ GetAccumulator();
|
| - Node* raw_slot = __ BytecodeOperandIdx8(1);
|
| + Node* raw_slot = __ BytecodeOperandIdx(1);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| __ CallIC(ic.descriptor(), code_target, global, name, value, smi_slot,
|
| @@ -273,13 +310,37 @@ void Interpreter::DoStaGlobalStrict(compiler::InterpreterAssembler* assembler) {
|
| }
|
|
|
|
|
| +// StaGlobalSloppyWide <name_index> <slot>
|
| +//
|
| +// 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::DoStaGlobalSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
| + DoStoreGlobal(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// StaGlobalStrictWide <name_index> <slot>
|
| +//
|
| +// 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::DoStaGlobalStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::StoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
| + DoStoreGlobal(ic, assembler);
|
| +}
|
| +
|
| +
|
| // LdaContextSlot <context> <slot_index>
|
| //
|
| // Load the object in |slot_index| of |context| into the accumulator.
|
| void Interpreter::DoLdaContextSlot(compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* context = __ LoadRegister(reg_index);
|
| - Node* slot_index = __ BytecodeOperandIdx8(1);
|
| + Node* slot_index = __ BytecodeOperandIdx(1);
|
| Node* result = __ LoadContextSlot(context, slot_index);
|
| __ SetAccumulator(result);
|
| __ Dispatch();
|
| @@ -291,9 +352,9 @@ void Interpreter::DoLdaContextSlot(compiler::InterpreterAssembler* assembler) {
|
| // Stores the object in the accumulator into |slot_index| of |context|.
|
| void Interpreter::DoStaContextSlot(compiler::InterpreterAssembler* assembler) {
|
| Node* value = __ GetAccumulator();
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* context = __ LoadRegister(reg_index);
|
| - Node* slot_index = __ BytecodeOperandIdx8(1);
|
| + Node* slot_index = __ BytecodeOperandIdx(1);
|
| __ StoreContextSlot(context, slot_index, value);
|
| __ Dispatch();
|
| }
|
| @@ -302,11 +363,11 @@ void Interpreter::DoStaContextSlot(compiler::InterpreterAssembler* assembler) {
|
| void Interpreter::DoLoadIC(Callable ic,
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* register_index = __ BytecodeOperandReg8(0);
|
| + Node* register_index = __ BytecodeOperandReg(0);
|
| Node* object = __ LoadRegister(register_index);
|
| - Node* constant_index = __ BytecodeOperandIdx8(1);
|
| + Node* constant_index = __ BytecodeOperandIdx(1);
|
| Node* name = __ LoadConstantPoolEntry(constant_index);
|
| - Node* raw_slot = __ BytecodeOperandIdx8(2);
|
| + Node* raw_slot = __ BytecodeOperandIdx(2);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| Node* result = __ CallIC(ic.descriptor(), code_target, object, name, smi_slot,
|
| @@ -338,13 +399,37 @@ void Interpreter::DoLoadICStrict(compiler::InterpreterAssembler* assembler) {
|
| }
|
|
|
|
|
| +// LoadICSloppyWide <object> <name_index> <slot>
|
| +//
|
| +// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
| +// the name at constant pool entry <name_index>.
|
| +void Interpreter::DoLoadICSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
| + SLOPPY, UNINITIALIZED);
|
| + DoLoadIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// LoadICStrictWide <object> <name_index> <slot>
|
| +//
|
| +// Calls the sloppy mode LoadIC at FeedBackVector slot <slot> for <object> and
|
| +// the name at constant pool entry <name_index>.
|
| +void Interpreter::DoLoadICStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic = CodeFactory::LoadICInOptimizedCode(isolate_, NOT_INSIDE_TYPEOF,
|
| + STRICT, UNINITIALIZED);
|
| + DoLoadIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| void Interpreter::DoKeyedLoadIC(Callable ic,
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* object = __ LoadRegister(reg_index);
|
| Node* name = __ GetAccumulator();
|
| - Node* raw_slot = __ BytecodeOperandIdx8(1);
|
| + Node* raw_slot = __ BytecodeOperandIdx(1);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| Node* result = __ CallIC(ic.descriptor(), code_target, object, name, smi_slot,
|
| @@ -378,15 +463,39 @@ void Interpreter::DoKeyedLoadICStrict(
|
| }
|
|
|
|
|
| +// KeyedLoadICSloppyWide <object> <slot>
|
| +//
|
| +// Calls the sloppy mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
| +// and the key in the accumulator.
|
| +void Interpreter::DoKeyedLoadICSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::KeyedLoadICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
| + DoKeyedLoadIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// KeyedLoadICStrictWide <object> <slot>
|
| +//
|
| +// Calls the strict mode KeyedLoadIC at FeedBackVector slot <slot> for <object>
|
| +// and the key in the accumulator.
|
| +void Interpreter::DoKeyedLoadICStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::KeyedLoadICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
| + DoKeyedLoadIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| void Interpreter::DoStoreIC(Callable ic,
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* object_reg_index = __ BytecodeOperandReg8(0);
|
| + Node* object_reg_index = __ BytecodeOperandReg(0);
|
| Node* object = __ LoadRegister(object_reg_index);
|
| - Node* constant_index = __ BytecodeOperandIdx8(1);
|
| + Node* constant_index = __ BytecodeOperandIdx(1);
|
| Node* name = __ LoadConstantPoolEntry(constant_index);
|
| Node* value = __ GetAccumulator();
|
| - Node* raw_slot = __ BytecodeOperandIdx8(2);
|
| + Node* raw_slot = __ BytecodeOperandIdx(2);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| __ CallIC(ic.descriptor(), code_target, object, name, value, smi_slot,
|
| @@ -419,15 +528,41 @@ void Interpreter::DoStoreICStrict(compiler::InterpreterAssembler* assembler) {
|
| }
|
|
|
|
|
| +// StoreICSloppyWide <object> <name_index> <slot>
|
| +//
|
| +// 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::DoStoreICSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::StoreICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
| + DoStoreIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// StoreICStrictWide <object> <name_index> <slot>
|
| +//
|
| +// 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::DoStoreICStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::StoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
| + DoStoreIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| void Interpreter::DoKeyedStoreIC(Callable ic,
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* code_target = __ HeapConstant(ic.code());
|
| - Node* object_reg_index = __ BytecodeOperandReg8(0);
|
| + Node* object_reg_index = __ BytecodeOperandReg(0);
|
| Node* object = __ LoadRegister(object_reg_index);
|
| - Node* name_reg_index = __ BytecodeOperandReg8(1);
|
| + Node* name_reg_index = __ BytecodeOperandReg(1);
|
| Node* name = __ LoadRegister(name_reg_index);
|
| Node* value = __ GetAccumulator();
|
| - Node* raw_slot = __ BytecodeOperandIdx8(2);
|
| + Node* raw_slot = __ BytecodeOperandIdx(2);
|
| Node* smi_slot = __ SmiTag(raw_slot);
|
| Node* type_feedback_vector = __ LoadTypeFeedbackVector();
|
| __ CallIC(ic.descriptor(), code_target, object, name, value, smi_slot,
|
| @@ -460,11 +595,35 @@ void Interpreter::DoKeyedStoreICStrict(
|
| }
|
|
|
|
|
| +// KeyedStoreICSloppyWide <object> <key> <slot>
|
| +//
|
| +// Calls the sloppy mode KeyStoreIC at FeedBackVector slot <slot> for <object>
|
| +// and the key <key> with the value in the accumulator.
|
| +void Interpreter::DoKeyedStoreICSloppyWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::KeyedStoreICInOptimizedCode(isolate_, SLOPPY, UNINITIALIZED);
|
| + DoKeyedStoreIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| +// KeyedStoreICStoreWide <object> <key> <slot>
|
| +//
|
| +// Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
|
| +// and the key <key> with the value in the accumulator.
|
| +void Interpreter::DoKeyedStoreICStrictWide(
|
| + compiler::InterpreterAssembler* assembler) {
|
| + Callable ic =
|
| + CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
|
| + DoKeyedStoreIC(ic, assembler);
|
| +}
|
| +
|
| +
|
| // PushContext <context>
|
| //
|
| // Pushes the accumulator as the current context, and saves it in <context>
|
| void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* context = __ GetAccumulator();
|
| __ SetContext(context);
|
| __ StoreRegister(context, reg_index);
|
| @@ -476,7 +635,7 @@ void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Pops the current context and sets <context> as the new context.
|
| void Interpreter::DoPopContext(compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* context = __ LoadRegister(reg_index);
|
| __ SetContext(context);
|
| __ Dispatch();
|
| @@ -487,7 +646,7 @@ void Interpreter::DoBinaryOp(Runtime::FunctionId function_id,
|
| compiler::InterpreterAssembler* assembler) {
|
| // TODO(rmcilroy): Call ICs which back-patch bytecode with type specialized
|
| // operations, instead of calling builtins directly.
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* lhs = __ LoadRegister(reg_index);
|
| Node* rhs = __ GetAccumulator();
|
| Node* result = __ CallRuntime(function_id, lhs, rhs);
|
| @@ -646,7 +805,7 @@ void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) {
|
|
|
| void Interpreter::DoDelete(Runtime::FunctionId function_id,
|
| compiler::InterpreterAssembler* assembler) {
|
| - Node* reg_index = __ BytecodeOperandReg8(0);
|
| + Node* reg_index = __ BytecodeOperandReg(0);
|
| Node* object = __ LoadRegister(reg_index);
|
| Node* key = __ GetAccumulator();
|
| Node* result = __ CallRuntime(function_id, object, key);
|
| @@ -680,11 +839,11 @@ void Interpreter::DoDeletePropertySloppy(
|
| // Call a JSfunction or Callable in |callable| with the |receiver| and
|
| // |arg_count| arguments in subsequent registers.
|
| void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) {
|
| - Node* function_reg = __ BytecodeOperandReg8(0);
|
| + Node* function_reg = __ BytecodeOperandReg(0);
|
| Node* function = __ LoadRegister(function_reg);
|
| - Node* receiver_reg = __ BytecodeOperandReg8(1);
|
| + Node* receiver_reg = __ BytecodeOperandReg(1);
|
| Node* first_arg = __ RegisterLocation(receiver_reg);
|
| - Node* args_count = __ BytecodeOperandCount8(2);
|
| + Node* args_count = __ BytecodeOperandCount(2);
|
| Node* result = __ CallJS(function, first_arg, args_count);
|
| __ SetAccumulator(result);
|
| __ Dispatch();
|
| @@ -697,10 +856,10 @@ void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) {
|
| // register |first_arg| and |arg_count| arguments in subsequent
|
| // registers.
|
| void Interpreter::DoCallRuntime(compiler::InterpreterAssembler* assembler) {
|
| - Node* function_id = __ BytecodeOperandIdx16(0);
|
| - Node* first_arg_reg = __ BytecodeOperandReg8(1);
|
| + Node* function_id = __ BytecodeOperandIdx(0);
|
| + Node* first_arg_reg = __ BytecodeOperandReg(1);
|
| Node* first_arg = __ RegisterLocation(first_arg_reg);
|
| - Node* args_count = __ BytecodeOperandCount8(2);
|
| + Node* args_count = __ BytecodeOperandCount(2);
|
| Node* result = __ CallRuntime(function_id, first_arg, args_count);
|
| __ SetAccumulator(result);
|
| __ Dispatch();
|
| @@ -714,11 +873,11 @@ void Interpreter::DoCallRuntime(compiler::InterpreterAssembler* assembler) {
|
| //
|
| void Interpreter::DoNew(compiler::InterpreterAssembler* assembler) {
|
| Callable ic = CodeFactory::InterpreterPushArgsAndConstruct(isolate_);
|
| - Node* constructor_index = __ BytecodeOperandReg8(0);
|
| - Node* constructor = __ LoadRegister(constructor_index);
|
| - Node* first_arg_reg = __ BytecodeOperandReg8(1);
|
| + Node* constructor_reg = __ BytecodeOperandReg(0);
|
| + Node* constructor = __ LoadRegister(constructor_reg);
|
| + Node* first_arg_reg = __ BytecodeOperandReg(1);
|
| Node* first_arg = __ RegisterLocation(first_arg_reg);
|
| - Node* args_count = __ BytecodeOperandCount8(2);
|
| + Node* args_count = __ BytecodeOperandCount(2);
|
| Node* result =
|
| __ CallConstruct(constructor, constructor, first_arg, args_count);
|
| __ SetAccumulator(result);
|
| @@ -862,7 +1021,7 @@ void Interpreter::DoToObject(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Jump by number of bytes represented by the immediate operand |imm8|.
|
| void Interpreter::DoJump(compiler::InterpreterAssembler* assembler) {
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| __ Jump(relative_jump);
|
| }
|
|
|
| @@ -871,7 +1030,7 @@ void Interpreter::DoJump(compiler::InterpreterAssembler* assembler) {
|
| //
|
| // Jump by number of bytes in the Smi in the |idx| entry in the constant pool.
|
| void Interpreter::DoJumpConstant(compiler::InterpreterAssembler* assembler) {
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| __ Jump(relative_jump);
|
| @@ -884,7 +1043,7 @@ void Interpreter::DoJumpConstant(compiler::InterpreterAssembler* assembler) {
|
| // accumulator contains true.
|
| void Interpreter::DoJumpIfTrue(compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| Node* true_value = __ BooleanConstant(true);
|
| __ JumpIfWordEqual(accumulator, true_value, relative_jump);
|
| }
|
| @@ -897,7 +1056,7 @@ void Interpreter::DoJumpIfTrue(compiler::InterpreterAssembler* assembler) {
|
| void Interpreter::DoJumpIfTrueConstant(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| Node* true_value = __ BooleanConstant(true);
|
| @@ -911,7 +1070,7 @@ void Interpreter::DoJumpIfTrueConstant(
|
| // accumulator contains false.
|
| void Interpreter::DoJumpIfFalse(compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| Node* false_value = __ BooleanConstant(false);
|
| __ JumpIfWordEqual(accumulator, false_value, relative_jump);
|
| }
|
| @@ -924,7 +1083,7 @@ void Interpreter::DoJumpIfFalse(compiler::InterpreterAssembler* assembler) {
|
| void Interpreter::DoJumpIfFalseConstant(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| Node* false_value = __ BooleanConstant(false);
|
| @@ -939,7 +1098,7 @@ void Interpreter::DoJumpIfFalseConstant(
|
| void Interpreter::DoJumpIfToBooleanTrue(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| Node* to_boolean_value =
|
| __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
|
| Node* true_value = __ BooleanConstant(true);
|
| @@ -957,7 +1116,7 @@ void Interpreter::DoJumpIfToBooleanTrueConstant(
|
| Node* accumulator = __ GetAccumulator();
|
| Node* to_boolean_value =
|
| __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| Node* true_value = __ BooleanConstant(true);
|
| @@ -972,7 +1131,7 @@ void Interpreter::DoJumpIfToBooleanTrueConstant(
|
| void Interpreter::DoJumpIfToBooleanFalse(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| Node* to_boolean_value =
|
| __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
|
| Node* false_value = __ BooleanConstant(false);
|
| @@ -990,7 +1149,7 @@ void Interpreter::DoJumpIfToBooleanFalseConstant(
|
| Node* accumulator = __ GetAccumulator();
|
| Node* to_boolean_value =
|
| __ CallRuntime(Runtime::kInterpreterToBoolean, accumulator);
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| Node* false_value = __ BooleanConstant(false);
|
| @@ -1005,7 +1164,7 @@ void Interpreter::DoJumpIfToBooleanFalseConstant(
|
| void Interpreter::DoJumpIfNull(compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| Node* null_value = __ HeapConstant(isolate_->factory()->null_value());
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| __ JumpIfWordEqual(accumulator, null_value, relative_jump);
|
| }
|
|
|
| @@ -1018,7 +1177,7 @@ void Interpreter::DoJumpIfNullConstant(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| Node* null_value = __ HeapConstant(isolate_->factory()->null_value());
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| __ JumpIfWordEqual(accumulator, null_value, relative_jump);
|
| @@ -1033,7 +1192,7 @@ void Interpreter::DoJumpIfUndefined(compiler::InterpreterAssembler* assembler) {
|
| Node* accumulator = __ GetAccumulator();
|
| Node* undefined_value =
|
| __ HeapConstant(isolate_->factory()->undefined_value());
|
| - Node* relative_jump = __ BytecodeOperandImm8(0);
|
| + Node* relative_jump = __ BytecodeOperandImm(0);
|
| __ JumpIfWordEqual(accumulator, undefined_value, relative_jump);
|
| }
|
|
|
| @@ -1047,7 +1206,7 @@ void Interpreter::DoJumpIfUndefinedConstant(
|
| Node* accumulator = __ GetAccumulator();
|
| Node* undefined_value =
|
| __ HeapConstant(isolate_->factory()->undefined_value());
|
| - Node* index = __ BytecodeOperandIdx8(0);
|
| + Node* index = __ BytecodeOperandIdx(0);
|
| Node* constant = __ LoadConstantPoolEntry(index);
|
| Node* relative_jump = __ SmiUntag(constant);
|
| __ JumpIfWordEqual(accumulator, undefined_value, relative_jump);
|
| @@ -1061,9 +1220,9 @@ void Interpreter::DoJumpIfUndefinedConstant(
|
| void Interpreter::DoCreateRegExpLiteral(
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* pattern = __ GetAccumulator();
|
| - Node* literal_index_raw = __ BytecodeOperandIdx8(0);
|
| + Node* literal_index_raw = __ BytecodeOperandIdx(0);
|
| Node* literal_index = __ SmiTag(literal_index_raw);
|
| - Node* flags_reg = __ BytecodeOperandReg8(1);
|
| + Node* flags_reg = __ BytecodeOperandReg(1);
|
| Node* flags = __ LoadRegister(flags_reg);
|
| Node* closure = __ LoadRegister(Register::function_closure());
|
| Node* literals_array =
|
| @@ -1078,9 +1237,9 @@ void Interpreter::DoCreateRegExpLiteral(
|
| void Interpreter::DoCreateLiteral(Runtime::FunctionId function_id,
|
| compiler::InterpreterAssembler* assembler) {
|
| Node* constant_elements = __ GetAccumulator();
|
| - Node* literal_index_raw = __ BytecodeOperandIdx8(0);
|
| + Node* literal_index_raw = __ BytecodeOperandIdx(0);
|
| Node* literal_index = __ SmiTag(literal_index_raw);
|
| - Node* flags_raw = __ BytecodeOperandImm8(1);
|
| + Node* flags_raw = __ BytecodeOperandImm(1);
|
| Node* flags = __ SmiTag(flags_raw);
|
| Node* closure = __ LoadRegister(Register::function_closure());
|
| Node* literals_array =
|
| @@ -1120,7 +1279,7 @@ void Interpreter::DoCreateClosure(compiler::InterpreterAssembler* assembler) {
|
| // TODO(rmcilroy): Possibly call FastNewClosureStub when possible instead of
|
| // calling into the runtime.
|
| Node* shared = __ GetAccumulator();
|
| - Node* tenured_raw = __ BytecodeOperandImm8(0);
|
| + Node* tenured_raw = __ BytecodeOperandImm(0);
|
| Node* tenured = __ SmiTag(tenured_raw);
|
| Node* result =
|
| __ CallRuntime(Runtime::kInterpreterNewClosure, shared, tenured);
|
| @@ -1177,7 +1336,7 @@ void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
|
| // Returns state for for..in loop execution based on the |receiver| and
|
| // the property names in the accumulator.
|
| void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) {
|
| - Node* receiver_reg = __ BytecodeOperandReg8(0);
|
| + Node* receiver_reg = __ BytecodeOperandReg(0);
|
| Node* receiver = __ LoadRegister(receiver_reg);
|
| Node* property_names = __ GetAccumulator();
|
| Node* result = __ CallRuntime(Runtime::kInterpreterForInPrepare, receiver,
|
| @@ -1193,12 +1352,12 @@ void Interpreter::DoForInPrepare(compiler::InterpreterAssembler* assembler) {
|
| // iteration is contained in |for_in_state| and |index| is the current
|
| // zero-based iteration count.
|
| void Interpreter::DoForInNext(compiler::InterpreterAssembler* assembler) {
|
| - Node* for_in_state_reg = __ BytecodeOperandReg8(0);
|
| + Node* for_in_state_reg = __ BytecodeOperandReg(0);
|
| Node* for_in_state = __ LoadRegister(for_in_state_reg);
|
| Node* receiver = __ LoadFixedArrayElement(for_in_state, 0);
|
| Node* cache_array = __ LoadFixedArrayElement(for_in_state, 1);
|
| Node* cache_type = __ LoadFixedArrayElement(for_in_state, 2);
|
| - Node* index_reg = __ BytecodeOperandReg8(1);
|
| + Node* index_reg = __ BytecodeOperandReg(1);
|
| Node* index = __ LoadRegister(index_reg);
|
| Node* result = __ CallRuntime(Runtime::kForInNext, receiver, cache_array,
|
| cache_type, index);
|
| @@ -1214,7 +1373,7 @@ void Interpreter::DoForInNext(compiler::InterpreterAssembler* assembler) {
|
| // earlier invocation of ForInPrepare.
|
| void Interpreter::DoForInDone(compiler::InterpreterAssembler* assembler) {
|
| Node* index = __ GetAccumulator();
|
| - Node* for_in_state_reg = __ BytecodeOperandReg8(0);
|
| + Node* for_in_state_reg = __ BytecodeOperandReg(0);
|
| Node* for_in_state = __ LoadRegister(for_in_state_reg);
|
| Node* cache_length = __ LoadFixedArrayElement(for_in_state, 3);
|
| Node* result = __ CallRuntime(Runtime::kForInDone, index, cache_length);
|
|
|