OLD | NEW |
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 size_t receiver_arg_count, int feedback_slot) { | 165 size_t receiver_arg_count, int feedback_slot) { |
166 return Call(callable, receiver_args, receiver_arg_count, feedback_slot, | 166 return Call(callable, receiver_args, receiver_arg_count, feedback_slot, |
167 TailCallMode::kAllow); | 167 TailCallMode::kAllow); |
168 } | 168 } |
169 | 169 |
170 // Call the new operator. The accumulator holds the |new_target|. | 170 // Call the new operator. The accumulator holds the |new_target|. |
171 // The |constructor| is in a register followed by |arg_count| | 171 // The |constructor| is in a register followed by |arg_count| |
172 // consecutive arguments starting at |first_arg| for the constuctor | 172 // consecutive arguments starting at |first_arg| for the constuctor |
173 // invocation. | 173 // invocation. |
174 BytecodeArrayBuilder& New(Register constructor, Register first_arg, | 174 BytecodeArrayBuilder& New(Register constructor, Register first_arg, |
175 size_t arg_count); | 175 size_t arg_count, int feedback_slot); |
176 | 176 |
177 // Call the runtime function with |function_id|. The first argument should be | 177 // Call the runtime function with |function_id|. The first argument should be |
178 // in |first_arg| and all subsequent arguments should be in registers | 178 // in |first_arg| and all subsequent arguments should be in registers |
179 // <first_arg + 1> to <first_arg + arg_count - 1>. | 179 // <first_arg + 1> to <first_arg + arg_count - 1>. |
180 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 180 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
181 Register first_arg, size_t arg_count); | 181 Register first_arg, size_t arg_count); |
182 | 182 |
183 // Call the runtime function with |function_id| that returns a pair of values. | 183 // Call the runtime function with |function_id| that returns a pair of values. |
184 // The first argument should be in |first_arg| and all subsequent arguments | 184 // The first argument should be in |first_arg| and all subsequent arguments |
185 // should be in registers <first_arg + 1> to <first_arg + arg_count - 1>. The | 185 // should be in registers <first_arg + 1> to <first_arg + arg_count - 1>. The |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 BytecodeSourceInfo latest_source_info_; | 371 BytecodeSourceInfo latest_source_info_; |
372 | 372 |
373 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 373 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
374 }; | 374 }; |
375 | 375 |
376 } // namespace interpreter | 376 } // namespace interpreter |
377 } // namespace internal | 377 } // namespace internal |
378 } // namespace v8 | 378 } // namespace v8 |
379 | 379 |
380 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 380 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |