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

Unified Diff: src/objects.cc

Issue 1373903005: [Interpreter] Add for/while/do support to the bytecode generator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 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/control-flow-builders.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index df526d5bd7ce23abeb2b085c9488172180f8511a..0dbbc54bacb1937a32e68d733d5182bd562fdea5 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12559,6 +12559,16 @@ void BytecodeArray::Disassemble(std::ostream& os) {
SNPrintF(buf, "%p", bytecode_start);
os << buf.start() << " : ";
interpreter::Bytecodes::Decode(os, bytecode_start, parameter_count());
+ if (interpreter::Bytecodes::IsJump(bytecode)) {
+ int offset = static_cast<int8_t>(bytecode_start[1]);
+ SNPrintF(buf, " (%p)", bytecode_start + offset);
+ os << buf.start();
+ } else if (interpreter::Bytecodes::IsJumpConstant(bytecode)) {
+ int index = static_cast<int>(bytecode_start[1]);
+ int offset = Smi::cast(constant_pool()->get(index))->value();
+ SNPrintF(buf, " (%p)", bytecode_start + offset);
+ os << buf.start();
+ }
os << "\n";
}
« no previous file with comments | « src/interpreter/control-flow-builders.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698