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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // Call the runtime function with |function_id| with single argument |arg| | 233 // Call the runtime function with |function_id| with single argument |arg| |
234 // that returns a pair of values. The return values will be returned in | 234 // that returns a pair of values. The return values will be returned in |
235 // |return_pair|. | 235 // |return_pair|. |
236 BytecodeArrayBuilder& CallRuntimeForPair(Runtime::FunctionId function_id, | 236 BytecodeArrayBuilder& CallRuntimeForPair(Runtime::FunctionId function_id, |
237 Register arg, | 237 Register arg, |
238 RegisterList return_pair); | 238 RegisterList return_pair); |
239 | 239 |
240 // Call the JS runtime function with |context_index| and arguments |args|. | 240 // Call the JS runtime function with |context_index| and arguments |args|. |
241 BytecodeArrayBuilder& CallJSRuntime(int context_index, RegisterList args); | 241 BytecodeArrayBuilder& CallJSRuntime(int context_index, RegisterList args); |
242 | 242 |
| 243 // Call the constructor in |args[0]| with new_target in |args[1]| and the |
| 244 // arguments starting at |args[2]| onwards. The final argument must be a |
| 245 // spread. |
| 246 BytecodeArrayBuilder& NewWithSpread(RegisterList args); |
| 247 |
243 // Operators (register holds the lhs value, accumulator holds the rhs value). | 248 // Operators (register holds the lhs value, accumulator holds the rhs value). |
244 // Type feedback will be recorded in the |feedback_slot| | 249 // Type feedback will be recorded in the |feedback_slot| |
245 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, | 250 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
246 int feedback_slot); | 251 int feedback_slot); |
247 | 252 |
248 // Count Operators (value stored in accumulator). | 253 // Count Operators (value stored in accumulator). |
249 // Type feedback will be recorded in the |feedback_slot| | 254 // Type feedback will be recorded in the |feedback_slot| |
250 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); | 255 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); |
251 | 256 |
252 // Unary Operators. | 257 // Unary Operators. |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 static int const kNoFeedbackSlot = 0; | 428 static int const kNoFeedbackSlot = 0; |
424 | 429 |
425 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 430 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
426 }; | 431 }; |
427 | 432 |
428 } // namespace interpreter | 433 } // namespace interpreter |
429 } // namespace internal | 434 } // namespace internal |
430 } // namespace v8 | 435 } // namespace v8 |
431 | 436 |
432 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 437 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |