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

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

Issue 1666943003: [interpreter] Support for ES6 class literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/ast/prettyprinter.h" 7 #include "src/ast/prettyprinter.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/interpreter-assembler.h" 10 #include "src/compiler/interpreter-assembler.h"
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 // 835 //
836 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 836 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
837 // and the key <key> with the value in the accumulator. 837 // and the key <key> with the value in the accumulator.
838 void Interpreter::DoKeyedStoreICStrictWide( 838 void Interpreter::DoKeyedStoreICStrictWide(
839 compiler::InterpreterAssembler* assembler) { 839 compiler::InterpreterAssembler* assembler) {
840 Callable ic = 840 Callable ic =
841 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); 841 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
842 DoKeyedStoreIC(ic, assembler); 842 DoKeyedStoreIC(ic, assembler);
843 } 843 }
844 844
845 // LdaInitialMap
846 //
847 // Looks up the prototype or initial map of the JSFunction referenced
Michael Starzinger 2016/02/04 13:40:20 nit: s/Looks up/Loads/
oth 2016/02/04 14:00:59 Done.
848 // by the accumulator. The result is placed in the accumulator.
849 void Interpreter::DoLdaInitialMap(compiler::InterpreterAssembler* assembler) {
850 Node* js_function = __ GetAccumulator();
851 Node* initial_map =
852 __ LoadObjectField(js_function, JSFunction::kPrototypeOrInitialMapOffset);
853 __ SetAccumulator(initial_map);
854 __ Dispatch();
855 }
845 856
846 // PushContext <context> 857 // PushContext <context>
847 // 858 //
848 // Saves the current context in <context>, and pushes the accumulator as the 859 // Saves the current context in <context>, and pushes the accumulator as the
849 // new current context. 860 // new current context.
850 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { 861 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
851 Node* reg_index = __ BytecodeOperandReg(0); 862 Node* reg_index = __ BytecodeOperandReg(0);
852 Node* new_context = __ GetAccumulator(); 863 Node* new_context = __ GetAccumulator();
853 Node* old_context = __ GetContext(); 864 Node* old_context = __ GetContext();
854 __ StoreRegister(old_context, reg_index); 865 __ StoreRegister(old_context, reg_index);
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 Node* index_reg = __ BytecodeOperandReg(0); 1914 Node* index_reg = __ BytecodeOperandReg(0);
1904 Node* index = __ LoadRegister(index_reg); 1915 Node* index = __ LoadRegister(index_reg);
1905 Node* result = __ CallRuntime(Runtime::kForInStep, index); 1916 Node* result = __ CallRuntime(Runtime::kForInStep, index);
1906 __ SetAccumulator(result); 1917 __ SetAccumulator(result);
1907 __ Dispatch(); 1918 __ Dispatch();
1908 } 1919 }
1909 1920
1910 } // namespace interpreter 1921 } // namespace interpreter
1911 } // namespace internal 1922 } // namespace internal
1912 } // namespace v8 1923 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698