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