| 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/frames.h" | 9 #include "src/frames.h" |
| 10 #include "src/interpreter/bytecode-traits.h" | 10 #include "src/interpreter/bytecode-traits.h" |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 case Bytecode::kDebugBreakExtraWide: | 482 case Bytecode::kDebugBreakExtraWide: |
| 483 case Bytecode::kWide: | 483 case Bytecode::kWide: |
| 484 case Bytecode::kDebugBreakWide: | 484 case Bytecode::kDebugBreakWide: |
| 485 return true; | 485 return true; |
| 486 default: | 486 default: |
| 487 return false; | 487 return false; |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 | 490 |
| 491 // static | 491 // static |
| 492 bool Bytecodes::IsWithoutExternalSideEffects(Bytecode bytecode) { |
| 493 // These bytecodes only manipulate interpreter frame state and will |
| 494 // never throw. |
| 495 return (IsAccumulatorLoadWithoutEffects(bytecode) || IsLdarOrStar(bytecode) || |
| 496 bytecode == Bytecode::kMov || bytecode == Bytecode::kNop || |
| 497 IsJump(bytecode)); |
| 498 } |
| 499 |
| 500 // static |
| 492 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { | 501 bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { |
| 493 return bytecode == Bytecode::kReturn || IsJump(bytecode); | 502 return bytecode == Bytecode::kReturn || IsJump(bytecode); |
| 494 } | 503 } |
| 495 | 504 |
| 496 // static | 505 // static |
| 497 bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) { | 506 bool Bytecodes::IsMaybeRegisterOperandType(OperandType operand_type) { |
| 498 return operand_type == OperandType::kMaybeReg; | 507 return operand_type == OperandType::kMaybeReg; |
| 499 } | 508 } |
| 500 | 509 |
| 501 // static | 510 // static |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 } else { | 937 } else { |
| 929 std::ostringstream s; | 938 std::ostringstream s; |
| 930 s << "r" << index(); | 939 s << "r" << index(); |
| 931 return s.str(); | 940 return s.str(); |
| 932 } | 941 } |
| 933 } | 942 } |
| 934 | 943 |
| 935 } // namespace interpreter | 944 } // namespace interpreter |
| 936 } // namespace internal | 945 } // namespace internal |
| 937 } // namespace v8 | 946 } // namespace v8 |
| OLD | NEW |