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 <iomanip> | 7 #include <iomanip> |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 // static | 401 // static |
402 bool Bytecodes::IsConditionalJump(Bytecode bytecode) { | 402 bool Bytecodes::IsConditionalJump(Bytecode bytecode) { |
403 return IsConditionalJumpImmediate(bytecode) || | 403 return IsConditionalJumpImmediate(bytecode) || |
404 IsConditionalJumpConstant(bytecode); | 404 IsConditionalJumpConstant(bytecode); |
405 } | 405 } |
406 | 406 |
407 | 407 |
408 // static | 408 // static |
409 bool Bytecodes::IsJumpImmediate(Bytecode bytecode) { | 409 bool Bytecodes::IsJumpImmediate(Bytecode bytecode) { |
410 return bytecode == Bytecode::kJump || IsConditionalJumpImmediate(bytecode); | 410 return bytecode == Bytecode::kJump || bytecode == Bytecode::kJumpLoop || |
| 411 IsConditionalJumpImmediate(bytecode); |
411 } | 412 } |
412 | 413 |
413 | 414 |
414 // static | 415 // static |
415 bool Bytecodes::IsJumpConstant(Bytecode bytecode) { | 416 bool Bytecodes::IsJumpConstant(Bytecode bytecode) { |
416 return bytecode == Bytecode::kJumpConstant || | 417 return bytecode == Bytecode::kJumpConstant || |
417 IsConditionalJumpConstant(bytecode); | 418 IsConditionalJumpConstant(bytecode); |
418 } | 419 } |
419 | 420 |
420 // static | 421 // static |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 return os << Bytecodes::OperandScaleToString(operand_scale); | 678 return os << Bytecodes::OperandScaleToString(operand_scale); |
678 } | 679 } |
679 | 680 |
680 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type) { | 681 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type) { |
681 return os << Bytecodes::OperandTypeToString(operand_type); | 682 return os << Bytecodes::OperandTypeToString(operand_type); |
682 } | 683 } |
683 | 684 |
684 } // namespace interpreter | 685 } // namespace interpreter |
685 } // namespace internal | 686 } // namespace internal |
686 } // namespace v8 | 687 } // namespace v8 |
OLD | NEW |