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

Side by Side Diff: src/interpreter/interpreter.cc

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: rebase and git cl format Created 4 years 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 <fstream> 7 #include <fstream>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 } 1665 }
1666 1666
1667 // DeletePropertySloppy 1667 // DeletePropertySloppy
1668 // 1668 //
1669 // Delete the property specified in the accumulator from the object 1669 // Delete the property specified in the accumulator from the object
1670 // referenced by the register operand following sloppy mode semantics. 1670 // referenced by the register operand following sloppy mode semantics.
1671 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { 1671 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) {
1672 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); 1672 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler);
1673 } 1673 }
1674 1674
1675 // GetSuperConstructor
1676 //
1677 // Get the super constructor from the object referenced by the accumulator.
1678 // The result is stored in register |reg|.
1679 void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) {
1680 Node* active_function = __ GetAccumulator();
1681 Node* context = __ GetContext();
1682 Node* result = __ GetSuperConstructor(active_function, context);
1683 Node* reg = __ BytecodeOperandReg(0);
1684 __ StoreRegister(result, reg);
1685 __ Dispatch();
1686 }
1687
1675 void Interpreter::DoJSCall(InterpreterAssembler* assembler, 1688 void Interpreter::DoJSCall(InterpreterAssembler* assembler,
1676 TailCallMode tail_call_mode) { 1689 TailCallMode tail_call_mode) {
1677 Node* function_reg = __ BytecodeOperandReg(0); 1690 Node* function_reg = __ BytecodeOperandReg(0);
1678 Node* function = __ LoadRegister(function_reg); 1691 Node* function = __ LoadRegister(function_reg);
1679 Node* receiver_reg = __ BytecodeOperandReg(1); 1692 Node* receiver_reg = __ BytecodeOperandReg(1);
1680 Node* receiver_arg = __ RegisterLocation(receiver_reg); 1693 Node* receiver_arg = __ RegisterLocation(receiver_reg);
1681 Node* receiver_args_count = __ BytecodeOperandCount(2); 1694 Node* receiver_args_count = __ BytecodeOperandCount(2);
1682 Node* receiver_count = __ Int32Constant(1); 1695 Node* receiver_count = __ Int32Constant(1);
1683 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); 1696 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count);
1684 Node* slot_id = __ BytecodeOperandIdx(3); 1697 Node* slot_id = __ BytecodeOperandIdx(3);
(...skipping 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2845 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2833 __ SmiTag(new_state)); 2846 __ SmiTag(new_state));
2834 __ SetAccumulator(old_state); 2847 __ SetAccumulator(old_state);
2835 2848
2836 __ Dispatch(); 2849 __ Dispatch();
2837 } 2850 }
2838 2851
2839 } // namespace interpreter 2852 } // namespace interpreter
2840 } // namespace internal 2853 } // namespace internal
2841 } // namespace v8 2854 } // namespace v8
OLDNEW
« src/builtins/builtins.h ('K') | « src/interpreter/bytecodes.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698