| 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 #include "src/interpreter/bytecodes.h" | 5 #include "src/interpreter/bytecodes.h" |
| 6 | 6 |
| 7 namespace v8 { | 7 namespace v8 { |
| 8 namespace internal { | 8 namespace internal { |
| 9 namespace interpreter { | 9 namespace interpreter { |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 const int Bytecodes::Size(Bytecode bytecode) { | 40 const int Bytecodes::Size(Bytecode bytecode) { |
| 41 return NumberOfArguments(bytecode) + 1; | 41 return NumberOfArguments(bytecode) + 1; |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 const bool Bytecodes::IsReturn(Bytecode bytecode) { | 45 const bool Bytecodes::IsReturn(Bytecode bytecode) { |
| 46 return bytecode == interpreter::Bytecode::kReturn; | 46 return bytecode == interpreter::Bytecode::kReturn; |
| 47 } | 47 } |
| 48 | 48 |
| 49 | 49 |
| 50 #define CHECK_SIZE(Name, arg_count) \ |
| 51 STATIC_ASSERT(arg_count <= Bytecodes::kMaximumNumberOfArguments); |
| 52 BYTECODE_LIST(CHECK_SIZE) |
| 53 #undef CHECK_SIZE |
| 54 |
| 55 |
| 50 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { | 56 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { |
| 51 return os << Bytecodes::ToString(bytecode); | 57 return os << Bytecodes::ToString(bytecode); |
| 52 } | 58 } |
| 53 | 59 |
| 54 } // namespace interpreter | 60 } // namespace interpreter |
| 55 } // namespace internal | 61 } // namespace internal |
| 56 } // namespace v8 | 62 } // namespace v8 |
| OLD | NEW |