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 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/interpreter/bytecode-traits.h" | 8 #include "src/interpreter/bytecode-traits.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 | 277 |
278 // static | 278 // static |
279 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { | 279 bool Bytecodes::IsCallOrNew(Bytecode bytecode) { |
280 return bytecode == Bytecode::kCall || bytecode == Bytecode::kTailCall || | 280 return bytecode == Bytecode::kCall || bytecode == Bytecode::kTailCall || |
281 bytecode == Bytecode::kNew || bytecode == Bytecode::kCallWide || | 281 bytecode == Bytecode::kNew || bytecode == Bytecode::kCallWide || |
282 bytecode == Bytecode::kTailCallWide || bytecode == Bytecode::kNewWide; | 282 bytecode == Bytecode::kTailCallWide || bytecode == Bytecode::kNewWide; |
283 } | 283 } |
284 | 284 |
285 // static | 285 // static |
| 286 bool Bytecodes::IsCallRuntime(Bytecode bytecode) { |
| 287 return bytecode == Bytecode::kCallRuntime || |
| 288 bytecode == Bytecode::kCallRuntimeWide || |
| 289 bytecode == Bytecode::kCallRuntimeForPair || |
| 290 bytecode == Bytecode::kCallRuntimeForPairWide; |
| 291 } |
| 292 |
| 293 // static |
286 bool Bytecodes::IsDebugBreak(Bytecode bytecode) { | 294 bool Bytecodes::IsDebugBreak(Bytecode bytecode) { |
287 switch (bytecode) { | 295 switch (bytecode) { |
288 #define CASE(Name, ...) case Bytecode::k##Name: | 296 #define CASE(Name, ...) case Bytecode::k##Name: |
289 DEBUG_BREAK_BYTECODE_LIST(CASE); | 297 DEBUG_BREAK_BYTECODE_LIST(CASE); |
290 #undef CASE | 298 #undef CASE |
291 return true; | 299 return true; |
292 default: | 300 default: |
293 break; | 301 break; |
294 } | 302 } |
295 return false; | 303 return false; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 } else { | 639 } else { |
632 std::ostringstream s; | 640 std::ostringstream s; |
633 s << "r" << index(); | 641 s << "r" << index(); |
634 return s.str(); | 642 return s.str(); |
635 } | 643 } |
636 } | 644 } |
637 | 645 |
638 } // namespace interpreter | 646 } // namespace interpreter |
639 } // namespace internal | 647 } // namespace internal |
640 } // namespace v8 | 648 } // namespace v8 |
OLD | NEW |