Chromium Code Reviews| 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 BytecodeArrayBuilder& ConstructWithSpread(RegisterList args); | |
|
Benedikt Meurer
2016/12/05 11:42:10
Nit: you should add a descriptive comment.
petermarshall
2016/12/05 13:30:46
Done
| |
| 244 | |
| 243 // Operators (register holds the lhs value, accumulator holds the rhs value). | 245 // Operators (register holds the lhs value, accumulator holds the rhs value). |
| 244 // Type feedback will be recorded in the |feedback_slot| | 246 // Type feedback will be recorded in the |feedback_slot| |
| 245 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, | 247 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
| 246 int feedback_slot); | 248 int feedback_slot); |
| 247 | 249 |
| 248 // Count Operators (value stored in accumulator). | 250 // Count Operators (value stored in accumulator). |
| 249 // Type feedback will be recorded in the |feedback_slot| | 251 // Type feedback will be recorded in the |feedback_slot| |
| 250 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); | 252 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); |
| 251 | 253 |
| 252 // Unary Operators. | 254 // Unary Operators. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 423 static int const kNoFeedbackSlot = 0; | 425 static int const kNoFeedbackSlot = 0; |
| 424 | 426 |
| 425 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 427 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 426 }; | 428 }; |
| 427 | 429 |
| 428 } // namespace interpreter | 430 } // namespace interpreter |
| 429 } // namespace internal | 431 } // namespace internal |
| 430 } // namespace v8 | 432 } // namespace v8 |
| 431 | 433 |
| 432 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 434 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |