OLD | NEW |
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 11593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11604 it.rinfo()->Print(GetIsolate(), os); | 11604 it.rinfo()->Print(GetIsolate(), os); |
11605 } | 11605 } |
11606 os << "\n"; | 11606 os << "\n"; |
11607 } | 11607 } |
11608 #endif // ENABLE_DISASSEMBLER | 11608 #endif // ENABLE_DISASSEMBLER |
11609 | 11609 |
11610 | 11610 |
11611 void BytecodeArray::Disassemble(std::ostream& os) { | 11611 void BytecodeArray::Disassemble(std::ostream& os) { |
11612 os << "Frame size " << frame_size() << "\n"; | 11612 os << "Frame size " << frame_size() << "\n"; |
11613 Vector<char> buf = Vector<char>::New(50); | 11613 Vector<char> buf = Vector<char>::New(50); |
11614 int bytecode_size = 0; | 11614 int bytes = 0; |
11615 for (int i = 0; i < this->length(); i += bytecode_size) { | 11615 for (int i = 0; i < this->length(); i += bytes) { |
11616 interpreter::Bytecode bytecode = static_cast<interpreter::Bytecode>(get(i)); | 11616 interpreter::Bytecode bytecode = interpreter::Bytecodes::FromByte(get(i)); |
11617 bytecode_size = interpreter::Bytecodes::Size(bytecode); | 11617 bytes = interpreter::Bytecodes::Size(bytecode); |
11618 | 11618 |
11619 SNPrintF(buf, "%p : ", GetFirstBytecodeAddress() + i); | 11619 SNPrintF(buf, "%p : ", GetFirstBytecodeAddress() + i); |
11620 os << buf.start(); | 11620 os << buf.start(); |
11621 for (int j = 0; j < bytecode_size; j++) { | 11621 for (int j = 0; j < bytes; j++) { |
11622 SNPrintF(buf, "%02x ", get(i + j)); | 11622 SNPrintF(buf, "%02x ", get(i + j)); |
11623 os << buf.start(); | 11623 os << buf.start(); |
11624 } | 11624 } |
11625 for (int j = bytecode_size; j < interpreter::Bytecodes::kMaximumSize; j++) { | 11625 for (int j = bytes; j < interpreter::Bytecodes::MaximumSize(); j++) { |
11626 os << " "; | 11626 os << " "; |
11627 } | 11627 } |
11628 os << bytecode << "\n"; | 11628 os << bytecode << "\n"; |
11629 } | 11629 } |
11630 } | 11630 } |
11631 | 11631 |
11632 | 11632 |
11633 // static | 11633 // static |
11634 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { | 11634 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { |
11635 DCHECK(capacity >= 0); | 11635 DCHECK(capacity >= 0); |
(...skipping 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15772 if (cell->value() != *new_value) { | 15772 if (cell->value() != *new_value) { |
15773 cell->set_value(*new_value); | 15773 cell->set_value(*new_value); |
15774 Isolate* isolate = cell->GetIsolate(); | 15774 Isolate* isolate = cell->GetIsolate(); |
15775 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 15775 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
15776 isolate, DependentCode::kPropertyCellChangedGroup); | 15776 isolate, DependentCode::kPropertyCellChangedGroup); |
15777 } | 15777 } |
15778 } | 15778 } |
15779 | 15779 |
15780 } // namespace internal | 15780 } // namespace internal |
15781 } // namespace v8 | 15781 } // namespace v8 |
OLD | NEW |