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

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

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Fix IsNull call 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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 } 1688 }
1689 1689
1690 // DeletePropertySloppy 1690 // DeletePropertySloppy
1691 // 1691 //
1692 // Delete the property specified in the accumulator from the object 1692 // Delete the property specified in the accumulator from the object
1693 // referenced by the register operand following sloppy mode semantics. 1693 // referenced by the register operand following sloppy mode semantics.
1694 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) { 1694 void Interpreter::DoDeletePropertySloppy(InterpreterAssembler* assembler) {
1695 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler); 1695 DoDelete(Runtime::kDeleteProperty_Sloppy, assembler);
1696 } 1696 }
1697 1697
1698 // GetSuperConstructor
1699 //
1700 // Get the super constructor from the object referenced by the accumulator.
1701 // The result is stored in register |reg|.
1702 void Interpreter::DoGetSuperConstructor(InterpreterAssembler* assembler) {
1703 Node* active_function = __ GetAccumulator();
1704 Node* context = __ GetContext();
1705 Node* result = __ GetSuperConstructor(active_function, context);
1706 Node* reg = __ BytecodeOperandReg(0);
1707 __ StoreRegister(result, reg);
1708 __ Dispatch();
1709 }
1710
1698 void Interpreter::DoJSCall(InterpreterAssembler* assembler, 1711 void Interpreter::DoJSCall(InterpreterAssembler* assembler,
1699 TailCallMode tail_call_mode) { 1712 TailCallMode tail_call_mode) {
1700 Node* function_reg = __ BytecodeOperandReg(0); 1713 Node* function_reg = __ BytecodeOperandReg(0);
1701 Node* function = __ LoadRegister(function_reg); 1714 Node* function = __ LoadRegister(function_reg);
1702 Node* receiver_reg = __ BytecodeOperandReg(1); 1715 Node* receiver_reg = __ BytecodeOperandReg(1);
1703 Node* receiver_arg = __ RegisterLocation(receiver_reg); 1716 Node* receiver_arg = __ RegisterLocation(receiver_reg);
1704 Node* receiver_args_count = __ BytecodeOperandCount(2); 1717 Node* receiver_args_count = __ BytecodeOperandCount(2);
1705 Node* receiver_count = __ Int32Constant(1); 1718 Node* receiver_count = __ Int32Constant(1);
1706 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count); 1719 Node* args_count = __ Int32Sub(receiver_args_count, receiver_count);
1707 Node* slot_id = __ BytecodeOperandIdx(3); 1720 Node* slot_id = __ BytecodeOperandIdx(3);
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 2869 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
2857 __ SmiTag(new_state)); 2870 __ SmiTag(new_state));
2858 __ SetAccumulator(old_state); 2871 __ SetAccumulator(old_state);
2859 2872
2860 __ Dispatch(); 2873 __ Dispatch();
2861 } 2874 }
2862 2875
2863 } // namespace interpreter 2876 } // namespace interpreter
2864 } // namespace internal 2877 } // namespace internal
2865 } // namespace v8 2878 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/messages.h » ('j') | src/messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698