Chromium Code Reviews| Index: src/interpreter/bytecode-array-writer.cc |
| diff --git a/src/interpreter/bytecode-array-writer.cc b/src/interpreter/bytecode-array-writer.cc |
| index 6694a3697cb1951956ee9e6ef4fd553d65ab89c2..e5a4fdc93ccfec1af5aafc69f3029f30335d28d2 100644 |
| --- a/src/interpreter/bytecode-array-writer.cc |
| +++ b/src/interpreter/bytecode-array-writer.cc |
| @@ -357,7 +357,11 @@ void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) { |
| DCHECK_LE(delta, 0); |
| delta -= 1; |
| } |
| - node->set_bytecode(node->bytecode(), delta); |
| + if (node->bytecode() == Bytecode::kJumpLoop) { |
| + node->set_bytecode(node->bytecode(), delta, node->operand(1)); |
|
rmcilroy
2016/09/13 10:47:34
Do we ever have label's bound which don't have Byt
Michael Starzinger
2016/09/13 12:01:46
Done. Just the unit-tests, adapted the tests.
|
| + } else { |
| + node->set_bytecode(node->bytecode(), delta); |
| + } |
| } else { |
| // The label has not yet been bound so this is a forward reference |
|
rmcilroy
2016/09/13 10:47:34
Could you add a DCHECK that this is not Bytecode::
Michael Starzinger
2016/09/13 12:01:46
Done.
|
| // that will be patched when the label is bound. We create a |