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

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

Issue 2587393006: [runtime] Collect IC feedback in DefineDataPropertyInLiteral. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/objects-printer.cc » ('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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 854
855 // StaKeyedPropertyStrict <object> <key> <slot> 855 // StaKeyedPropertyStrict <object> <key> <slot>
856 // 856 //
857 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 857 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
858 // and the key <key> with the value in the accumulator. 858 // and the key <key> with the value in the accumulator.
859 void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) { 859 void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) {
860 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT); 860 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT);
861 DoKeyedStoreIC(ic, assembler); 861 DoKeyedStoreIC(ic, assembler);
862 } 862 }
863 863
864 // StaDataPropertyInLiteral <object> <name> <value> <flags> 864 // StaDataPropertyInLiteral <object> <name> <flags>
865 // 865 //
866 // Define a property <name> with value <value> in <object>. Property attributes 866 // Define a property <name> with value from the accumulator in <object>.
867 // and whether set_function_name are stored in DataPropertyInLiteralFlags 867 // Property attributes and whether set_function_name are stored in
868 // <flags>. 868 // DataPropertyInLiteralFlags <flags>.
869 // 869 //
870 // This definition is not observable and is used only for definitions 870 // This definition is not observable and is used only for definitions
871 // in object or class literals. 871 // in object or class literals.
872 void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) { 872 void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) {
873 Node* object_reg_index = __ BytecodeOperandReg(0); 873 Node* object = __ LoadRegister(__ BytecodeOperandReg(0));
874 Node* object = __ LoadRegister(object_reg_index); 874 Node* name = __ LoadRegister(__ BytecodeOperandReg(1));
875 Node* name_reg_index = __ BytecodeOperandReg(1); 875 Node* value = __ GetAccumulator();
876 Node* name = __ LoadRegister(name_reg_index); 876 Node* flags = __ SmiFromWord32(__ BytecodeOperandFlag(2));
877 Node* value_reg_index = __ BytecodeOperandReg(2); 877 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3));
878 Node* value = __ LoadRegister(value_reg_index);
879 Node* flags = __ SmiFromWord32(__ BytecodeOperandFlag(3));
880 878
879 Node* type_feedback_vector = __ LoadTypeFeedbackVector();
881 Node* context = __ GetContext(); 880 Node* context = __ GetContext();
882 881
883 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, 882 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name,
884 value, flags); 883 value, flags, type_feedback_vector, vector_index);
885 __ Dispatch(); 884 __ Dispatch();
886 } 885 }
887 886
888 // LdaModuleVariable <cell_index> <depth> 887 // LdaModuleVariable <cell_index> <depth>
889 // 888 //
890 // Load the contents of a module variable into the accumulator. The variable is 889 // Load the contents of a module variable into the accumulator. The variable is
891 // identified by <cell_index>. <depth> is the depth of the current context 890 // identified by <cell_index>. <depth> is the depth of the current context
892 // relative to the module context. 891 // relative to the module context.
893 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { 892 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
894 Node* cell_index = __ BytecodeOperandImmIntPtr(0); 893 Node* cell_index = __ BytecodeOperandImmIntPtr(0);
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3251 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3253 __ SmiTag(new_state)); 3252 __ SmiTag(new_state));
3254 __ SetAccumulator(old_state); 3253 __ SetAccumulator(old_state);
3255 3254
3256 __ Dispatch(); 3255 __ Dispatch();
3257 } 3256 }
3258 3257
3259 } // namespace interpreter 3258 } // namespace interpreter
3260 } // namespace internal 3259 } // namespace internal
3261 } // namespace v8 3260 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698