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

Unified Diff: src/objects.cc

Issue 1257543003: [Interpreter] Add more bytecode definitions and add operand types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 5 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/interpreter.cc ('k') | test/unittests/compiler/interpreter-assembler-unittest.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 fbf5ef5f535ca55195bc937b4771cfc3ed7e660b..3df88e300c3ad8f53028e452dc8f0a5a24976b73 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11611,18 +11611,18 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
void BytecodeArray::Disassemble(std::ostream& os) {
os << "Frame size " << frame_size() << "\n";
Vector<char> buf = Vector<char>::New(50);
- int bytecode_size = 0;
- for (int i = 0; i < this->length(); i += bytecode_size) {
- interpreter::Bytecode bytecode = static_cast<interpreter::Bytecode>(get(i));
- bytecode_size = interpreter::Bytecodes::Size(bytecode);
+ int bytes = 0;
+ for (int i = 0; i < this->length(); i += bytes) {
+ interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(get(i));
+ bytes = interpreter::Bytecodes::Size(bytecode);
SNPrintF(buf, "%p : ", GetFirstBytecodeAddress() + i);
os << buf.start();
- for (int j = 0; j < bytecode_size; j++) {
+ for (int j = 0; j < bytes; j++) {
SNPrintF(buf, "%02x ", get(i + j));
os << buf.start();
}
- for (int j = bytecode_size; j < interpreter::Bytecodes::kMaximumSize; j++) {
+ for (int j = bytes; j < interpreter::Bytecodes::MaximumSize(); j++) {
os << " ";
}
os << bytecode << "\n";
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | test/unittests/compiler/interpreter-assembler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698