| 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 24 matching lines...) Expand all Loading... |
| 35 return 0; | 35 return 0; |
| 36 } | 36 } |
| 37 | 37 |
| 38 | 38 |
| 39 // static | 39 // static |
| 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 #define CHECK_SIZE(Name, arg_count) \ |
| 46 STATIC_ASSERT(arg_count <= Bytecodes::kMaximumNumberOfArguments); |
| 47 BYTECODE_LIST(CHECK_SIZE) |
| 48 #undef CHECK_SIZE |
| 49 |
| 50 |
| 45 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { | 51 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode) { |
| 46 return os << Bytecodes::ToString(bytecode); | 52 return os << Bytecodes::ToString(bytecode); |
| 47 } | 53 } |
| 48 | 54 |
| 49 } // namespace interpreter | 55 } // namespace interpreter |
| 50 } // namespace internal | 56 } // namespace internal |
| 51 } // namespace v8 | 57 } // namespace v8 |
| OLD | NEW |