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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter.h" 5 #include "src/interpreter/interpreter.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/interpreter-assembler.h" 9 #include "src/compiler/interpreter-assembler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // Load the accumulator with the string representating type of the 525 // Load the accumulator with the string representating type of the
526 // object in the accumulator. 526 // object in the accumulator.
527 void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) { 527 void Interpreter::DoTypeOf(compiler::InterpreterAssembler* assembler) {
528 Node* accumulator = __ GetAccumulator(); 528 Node* accumulator = __ GetAccumulator();
529 Node* result = __ CallRuntime(Runtime::kInterpreterTypeOf, accumulator); 529 Node* result = __ CallRuntime(Runtime::kInterpreterTypeOf, accumulator);
530 __ SetAccumulator(result); 530 __ SetAccumulator(result);
531 __ Dispatch(); 531 __ Dispatch();
532 } 532 }
533 533
534 534
535 // DeletePropertyStrict
536 //
537 // Delete the property specified in the accumulator from the object
538 // referenced by the register operand following strict mode semantics.
539 void Interpreter::DoDeletePropertyStrict(
540 compiler::InterpreterAssembler* assembler) {
541 DoBinaryOp(Runtime::kDeleteProperty_Strict, assembler);
rmcilroy 2015/10/21 14:52:54 Hmm, this isn't really a binary op, and when binar
mythria 2015/10/23 14:48:01 Done.
542 }
543
544
545 // DeletePropertySloppy
546 //
547 // Delete the property specified in the accumulator from the object
548 // referenced by the register operand following sloppy mode semantics.
549 void Interpreter::DoDeletePropertySloppy(
550 compiler::InterpreterAssembler* assembler) {
551 DoBinaryOp(Runtime::kDeleteProperty_Sloppy, assembler);
552 }
553
554
535 // Call <callable> <receiver> <arg_count> 555 // Call <callable> <receiver> <arg_count>
536 // 556 //
537 // Call a JSfunction or Callable in |callable| with the |receiver| and 557 // Call a JSfunction or Callable in |callable| with the |receiver| and
538 // |arg_count| arguments in subsequent registers. 558 // |arg_count| arguments in subsequent registers.
539 void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) { 559 void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) {
540 Node* function_reg = __ BytecodeOperandReg8(0); 560 Node* function_reg = __ BytecodeOperandReg8(0);
541 Node* function = __ LoadRegister(function_reg); 561 Node* function = __ LoadRegister(function_reg);
542 Node* receiver_reg = __ BytecodeOperandReg8(1); 562 Node* receiver_reg = __ BytecodeOperandReg8(1);
543 Node* first_arg = __ RegisterLocation(receiver_reg); 563 Node* first_arg = __ RegisterLocation(receiver_reg);
544 Node* args_count = __ BytecodeOperandCount8(2); 564 Node* args_count = __ BytecodeOperandCount8(2);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 // 932 //
913 // Return the value in the accumulator. 933 // Return the value in the accumulator.
914 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) { 934 void Interpreter::DoReturn(compiler::InterpreterAssembler* assembler) {
915 __ Return(); 935 __ Return();
916 } 936 }
917 937
918 938
919 } // namespace interpreter 939 } // namespace interpreter
920 } // namespace internal 940 } // namespace internal
921 } // namespace v8 941 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698