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

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

Issue 2587393006: [runtime] Collect IC feedback in DefineDataPropertyInLiteral. (Closed)
Patch Set: Minor clean ups, implement print and clear methods. 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
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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 811
812 // StaKeyedPropertyStrict <object> <key> <slot> 812 // StaKeyedPropertyStrict <object> <key> <slot>
813 // 813 //
814 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object> 814 // Calls the strict mode KeyStoreIC at FeedBackVector slot <slot> for <object>
815 // and the key <key> with the value in the accumulator. 815 // and the key <key> with the value in the accumulator.
816 void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) { 816 void Interpreter::DoStaKeyedPropertyStrict(InterpreterAssembler* assembler) {
817 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT); 817 Callable ic = CodeFactory::KeyedStoreICInOptimizedCode(isolate_, STRICT);
818 DoKeyedStoreIC(ic, assembler); 818 DoKeyedStoreIC(ic, assembler);
819 } 819 }
820 820
821 // StaDataPropertyInLiteral <object> <name> <value> <flags> 821 // StaDataPropertyInLiteral <object> <name> <flags>
822 // 822 //
823 // Define a property <name> with value <value> in <object>. Property attributes 823 // Define a property <name> with value from the accumulator in <object>.
824 // and whether set_function_name are stored in DataPropertyInLiteralFlags 824 // Property attributes and whether set_function_name are stored in
825 // <flags>. 825 // DataPropertyInLiteralFlags <flags>.
826 // 826 //
827 // This definition is not observable and is used only for definitions 827 // This definition is not observable and is used only for definitions
828 // in object or class literals. 828 // in object or class literals.
829 void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) { 829 void Interpreter::DoStaDataPropertyInLiteral(InterpreterAssembler* assembler) {
830 Node* object_reg_index = __ BytecodeOperandReg(0); 830 Node* object = __ LoadRegister(__ BytecodeOperandReg(0));
831 Node* object = __ LoadRegister(object_reg_index); 831 Node* name = __ LoadRegister(__ BytecodeOperandReg(1));
832 Node* name_reg_index = __ BytecodeOperandReg(1); 832 Node* value = __ GetAccumulator();
833 Node* name = __ LoadRegister(name_reg_index); 833 Node* flags = __ SmiFromWord32(__ BytecodeOperandFlag(2));
834 Node* value_reg_index = __ BytecodeOperandReg(2); 834 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3));
835 Node* value = __ LoadRegister(value_reg_index);
836 Node* flags = __ SmiFromWord32(__ BytecodeOperandFlag(3));
837 835
836 Node* type_feedback_vector = __ LoadTypeFeedbackVector();
838 Node* context = __ GetContext(); 837 Node* context = __ GetContext();
839 838
840 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, 839 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name,
841 value, flags); 840 value, flags, type_feedback_vector, vector_index);
842 __ Dispatch(); 841 __ Dispatch();
843 } 842 }
844 843
845 // LdaModuleVariable <cell_index> <depth> 844 // LdaModuleVariable <cell_index> <depth>
846 // 845 //
847 // Load the contents of a module variable into the accumulator. The variable is 846 // Load the contents of a module variable into the accumulator. The variable is
848 // identified by <cell_index>. <depth> is the depth of the current context 847 // identified by <cell_index>. <depth> is the depth of the current context
849 // relative to the module context. 848 // relative to the module context.
850 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { 849 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
851 Node* cell_index = __ BytecodeOperandImmIntPtr(0); 850 Node* cell_index = __ BytecodeOperandImmIntPtr(0);
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3208 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3210 __ SmiTag(new_state)); 3209 __ SmiTag(new_state));
3211 __ SetAccumulator(old_state); 3210 __ SetAccumulator(old_state);
3212 3211
3213 __ Dispatch(); 3212 __ Dispatch();
3214 } 3213 }
3215 3214
3216 } // namespace interpreter 3215 } // namespace interpreter
3217 } // namespace internal 3216 } // namespace internal
3218 } // namespace v8 3217 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698