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

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

Issue 1698273003: [es6] [interpreter] Add tail calls support to Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-turbo-2
Patch Set: Decreased number of iterations to fix timeouts Created 4 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
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-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // |context|. 157 // |context|.
158 BytecodeArrayBuilder& PushContext(Register context); 158 BytecodeArrayBuilder& PushContext(Register context);
159 159
160 // Pop the current context and replace with |context|. 160 // Pop the current context and replace with |context|.
161 BytecodeArrayBuilder& PopContext(Register context); 161 BytecodeArrayBuilder& PopContext(Register context);
162 162
163 // Call a JS function. The JSFunction or Callable to be called should be in 163 // Call a JS function. The JSFunction or Callable to be called should be in
164 // |callable|, the receiver should be in |receiver_args| and all subsequent 164 // |callable|, the receiver should be in |receiver_args| and all subsequent
165 // arguments should be in registers <receiver_args + 1> to 165 // arguments should be in registers <receiver_args + 1> to
166 // <receiver_args + receiver_arg_count - 1>. 166 // <receiver_args + receiver_arg_count - 1>.
167 BytecodeArrayBuilder& Call(Register callable, Register receiver_args, 167 BytecodeArrayBuilder& Call(
168 size_t receiver_arg_count, int feedback_slot); 168 Register callable, Register receiver_args, size_t receiver_arg_count,
169 int feedback_slot, TailCallMode tail_call_mode = TailCallMode::kDisallow);
170
171 BytecodeArrayBuilder& TailCall(Register callable, Register receiver_args,
172 size_t receiver_arg_count, int feedback_slot) {
173 return Call(callable, receiver_args, receiver_arg_count, feedback_slot,
174 TailCallMode::kAllow);
175 }
169 176
170 // Call the new operator. The accumulator holds the |new_target|. 177 // Call the new operator. The accumulator holds the |new_target|.
171 // The |constructor| is in a register followed by |arg_count| 178 // The |constructor| is in a register followed by |arg_count|
172 // consecutive arguments starting at |first_arg| for the constuctor 179 // consecutive arguments starting at |first_arg| for the constuctor
173 // invocation. 180 // invocation.
174 BytecodeArrayBuilder& New(Register constructor, Register first_arg, 181 BytecodeArrayBuilder& New(Register constructor, Register first_arg,
175 size_t arg_count); 182 size_t arg_count);
176 183
177 // Call the runtime function with |function_id|. The first argument should be 184 // Call the runtime function with |function_id|. The first argument should be
178 // in |first_arg| and all subsequent arguments should be in registers 185 // in |first_arg| and all subsequent arguments should be in registers
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 size_t offset_; 421 size_t offset_;
415 422
416 friend class BytecodeArrayBuilder; 423 friend class BytecodeArrayBuilder;
417 }; 424 };
418 425
419 } // namespace interpreter 426 } // namespace interpreter
420 } // namespace internal 427 } // namespace internal
421 } // namespace v8 428 } // namespace v8
422 429
423 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 430 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698