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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 // Call the runtime function with |function_id| with single argument |arg| | 236 // Call the runtime function with |function_id| with single argument |arg| |
237 // that returns a pair of values. The return values will be returned in | 237 // that returns a pair of values. The return values will be returned in |
238 // |return_pair|. | 238 // |return_pair|. |
239 BytecodeArrayBuilder& CallRuntimeForPair(Runtime::FunctionId function_id, | 239 BytecodeArrayBuilder& CallRuntimeForPair(Runtime::FunctionId function_id, |
240 Register arg, | 240 Register arg, |
241 RegisterList return_pair); | 241 RegisterList return_pair); |
242 | 242 |
243 // Call the JS runtime function with |context_index| and arguments |args|. | 243 // Call the JS runtime function with |context_index| and arguments |args|. |
244 BytecodeArrayBuilder& CallJSRuntime(int context_index, RegisterList args); | 244 BytecodeArrayBuilder& CallJSRuntime(int context_index, RegisterList args); |
245 | 245 |
246 // Call the constructor in |args[0]| with new_target in |args[1]| and the | 246 // Call the new operator for use with a spread. The accumulator holds the |
247 // arguments starting at |args[2]| onwards. The final argument must be a | 247 // |new_target|. The |constructor| is in a register and arguments are in |
248 // spread. | 248 // |args|. The final argument must be a spread. |
249 BytecodeArrayBuilder& NewWithSpread(RegisterList args); | 249 BytecodeArrayBuilder& NewWithSpread(Register constructor, RegisterList args); |
rmcilroy
2017/01/16 16:28:02
I realize you didn't change this in this CL, but t
petermarshall
2017/01/18 10:05:32
Done
| |
250 | 250 |
251 // Operators (register holds the lhs value, accumulator holds the rhs value). | 251 // Operators (register holds the lhs value, accumulator holds the rhs value). |
252 // Type feedback will be recorded in the |feedback_slot| | 252 // Type feedback will be recorded in the |feedback_slot| |
253 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, | 253 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
254 int feedback_slot); | 254 int feedback_slot); |
255 | 255 |
256 // Count Operators (value stored in accumulator). | 256 // Count Operators (value stored in accumulator). |
257 // Type feedback will be recorded in the |feedback_slot| | 257 // Type feedback will be recorded in the |feedback_slot| |
258 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); | 258 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); |
259 | 259 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 static int const kNoFeedbackSlot = 0; | 439 static int const kNoFeedbackSlot = 0; |
440 | 440 |
441 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 441 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
442 }; | 442 }; |
443 | 443 |
444 } // namespace interpreter | 444 } // namespace interpreter |
445 } // namespace internal | 445 } // namespace internal |
446 } // namespace v8 | 446 } // namespace v8 |
447 | 447 |
448 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 448 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |