| Index: src/interpreter/interpreter.cc | 
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc | 
| index 5d45fe3b2541670dc6f6d9e7d8c31222593e2274..ce884a1f5e0b96a3f112a8772766744338933285 100644 | 
| --- a/src/interpreter/interpreter.cc | 
| +++ b/src/interpreter/interpreter.cc | 
| @@ -847,6 +847,17 @@ void Interpreter::DoToNumber(compiler::InterpreterAssembler* assembler) { | 
| } | 
|  | 
|  | 
| +// ToObject | 
| +// | 
| +// Cast the object referenced by the accumulator to a JSObject. | 
| +void Interpreter::DoToObject(compiler::InterpreterAssembler* assembler) { | 
| +  Node* accumulator = __ GetAccumulator(); | 
| +  Node* result = __ CallRuntime(Runtime::kToObject, accumulator); | 
| +  __ SetAccumulator(result); | 
| +  __ Dispatch(); | 
| +} | 
| + | 
| + | 
| // Jump <imm8> | 
| // | 
| // Jump by number of bytes represented by the immediate operand |imm8|. | 
| @@ -987,6 +998,60 @@ void Interpreter::DoJumpIfToBooleanFalseConstant( | 
| } | 
|  | 
|  | 
| +// JumpIfNull <imm8> | 
| +// | 
| +// Jump by number of bytes represented by an immediate operand if the object | 
| +// referenced by the accumulator is the null constant. | 
| +void Interpreter::DoJumpIfNull(compiler::InterpreterAssembler* assembler) { | 
| +  Node* accumulator = __ GetAccumulator(); | 
| +  Node* null_value = __ NullConstant(); | 
| +  Node* relative_jump = __ BytecodeOperandImm8(0); | 
| +  __ JumpIfWordEqual(accumulator, null_value, relative_jump); | 
| +} | 
| + | 
| + | 
| +// JumpIfNullConstant <idx> | 
| +// | 
| +// 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( | 
| +    compiler::InterpreterAssembler* assembler) { | 
| +  Node* accumulator = __ GetAccumulator(); | 
| +  Node* null_value = __ NullConstant(); | 
| +  Node* index = __ BytecodeOperandIdx8(0); | 
| +  Node* constant = __ LoadConstantPoolEntry(index); | 
| +  Node* relative_jump = __ SmiUntag(constant); | 
| +  __ JumpIfWordEqual(accumulator, null_value, relative_jump); | 
| +} | 
| + | 
| + | 
| +// JumpIfUndefined <imm8> | 
| +// | 
| +// Jump by number of bytes represented by an immediate operand if the object | 
| +// referenced by the accumulator is the undefined constant. | 
| +void Interpreter::DoJumpIfUndefined(compiler::InterpreterAssembler* assembler) { | 
| +  Node* accumulator = __ GetAccumulator(); | 
| +  Node* undefined_value = __ UndefinedConstant(); | 
| +  Node* relative_jump = __ BytecodeOperandImm8(0); | 
| +  __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); | 
| +} | 
| + | 
| + | 
| +// JumpIfUndefinedConstant <idx> | 
| +// | 
| +// 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( | 
| +    compiler::InterpreterAssembler* assembler) { | 
| +  Node* accumulator = __ GetAccumulator(); | 
| +  Node* undefined_value = __ UndefinedConstant(); | 
| +  Node* index = __ BytecodeOperandIdx8(0); | 
| +  Node* constant = __ LoadConstantPoolEntry(index); | 
| +  Node* relative_jump = __ SmiUntag(constant); | 
| +  __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); | 
| +} | 
| + | 
| + | 
| // CreateRegExpLiteral <idx> <flags_reg> | 
| // | 
| // Creates a regular expression literal for literal index <idx> with flags held | 
| @@ -1105,6 +1170,56 @@ void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { | 
| } | 
|  | 
|  | 
| +// ForInPrepare <receiver> | 
| +// | 
| +// 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 = __ LoadRegister(receiver_reg); | 
| +  Node* property_names = __ GetAccumulator(); | 
| +  Node* result = __ CallRuntime(Runtime::kInterpreterForInPrepare, receiver, | 
| +                                property_names); | 
| +  __ SetAccumulator(result); | 
| +  __ Dispatch(); | 
| +} | 
| + | 
| + | 
| +// ForInNext <for_in_state> | 
| +// | 
| +// Returns the next key in a for..in loop. The accumulator contains the current | 
| +// zero-based iteration count and <for_in_state> is the state returned by | 
| +// earlier invocation of ForInPrepare. | 
| +void Interpreter::DoForInNext(compiler::InterpreterAssembler* assembler) { | 
| +  Node* index = __ GetAccumulator(); | 
| +  Node* for_in_state_reg = __ BytecodeOperandReg8(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* result = __ CallRuntime(Runtime::kForInNext, receiver, cache_array, | 
| +                                cache_type, index); | 
| +  __ SetAccumulator(result); | 
| +  __ Dispatch(); | 
| +} | 
| + | 
| + | 
| +// ForInDone <for_in_state> | 
| +// | 
| +// Returns the next key in a for..in loop. The accumulator contains the current | 
| +// zero-based iteration count and <for_in_state> is the state returned by | 
| +// earlier invocation of ForInPrepare. | 
| +void Interpreter::DoForInDone(compiler::InterpreterAssembler* assembler) { | 
| +  Node* index = __ GetAccumulator(); | 
| +  Node* for_in_state_reg = __ BytecodeOperandReg8(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); | 
| +  __ SetAccumulator(result); | 
| +  __ Dispatch(); | 
| +} | 
| + | 
| + | 
| }  // namespace interpreter | 
| }  // namespace internal | 
| }  // namespace v8 | 
|  |