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_BYTECODES_H_ | 5 #ifndef V8_INTERPRETER_BYTECODES_H_ |
6 #define V8_INTERPRETER_BYTECODES_H_ | 6 #define V8_INTERPRETER_BYTECODES_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 10 // Clients of this interface shouldn't depend on lots of interpreter internals. |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 bool is_valid() const { return index_ != kInvalidIndex; } | 311 bool is_valid() const { return index_ != kInvalidIndex; } |
312 bool is_byte_operand() const; | 312 bool is_byte_operand() const; |
313 bool is_short_operand() const; | 313 bool is_short_operand() const; |
314 | 314 |
315 static Register FromParameterIndex(int index, int parameter_count); | 315 static Register FromParameterIndex(int index, int parameter_count); |
316 int ToParameterIndex(int parameter_count) const; | 316 int ToParameterIndex(int parameter_count) const; |
317 static int MaxParameterIndex(); | 317 static int MaxParameterIndex(); |
318 static int MaxRegisterIndex(); | 318 static int MaxRegisterIndex(); |
319 static int MaxRegisterIndexForByteOperand(); | 319 static int MaxRegisterIndexForByteOperand(); |
320 | 320 |
| 321 // Returns an invalid register. |
| 322 static Register invalid_value() { return Register(); } |
| 323 |
321 // Returns the register for the function's closure object. | 324 // Returns the register for the function's closure object. |
322 static Register function_closure(); | 325 static Register function_closure(); |
323 bool is_function_closure() const; | 326 bool is_function_closure() const; |
324 | 327 |
325 // Returns the register which holds the current context object. | 328 // Returns the register which holds the current context object. |
326 static Register current_context(); | 329 static Register current_context(); |
327 bool is_current_context() const; | 330 bool is_current_context() const; |
328 | 331 |
329 // Returns the register for the incoming new target value. | 332 // Returns the register for the incoming new target value. |
330 static Register new_target(); | 333 static Register new_target(); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 475 |
473 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 476 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
474 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 477 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
475 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); | 478 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); |
476 | 479 |
477 } // namespace interpreter | 480 } // namespace interpreter |
478 } // namespace internal | 481 } // namespace internal |
479 } // namespace v8 | 482 } // namespace v8 |
480 | 483 |
481 #endif // V8_INTERPRETER_BYTECODES_H_ | 484 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |