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

Side by Side 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: Preprocessor robust method of describing bytecode operands. Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 11602 matching lines...) Expand 10 before | Expand all | Expand 10 after
11613 it.rinfo()->Print(GetIsolate(), os); 11613 it.rinfo()->Print(GetIsolate(), os);
11614 } 11614 }
11615 os << "\n"; 11615 os << "\n";
11616 } 11616 }
11617 #endif // ENABLE_DISASSEMBLER 11617 #endif // ENABLE_DISASSEMBLER
11618 11618
11619 11619
11620 void BytecodeArray::Disassemble(std::ostream& os) { 11620 void BytecodeArray::Disassemble(std::ostream& os) {
11621 os << "Frame size " << frame_size() << "\n"; 11621 os << "Frame size " << frame_size() << "\n";
11622 Vector<char> buf = Vector<char>::New(50); 11622 Vector<char> buf = Vector<char>::New(50);
11623 int bytecode_size = 0; 11623 int bytes = 0;
11624 for (int i = 0; i < this->length(); i += bytecode_size) { 11624 for (int i = 0; i < this->length(); i += bytes) {
11625 interpreter::Bytecode bytecode = static_cast<interpreter::Bytecode>(get(i)); 11625 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(get(i));
11626 bytecode_size = interpreter::Bytecodes::Size(bytecode); 11626 bytes = interpreter::Bytecodes::Size(bytecode);
11627 11627
11628 SNPrintF(buf, "%p : ", GetFirstBytecodeAddress() + i); 11628 SNPrintF(buf, "%p : ", GetFirstBytecodeAddress() + i);
11629 os << buf.start(); 11629 os << buf.start();
11630 for (int j = 0; j < bytecode_size; j++) { 11630 for (int j = 0; j < bytes; j++) {
11631 SNPrintF(buf, "%02x ", get(i + j)); 11631 SNPrintF(buf, "%02x ", get(i + j));
11632 os << buf.start(); 11632 os << buf.start();
11633 } 11633 }
11634 for (int j = bytecode_size; j < interpreter::Bytecodes::kMaximumSize; j++) { 11634 for (int j = bytes; j < interpreter::Bytecodes::MaximumSize(); j++) {
11635 os << " "; 11635 os << " ";
11636 } 11636 }
11637 os << bytecode << "\n"; 11637 os << bytecode << "\n";
11638 } 11638 }
11639 } 11639 }
11640 11640
11641 11641
11642 // static 11642 // static
11643 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { 11643 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
11644 DCHECK(capacity >= 0); 11644 DCHECK(capacity >= 0);
(...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after
15923 Handle<Object> new_value) { 15923 Handle<Object> new_value) {
15924 if (cell->value() != *new_value) { 15924 if (cell->value() != *new_value) {
15925 cell->set_value(*new_value); 15925 cell->set_value(*new_value);
15926 Isolate* isolate = cell->GetIsolate(); 15926 Isolate* isolate = cell->GetIsolate();
15927 cell->dependent_code()->DeoptimizeDependentCodeGroup( 15927 cell->dependent_code()->DeoptimizeDependentCodeGroup(
15928 isolate, DependentCode::kPropertyCellChangedGroup); 15928 isolate, DependentCode::kPropertyCellChangedGroup);
15929 } 15929 }
15930 } 15930 }
15931 } // namespace internal 15931 } // namespace internal
15932 } // namespace v8 15932 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698