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

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

Issue 1678103002: [interpreter] Remove special "prototype" load in 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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 // 822 //
823 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 823 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
824 // and the key <key> with the value in the accumulator. 824 // and the key <key> with the value in the accumulator.
825 void Interpreter::DoKeyedStoreICStrictWide( 825 void Interpreter::DoKeyedStoreICStrictWide(
826 compiler::InterpreterAssembler* assembler) { 826 compiler::InterpreterAssembler* assembler) {
827 Callable ic = 827 Callable ic =
828 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED); 828 CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT, UNINITIALIZED);
829 DoKeyedStoreIC(ic, assembler); 829 DoKeyedStoreIC(ic, assembler);
830 } 830 }
831 831
832 // LdaInitialMap
833 //
834 // Loads the prototype or initial map of the JSFunction referenced by
835 // the accumulator. The result is placed in the accumulator.
836 void Interpreter::DoLdaInitialMap(compiler::InterpreterAssembler* assembler) {
837 Node* js_function = __ GetAccumulator();
838 Node* initial_map =
839 __ LoadObjectField(js_function, JSFunction::kPrototypeOrInitialMapOffset);
840 __ SetAccumulator(initial_map);
841 __ Dispatch();
842 }
843
844 // PushContext <context> 832 // PushContext <context>
845 // 833 //
846 // Saves the current context in <context>, and pushes the accumulator as the 834 // Saves the current context in <context>, and pushes the accumulator as the
847 // new current context. 835 // new current context.
848 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) { 836 void Interpreter::DoPushContext(compiler::InterpreterAssembler* assembler) {
849 Node* reg_index = __ BytecodeOperandReg(0); 837 Node* reg_index = __ BytecodeOperandReg(0);
850 Node* new_context = __ GetAccumulator(); 838 Node* new_context = __ GetAccumulator();
851 Node* old_context = __ GetContext(); 839 Node* old_context = __ GetContext();
852 __ StoreRegister(old_context, reg_index); 840 __ StoreRegister(old_context, reg_index);
853 __ SetContext(new_context); 841 __ SetContext(new_context);
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 Node* index_reg = __ BytecodeOperandReg(0); 1902 Node* index_reg = __ BytecodeOperandReg(0);
1915 Node* index = __ LoadRegister(index_reg); 1903 Node* index = __ LoadRegister(index_reg);
1916 Node* result = __ CallRuntime(Runtime::kForInStep, index); 1904 Node* result = __ CallRuntime(Runtime::kForInStep, index);
1917 __ SetAccumulator(result); 1905 __ SetAccumulator(result);
1918 __ Dispatch(); 1906 __ Dispatch();
1919 } 1907 }
1920 1908
1921 } // namespace interpreter 1909 } // namespace interpreter
1922 } // namespace internal 1910 } // namespace internal
1923 } // namespace v8 1911 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698