| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ | 234 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 235 \ | 235 \ |
| 236 /* Perform a stack guard check */ \ | 236 /* Perform a stack guard check */ \ |
| 237 V(StackCheck, AccumulatorUse::kNone) \ | 237 V(StackCheck, AccumulatorUse::kNone) \ |
| 238 \ | 238 \ |
| 239 /* Non-local flow control */ \ | 239 /* Non-local flow control */ \ |
| 240 V(Throw, AccumulatorUse::kRead) \ | 240 V(Throw, AccumulatorUse::kRead) \ |
| 241 V(ReThrow, AccumulatorUse::kRead) \ | 241 V(ReThrow, AccumulatorUse::kRead) \ |
| 242 V(Return, AccumulatorUse::kNone) \ | 242 V(Return, AccumulatorUse::kNone) \ |
| 243 \ | 243 \ |
| 244 /* Generators */ \ |
| 245 V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \ |
| 246 V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \ |
| 247 \ |
| 244 /* Debugger */ \ | 248 /* Debugger */ \ |
| 245 V(Debugger, AccumulatorUse::kNone) \ | 249 V(Debugger, AccumulatorUse::kNone) \ |
| 246 DEBUG_BREAK_BYTECODE_LIST(V) \ | 250 DEBUG_BREAK_BYTECODE_LIST(V) \ |
| 247 \ | 251 \ |
| 248 /* Illegal bytecode (terminates execution) */ \ | 252 /* Illegal bytecode (terminates execution) */ \ |
| 249 V(Illegal, AccumulatorUse::kNone) | 253 V(Illegal, AccumulatorUse::kNone) |
| 250 | 254 |
| 251 enum class AccumulatorUse : uint8_t { | 255 enum class AccumulatorUse : uint8_t { |
| 252 kNone = 0, | 256 kNone = 0, |
| 253 kRead = 1 << 0, | 257 kRead = 1 << 0, |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 bool operator<=(const Register& other) const { | 393 bool operator<=(const Register& other) const { |
| 390 return index() <= other.index(); | 394 return index() <= other.index(); |
| 391 } | 395 } |
| 392 bool operator>(const Register& other) const { | 396 bool operator>(const Register& other) const { |
| 393 return index() > other.index(); | 397 return index() > other.index(); |
| 394 } | 398 } |
| 395 bool operator>=(const Register& other) const { | 399 bool operator>=(const Register& other) const { |
| 396 return index() >= other.index(); | 400 return index() >= other.index(); |
| 397 } | 401 } |
| 398 | 402 |
| 403 static const int kRegisterFileStartOffset = |
| 404 InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize; |
| 405 |
| 399 private: | 406 private: |
| 400 static const int kInvalidIndex = kMaxInt; | 407 static const int kInvalidIndex = kMaxInt; |
| 401 static const int kRegisterFileStartOffset = | |
| 402 InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize; | |
| 403 | 408 |
| 404 void* operator new(size_t size); | 409 void* operator new(size_t size); |
| 405 void operator delete(void* p); | 410 void operator delete(void* p); |
| 406 | 411 |
| 407 int index_; | 412 int index_; |
| 408 }; | 413 }; |
| 409 | 414 |
| 410 | 415 |
| 411 class Bytecodes { | 416 class Bytecodes { |
| 412 public: | 417 public: |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); | 588 std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use); |
| 584 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); | 589 std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale); |
| 585 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); | 590 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size); |
| 586 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 591 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
| 587 | 592 |
| 588 } // namespace interpreter | 593 } // namespace interpreter |
| 589 } // namespace internal | 594 } // namespace internal |
| 590 } // namespace v8 | 595 } // namespace v8 |
| 591 | 596 |
| 592 #endif // V8_INTERPRETER_BYTECODES_H_ | 597 #endif // V8_INTERPRETER_BYTECODES_H_ |
| OLD | NEW |