Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Unified Diff: src/interpreter/interpreter.cc

Issue 1410953003: [Interpreter] Adds delete operator to interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased the patch Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/interpreter.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index b139ab46b338f5ff7c44407c8739cf460ac32273..5d45fe3b2541670dc6f6d9e7d8c31222593e2274 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -644,6 +644,37 @@ void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) {
}
+void Interpreter::DoDelete(Runtime::FunctionId function_id,
+ compiler::InterpreterAssembler* assembler) {
+ Node* reg_index = __ BytecodeOperandReg8(0);
+ Node* object = __ LoadRegister(reg_index);
+ Node* key = __ GetAccumulator();
+ Node* result = __ CallRuntime(function_id, object, key);
+ __ SetAccumulator(result);
+ __ Dispatch();
+}
+
+
+// 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
« no previous file with comments | « src/interpreter/interpreter.h ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698