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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 12488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12499 int bytecode_size = 0; | 12499 int bytecode_size = 0; |
12500 for (int i = 0; i < this->length(); i += bytecode_size) { | 12500 for (int i = 0; i < this->length(); i += bytecode_size) { |
12501 const uint8_t* bytecode_start = &first_bytecode_address[i]; | 12501 const uint8_t* bytecode_start = &first_bytecode_address[i]; |
12502 interpreter::Bytecode bytecode = | 12502 interpreter::Bytecode bytecode = |
12503 interpreter::Bytecodes::FromByte(bytecode_start[0]); | 12503 interpreter::Bytecodes::FromByte(bytecode_start[0]); |
12504 bytecode_size = interpreter::Bytecodes::Size(bytecode); | 12504 bytecode_size = interpreter::Bytecodes::Size(bytecode); |
12505 | 12505 |
12506 SNPrintF(buf, "%p", bytecode_start); | 12506 SNPrintF(buf, "%p", bytecode_start); |
12507 os << buf.start() << " : "; | 12507 os << buf.start() << " : "; |
12508 interpreter::Bytecodes::Decode(os, bytecode_start, parameter_count()); | 12508 interpreter::Bytecodes::Decode(os, bytecode_start, parameter_count()); |
| 12509 if (interpreter::Bytecodes::IsJump(bytecode)) { |
| 12510 int offset = static_cast<int8_t>(bytecode_start[1]); |
| 12511 SNPrintF(buf, " (%p)", bytecode_start + offset); |
| 12512 os << buf.start(); |
| 12513 } else if (interpreter::Bytecodes::IsJumpConstant(bytecode)) { |
| 12514 int index = static_cast<int>(bytecode_start[1]); |
| 12515 int offset = Smi::cast(constant_pool()->get(index))->value(); |
| 12516 SNPrintF(buf, " (%p)", bytecode_start + offset); |
| 12517 os << buf.start(); |
| 12518 } |
12509 os << "\n"; | 12519 os << "\n"; |
12510 } | 12520 } |
12511 | 12521 |
12512 os << "Constant pool (size = " << constant_pool()->length() << ")\n"; | 12522 os << "Constant pool (size = " << constant_pool()->length() << ")\n"; |
12513 constant_pool()->Print(); | 12523 constant_pool()->Print(); |
12514 } | 12524 } |
12515 | 12525 |
12516 | 12526 |
12517 // static | 12527 // static |
12518 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { | 12528 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { |
(...skipping 4283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16802 if (cell->value() != *new_value) { | 16812 if (cell->value() != *new_value) { |
16803 cell->set_value(*new_value); | 16813 cell->set_value(*new_value); |
16804 Isolate* isolate = cell->GetIsolate(); | 16814 Isolate* isolate = cell->GetIsolate(); |
16805 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16815 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16806 isolate, DependentCode::kPropertyCellChangedGroup); | 16816 isolate, DependentCode::kPropertyCellChangedGroup); |
16807 } | 16817 } |
16808 } | 16818 } |
16809 | 16819 |
16810 } // namespace internal | 16820 } // namespace internal |
16811 } // namespace v8 | 16821 } // namespace v8 |
OLD | NEW |