Index: src/interpreter/bytecodes.cc |
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc |
index 5a67847a45c66a32443993ee62bbd67aaa5e43e2..4a818496d46ffcdbcc647a0edfe876d4eedbde6c 100644 |
--- a/src/interpreter/bytecodes.cc |
+++ b/src/interpreter/bytecodes.cc |
@@ -489,6 +489,15 @@ bool Bytecodes::IsPrefixScalingBytecode(Bytecode bytecode) { |
} |
// static |
+bool Bytecodes::IsWithoutExternalSideEffects(Bytecode bytecode) { |
+ // These bytecodes only manipulate interpreter frame state and will |
+ // never throw. |
+ return (IsAccumulatorLoadWithoutEffects(bytecode) || IsLdarOrStar(bytecode) || |
+ bytecode == Bytecode::kMov || bytecode == Bytecode::kNop || |
+ IsJump(bytecode)); |
+} |
+ |
+// static |
bool Bytecodes::IsJumpOrReturn(Bytecode bytecode) { |
return bytecode == Bytecode::kReturn || IsJump(bytecode); |
} |