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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 2122183002: [Interpreter] Collect type feedback for calls in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updated cctest.status Created 4 years, 5 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 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Push the context in accumulator as the new context, and store in register 145 // Push the context in accumulator as the new context, and store in register
146 // |context|. 146 // |context|.
147 BytecodeArrayBuilder& PushContext(Register context); 147 BytecodeArrayBuilder& PushContext(Register context);
148 148
149 // Pop the current context and replace with |context|. 149 // Pop the current context and replace with |context|.
150 BytecodeArrayBuilder& PopContext(Register context); 150 BytecodeArrayBuilder& PopContext(Register context);
151 151
152 // Call a JS function. The JSFunction or Callable to be called should be in 152 // Call a JS function. The JSFunction or Callable to be called should be in
153 // |callable|, the receiver should be in |receiver_args| and all subsequent 153 // |callable|, the receiver should be in |receiver_args| and all subsequent
154 // arguments should be in registers <receiver_args + 1> to 154 // arguments should be in registers <receiver_args + 1> to
155 // <receiver_args + receiver_arg_count - 1>. 155 // <receiver_args + receiver_arg_count - 1>. Type feedback is recorded in
156 // the |feedback_slot| in the type feedback vector.
156 BytecodeArrayBuilder& Call( 157 BytecodeArrayBuilder& Call(
157 Register callable, Register receiver_args, size_t receiver_arg_count, 158 Register callable, Register receiver_args, size_t receiver_arg_count,
158 int feedback_slot, TailCallMode tail_call_mode = TailCallMode::kDisallow); 159 int feedback_slot, TailCallMode tail_call_mode = TailCallMode::kDisallow);
159 160
160 BytecodeArrayBuilder& TailCall(Register callable, Register receiver_args, 161 BytecodeArrayBuilder& TailCall(Register callable, Register receiver_args,
161 size_t receiver_arg_count, int feedback_slot) { 162 size_t receiver_arg_count, int feedback_slot) {
162 return Call(callable, receiver_args, receiver_arg_count, feedback_slot, 163 return Call(callable, receiver_args, receiver_arg_count, feedback_slot,
163 TailCallMode::kAllow); 164 TailCallMode::kAllow);
164 } 165 }
165 166
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 static Bytecode BytecodeForCountOperation(Token::Value op); 297 static Bytecode BytecodeForCountOperation(Token::Value op);
297 static Bytecode BytecodeForCompareOperation(Token::Value op); 298 static Bytecode BytecodeForCompareOperation(Token::Value op);
298 static Bytecode BytecodeForStoreNamedProperty(LanguageMode language_mode); 299 static Bytecode BytecodeForStoreNamedProperty(LanguageMode language_mode);
299 static Bytecode BytecodeForStoreKeyedProperty(LanguageMode language_mode); 300 static Bytecode BytecodeForStoreKeyedProperty(LanguageMode language_mode);
300 static Bytecode BytecodeForLoadGlobal(TypeofMode typeof_mode); 301 static Bytecode BytecodeForLoadGlobal(TypeofMode typeof_mode);
301 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); 302 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
302 static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode); 303 static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode);
303 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); 304 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
304 static Bytecode BytecodeForDelete(LanguageMode language_mode); 305 static Bytecode BytecodeForDelete(LanguageMode language_mode);
305 static Bytecode BytecodeForCall(TailCallMode tail_call_mode); 306 static Bytecode BytecodeForCall(TailCallMode tail_call_mode);
307 static Bytecode BytecodeForCallWithFeedback(TailCallMode tail_call_mode);
rmcilroy 2016/07/12 09:36:20 Remove
mythria 2016/07/12 15:20:35 Done.
306 308
307 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, 309 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
308 uint32_t operand2, uint32_t operand3); 310 uint32_t operand2, uint32_t operand3);
309 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, 311 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
310 uint32_t operand2); 312 uint32_t operand2);
311 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); 313 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1);
312 void Output(Bytecode bytecode, uint32_t operand0); 314 void Output(Bytecode bytecode, uint32_t operand0);
313 void Output(Bytecode bytecode); 315 void Output(Bytecode bytecode);
314 316
315 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, 317 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 BytecodeSourceInfo latest_source_info_; 369 BytecodeSourceInfo latest_source_info_;
368 370
369 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 371 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
370 }; 372 };
371 373
372 } // namespace interpreter 374 } // namespace interpreter
373 } // namespace internal 375 } // namespace internal
374 } // namespace v8 376 } // namespace v8
375 377
376 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 378 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698