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 11602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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"; |
rmcilroy
2015/07/28 08:58:12
could we add the formatted versions of the argumen
oth
2015/07/28 13:24:14
Part of next patch.
| |
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); |
11645 array->GetIsolate()->factory()->NewJSArrayStorage( | 11645 array->GetIsolate()->factory()->NewJSArrayStorage( |
11646 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); | 11646 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); |
11647 } | 11647 } |
(...skipping 4275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
OLD | NEW |