Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: src/interpreter/bytecode-array-writer.cc

Issue 2331033002: [interpreter] Merge {OsrPoll} with {Jump} bytecode. (Closed)
Patch Set: Fix for wide jumps. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698