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

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

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: rebase 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
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 } 1668 }
1669 1669
1670 // DeletePropertySloppy 1670 // DeletePropertySloppy
1671 // 1671 //
1672 // Delete the property specified in the accumulator from the object 1672 // Delete the property specified in the accumulator from the object
1673 // referenced by the register operand following sloppy mode semantics. 1673 // referenced by the register operand following sloppy mode semantics.
1674 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { 1674 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) {
1675 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); 1675 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler);
1676 } 1676 }
1677 1677
1678 // GetSuperConstructor
1679 //
1680 // Get the super constructor from the object referenced by the accumulator.
1681 // The result is stored in register |reg|.
1682 void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) {
1683 Node* active_function = __ GetAccumulator();
1684 Node* context = __ GetContext();
1685 Node* result = __ GetSuperConstructor(active_function, context);
1686 Node* reg = __ BytecodeOperandReg(0);
1687 __ StoreRegister(result, reg);
1688 __ Dispatch();
1689 }
1690
1678 void Interpreter::DoJSCall(InterpreterAssembler* assembler, 1691 void Interpreter::DoJSCall(InterpreterAssembler* assembler,
1679 TailCallMode tail_call_mode) { 1692 TailCallMode tail_call_mode) {
1680 Node* function_reg = __ BytecodeOperandReg(0); 1693 Node* function_reg = __ BytecodeOperandReg(0);
1681 Node* function = __ LoadRegister(function_reg); 1694 Node* function = __ LoadRegister(function_reg);
1682 Node* receiver_reg = __ BytecodeOperandReg(1); 1695 Node* receiver_reg = __ BytecodeOperandReg(1);
1683 Node* receiver_arg = __ RegisterLocation(receiver_reg); 1696 Node* receiver_arg = __ RegisterLocation(receiver_reg);
1684 Node* receiver_args_count = __ BytecodeOperandCount(2); 1697 Node* receiver_args_count = __ BytecodeOperandCount(2);
1685 Node* receiver_count = __ Int32Constant(1); 1698 Node* receiver_count = __ Int32Constant(1);
1686 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); 1699 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count);
1687 Node* slot_id = __ BytecodeOperandIdx(3); 1700 Node* slot_id = __ BytecodeOperandIdx(3);
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2895 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2883 __ SmiTag(new_state)); 2896 __ SmiTag(new_state));
2884 __ SetAccumulator(old_state); 2897 __ SetAccumulator(old_state);
2885 2898
2886 __ Dispatch(); 2899 __ Dispatch();
2887 } 2900 }
2888 2901
2889 } // namespace interpreter 2902 } // namespace interpreter
2890 } // namespace internal 2903 } // namespace internal
2891 } // namespace v8 2904 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698