Chromium Code Reviews| Index: src/interpreter/interpreter.cc |
| diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
| index f3f6be8a49a78b68b3547de3aa82cd8278d2c9c9..02a58a1284106dffdc9c4ae67a423f191195307f 100644 |
| --- a/src/interpreter/interpreter.cc |
| +++ b/src/interpreter/interpreter.cc |
| @@ -493,6 +493,17 @@ void Interpreter::DoBinaryOp(Runtime::FunctionId function_id, |
| } |
| +void Interpreter::DoDelete(Runtime::FunctionId function_id, |
| + compiler::InterpreterAssembler* assembler) { |
|
rmcilroy
2015/10/26 14:31:07
indentation
mythria
2015/10/27 10:50:48
Done.
|
| + Node* reg_index = __ BytecodeOperandReg8(0); |
| + Node* object = __ LoadRegister(reg_index); |
| + Node* key = __ GetAccumulator(); |
| + Node* result = __ CallRuntime(function_id, object, key); |
| + __ SetAccumulator(result); |
| + __ Dispatch(); |
| +} |
|
rmcilroy
2015/10/26 14:31:07
nit - move this to be directly above DeletePropert
mythria
2015/10/27 10:50:48
Done.
|
| + |
| + |
| // Add <src> |
| // |
| // Add register <src> to accumulator. |
| @@ -641,6 +652,26 @@ void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) { |
| } |
| +// DeletePropertyStrict |
| +// |
| +// Delete the property specified in the accumulator from the object |
| +// referenced by the register operand following strict mode semantics. |
| +void Interpreter::DoDeletePropertyStrict( |
| + compiler::InterpreterAssembler* assembler) { |
| + DoDelete(Runtime::kDeleteProperty_Strict, assembler); |
| +} |
| + |
| + |
| +// DeletePropertySloppy |
| +// |
| +// Delete the property specified in the accumulator from the object |
| +// referenced by the register operand following sloppy mode semantics. |
| +void Interpreter::DoDeletePropertySloppy( |
| + compiler::InterpreterAssembler* assembler) { |
| + DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); |
| +} |
| + |
| + |
| // Call <callable> <receiver> <arg_count> |
| // |
| // Call a JSfunction or Callable in |callable| with the |receiver| and |