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

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: Incorporate mstarzinger's comments on patch set 1. 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 // 834 //
835 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 835 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
836 // and the key <key> with the value in the accumulator. 836 // and the key <key> with the value in the accumulator.
837 void Interpreter::DoKeyedStoreICStrictWide( 837 void Interpreter::DoKeyedStoreICStrictWide(
838 compiler::InterpreterAssembler* assembler) { 838 compiler::InterpreterAssembler* assembler) {
839 Callable ic = 839 Callable ic =
840 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); 840 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
841 DoKeyedStoreIC(ic, assembler); 841 DoKeyedStoreIC(ic, assembler);
842 } 842 }
843 843
844 // LdaInitialMap
845 //
846 // Loads the prototype or initial map of the JSFunction referenced by
847 // the accumulator. The result is placed in the accumulator.
848 void Interpreter::DoLdaInitialMap(compiler::InterpreterAssembler* assembler) {
849 Node* js_function = __ GetAccumulator();
850 Node* initial_map =
851 __ LoadObjectField(js_function, JSFunction::kPrototypeOrInitialMapOffset);
852 __ SetAccumulator(initial_map);
853 __ Dispatch();
854 }
844 855
845 // PushContext <context> 856 // PushContext <context>
846 // 857 //
847 // Saves the current context in <context>, and pushes the accumulator as the 858 // Saves the current context in <context>, and pushes the accumulator as the
848 // new current context. 859 // new current context.
849 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { 860 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
850 Node* reg_index = __ BytecodeOperandReg(0); 861 Node* reg_index = __ BytecodeOperandReg(0);
851 Node* new_context = __ GetAccumulator(); 862 Node* new_context = __ GetAccumulator();
852 Node* old_context = __ GetContext(); 863 Node* old_context = __ GetContext();
853 __ StoreRegister(old_context, reg_index); 864 __ StoreRegister(old_context, reg_index);
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 Node* index_reg = __ BytecodeOperandReg(0); 1921 Node* index_reg = __ BytecodeOperandReg(0);
1911 Node* index = __ LoadRegister(index_reg); 1922 Node* index = __ LoadRegister(index_reg);
1912 Node* result = __ CallRuntime(Runtime::kForInStep, index); 1923 Node* result = __ CallRuntime(Runtime::kForInStep, index);
1913 __ SetAccumulator(result); 1924 __ SetAccumulator(result);
1914 __ Dispatch(); 1925 __ Dispatch();
1915 } 1926 }
1916 1927
1917 } // namespace interpreter 1928 } // namespace interpreter
1918 } // namespace internal 1929 } // namespace internal
1919 } // namespace v8 1930 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698