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/base/compiler-specific.h" | 9 #include "src/base/compiler-specific.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 // Push the context in accumulator as the new context, and store in register | 181 // Push the context in accumulator as the new context, and store in register |
182 // |context|. | 182 // |context|. |
183 BytecodeArrayBuilder& PushContext(Register context); | 183 BytecodeArrayBuilder& PushContext(Register context); |
184 | 184 |
185 // Pop the current context and replace with |context|. | 185 // Pop the current context and replace with |context|. |
186 BytecodeArrayBuilder& PopContext(Register context); | 186 BytecodeArrayBuilder& PopContext(Register context); |
187 | 187 |
188 // Call a JS function. The JSFunction or Callable to be called should be in | 188 // Call a JS function. The JSFunction or Callable to be called should be in |
189 // |callable|. The arguments should be in |args|, with the receiver in | 189 // |callable|. The arguments should be in |args|, with the receiver in |
190 // |args[0]|. Type feedback is recorded in the |feedback_slot| in the type | 190 // |args[0]|. The call type of the expression is in |call_type|. Type feedback |
191 // feedback vector. | 191 // is recorded in the |feedback_slot| in the type feedback vector. |
192 BytecodeArrayBuilder& Call( | 192 BytecodeArrayBuilder& Call( |
193 Register callable, RegisterList args, int feedback_slot, | 193 Register callable, RegisterList args, int feedback_slot, |
| 194 Call::CallType call_type, |
194 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 195 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
195 | 196 |
196 // Call the new operator. The accumulator holds the |new_target|. | 197 // Call the new operator. The accumulator holds the |new_target|. |
197 // The |constructor| is in a register and arguments are in |args|. | 198 // The |constructor| is in a register and arguments are in |args|. |
198 BytecodeArrayBuilder& New(Register constructor, RegisterList args, | 199 BytecodeArrayBuilder& New(Register constructor, RegisterList args, |
199 int feedback_slot); | 200 int feedback_slot); |
200 | 201 |
201 // Call the runtime function with |function_id| and arguments |args|. | 202 // Call the runtime function with |function_id| and arguments |args|. |
202 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 203 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
203 RegisterList args); | 204 RegisterList args); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 static int const kNoFeedbackSlot = 0; | 403 static int const kNoFeedbackSlot = 0; |
403 | 404 |
404 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 405 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
405 }; | 406 }; |
406 | 407 |
407 } // namespace interpreter | 408 } // namespace interpreter |
408 } // namespace internal | 409 } // namespace internal |
409 } // namespace v8 | 410 } // namespace v8 |
410 | 411 |
411 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 412 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |