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