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

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

Issue 2755973002: [type profile] Collect return types. (Closed)
Patch Set: Clean up. 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 = __ LoadRegister(__ BytecodeOperandReg(0));
1050 Node* name = __ LoadRegister(__ BytecodeOperandReg(1));
1051
1050 Node* value = __ GetAccumulator(); 1052 Node* value = __ GetAccumulator();
1051 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(1)); 1053 Node* vector_index = __ SmiTag(__ BytecodeOperandIdx(2));
1052 1054
1053 Node* feedback_vector = __ LoadFeedbackVector(); 1055 Node* feedback_vector = __ LoadFeedbackVector();
1054 Node* context = __ GetContext(); 1056 Node* context = __ GetContext();
1055 1057
1056 __ CallRuntime(Runtime::kCollectTypeProfile, context, name, value, 1058 __ CallRuntime(Runtime::kCollectTypeProfile, context, position, name, value,
1057 feedback_vector, vector_index); 1059 feedback_vector, vector_index);
1058 __ Dispatch(); 1060 __ Dispatch();
1059 } 1061 }
1060 1062
1061 // LdaModuleVariable <cell_index> <depth> 1063 // LdaModuleVariable <cell_index> <depth>
1062 // 1064 //
1063 // Load the contents of a module variable into the accumulator. The variable is 1065 // 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 1066 // identified by <cell_index>. <depth> is the depth of the current context
1065 // relative to the module context. 1067 // relative to the module context.
1066 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { 1068 void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, 3612 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset,
3611 __ SmiTag(new_state)); 3613 __ SmiTag(new_state));
3612 __ SetAccumulator(old_state); 3614 __ SetAccumulator(old_state);
3613 3615
3614 __ Dispatch(); 3616 __ Dispatch();
3615 } 3617 }
3616 3618
3617 } // namespace interpreter 3619 } // namespace interpreter
3618 } // namespace internal 3620 } // namespace internal
3619 } // namespace v8 3621 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698