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