| Index: src/interpreter/bytecode-array-writer.cc
|
| diff --git a/src/interpreter/bytecode-array-writer.cc b/src/interpreter/bytecode-array-writer.cc
|
| index dd91564b16e4d1d7ec8b975d211567fc468ed370..10c9cc1b940e092afc8b4c3cebf4a2457a0be3f3 100644
|
| --- a/src/interpreter/bytecode-array-writer.cc
|
| +++ b/src/interpreter/bytecode-array-writer.cc
|
| @@ -282,15 +282,13 @@ void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) {
|
|
|
| if (label->is_bound()) {
|
| CHECK_GE(current_offset, label->offset());
|
| - CHECK_LE(current_offset, static_cast<size_t>(kMaxInt));
|
| + CHECK_LE(current_offset, static_cast<size_t>(kMaxUInt32));
|
| // Label has been bound already so this is a backwards jump.
|
| - size_t abs_delta = current_offset - label->offset();
|
| - int delta = -static_cast<int>(abs_delta);
|
| - OperandScale operand_scale = Bytecodes::ScaleForSignedOperand(delta);
|
| + uint32_t delta = static_cast<uint32_t>(current_offset - label->offset());
|
| + OperandScale operand_scale = Bytecodes::ScaleForUnsignedOperand(delta);
|
| if (operand_scale > OperandScale::kSingle) {
|
| // Adjust for scaling byte prefix for wide jump offset.
|
| - DCHECK_LE(delta, 0);
|
| - delta -= 1;
|
| + delta += 1;
|
| }
|
| DCHECK_EQ(Bytecode::kJumpLoop, node->bytecode());
|
| node->update_operand0(delta);
|
|
|