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

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

Issue 2755973002: [type profile] Collect return types. (Closed)
Patch Set: Use the source position. Created 3 years, 9 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 <array> 7 #include <array>
8 #include <fstream> 8 #include <fstream>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1039
1040 Node* feedback_vector = __ LoadFeedbackVector(); 1040 Node* feedback_vector = __ LoadFeedbackVector();
1041 Node* context = __ GetContext(); 1041 Node* context = __ GetContext();
1042 1042
1043 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name, 1043 __ CallRuntime(Runtime::kDefineDataPropertyInLiteral, context, object, name,
1044 value, flags, feedback_vector, vector_index); 1044 value, flags, feedback_vector, vector_index);
1045 __ Dispatch(); 1045 __ Dispatch();
1046 } 1046 }
1047 1047
1048 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) { 1048 void Interpreter::DoCollectTypeProfile(InterpreterAssembler* assembler) {
1049 Node* name = __ LoadRegister(__ BytecodeOperandReg(0)); 1049 Node* position = __ BytecodeOperandImmSmi(0);
1050 Node* value = __ GetAccumulator(); 1050 Node* value = __ GetAccumulator();
1051 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1)); 1051 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1));
1052 1052
1053 Node* feedback_vector = __ LoadFeedbackVector(); 1053 Node* feedback_vector = __ LoadFeedbackVector();
1054 Node* context = __ GetContext(); 1054 Node* context = __ GetContext();
1055 1055
1056 __ CallRuntime(Runtime::kCollectTypeProfile, context, name, value, 1056 __ CallRuntime(Runtime::kCollectTypeProfile, context, position, value,
1057 feedback_vector, vector_index); 1057 feedback_vector, vector_index);
1058 __ Dispatch(); 1058 __ Dispatch();
1059 } 1059 }
1060 1060
1061 // LdaModuleVariable <cell_index> <depth> 1061 // LdaModuleVariable <cell_index> <depth>
1062 // 1062 //
1063 // Load the contents of a module variable into the accumulator. The variable is 1063 // Load the contents of a module variable into the accumulator. The variable is
1064 // identified by <cell_index>. <depth> is the depth of the current context 1064 // identified by <cell_index>. <depth> is the depth of the current context
1065 // relative to the module context. 1065 // relative to the module context.
1066 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { 1066 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3610 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3611 __ SmiTag(new_state)); 3611 __ SmiTag(new_state));
3612 __ SetAccumulator(old_state); 3612 __ SetAccumulator(old_state);
3613 3613
3614 __ Dispatch(); 3614 __ Dispatch();
3615 } 3615 }
3616 3616
3617 } // namespace interpreter 3617 } // namespace interpreter
3618 } // namespace internal 3618 } // namespace internal
3619 } // namespace v8 3619 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698