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

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

Issue 2677163003: WIP: type profiling. (Closed)
Patch Set: Rebaseline. Created 3 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
« 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3)); 960 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(3));
961 961
962 Node* feedback_vector = __ LoadFeedbackVector(); 962 Node* feedback_vector = __ LoadFeedbackVector();
963 Node* context = __ GetContext(); 963 Node* context = __ GetContext();
964 964
965 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, 965 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name,
966 value, flags, feedback_vector, vector_index); 966 value, flags, feedback_vector, vector_index);
967 __ Dispatch(); 967 __ Dispatch();
968 } 968 }
969 969
970 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) {
971 Node* name = __ LoadRegister(__ BytecodeOperandReg(0));
972 Node* value = __ LoadRegister(__ BytecodeOperandReg(1));
973 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(2));
974
975 Node* feedback_vector = __ LoadFeedbackVector();
976 Node* context = __ GetContext();
977
978 __ CallRuntime(Runtime::kStoreTypeInformation, context, name, value,
979 feedback_vector, vector_index);
980 __ Dispatch();
981 }
982
970 // LdaModuleVariable <cell_index> <depth> 983 // LdaModuleVariable <cell_index> <depth>
971 // 984 //
972 // Load the contents of a module variable into the accumulator. The variable is 985 // Load the contents of a module variable into the accumulator. The variable is
973 // identified by <cell_index>. <depth> is the depth of the current context 986 // identified by <cell_index>. <depth> is the depth of the current context
974 // relative to the module context. 987 // relative to the module context.
975 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { 988 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
976 Node* cell_index = __ BytecodeOperandImmIntPtr(0); 989 Node* cell_index = __ BytecodeOperandImmIntPtr(0);
977 Node* depth = __ BytecodeOperandUImm(1); 990 Node* depth = __ BytecodeOperandUImm(1);
978 991
979 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth); 992 Node* module_context = __ GetContextAtDepth(__ GetContext(), depth);
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
3365 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3378 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3366 __ SmiTag(new_state)); 3379 __ SmiTag(new_state));
3367 __ SetAccumulator(old_state); 3380 __ SetAccumulator(old_state);
3368 3381
3369 __ Dispatch(); 3382 __ Dispatch();
3370 } 3383 }
3371 3384
3372 } // namespace interpreter 3385 } // namespace interpreter
3373 } // namespace internal 3386 } // namespace internal
3374 } // namespace v8 3387 } // 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