Index: src/interpreter/bytecode-array-accessor.cc |
diff --git a/src/interpreter/bytecode-array-accessor.cc b/src/interpreter/bytecode-array-accessor.cc |
index 8e6a7328614131ed1677d01e6f32b5f0b82e278f..cc6777588aa4d9d022047704c37a1841448eff52 100644 |
--- a/src/interpreter/bytecode-array-accessor.cc |
+++ b/src/interpreter/bytecode-array-accessor.cc |
@@ -178,7 +178,10 @@ Handle<Object> BytecodeArrayAccessor::GetConstantForIndexOperand( |
int BytecodeArrayAccessor::GetJumpTargetOffset() const { |
Bytecode bytecode = current_bytecode(); |
if (interpreter::Bytecodes::IsJumpImmediate(bytecode)) { |
- int relative_offset = GetImmediateOperand(0); |
+ int relative_offset = GetUnsignedImmediateOperand(0); |
+ if (bytecode == Bytecode::kJumpLoop) { |
+ relative_offset = -relative_offset; |
+ } |
return current_offset() + relative_offset + current_prefix_offset(); |
} else if (interpreter::Bytecodes::IsJumpConstant(bytecode)) { |
Smi* smi = Smi::cast(*GetConstantForIndexOperand(0)); |