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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 10853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10864 } | 10864 } |
10865 } | 10865 } |
10866 if ((name != NULL) && (name[0] != '\0')) { | 10866 if ((name != NULL) && (name[0] != '\0')) { |
10867 os << "name = " << name << "\n"; | 10867 os << "name = " << name << "\n"; |
10868 } | 10868 } |
10869 if (kind() == OPTIMIZED_FUNCTION) { | 10869 if (kind() == OPTIMIZED_FUNCTION) { |
10870 os << "stack_slots = " << stack_slots() << "\n"; | 10870 os << "stack_slots = " << stack_slots() << "\n"; |
10871 } | 10871 } |
10872 | 10872 |
10873 os << "Instructions (size = " << instruction_size() << ")\n"; | 10873 os << "Instructions (size = " << instruction_size() << ")\n"; |
10874 // TODO(svenpanne) The Disassembler should use streams, too! | |
10875 { | 10874 { |
10876 CodeTracer::Scope trace_scope(GetIsolate()->GetCodeTracer()); | 10875 Isolate* isolate = GetIsolate(); |
10877 Disassembler::Decode(trace_scope.file(), this); | 10876 int decode_size = is_crankshafted() |
| 10877 ? static_cast<int>(safepoint_table_offset()) |
| 10878 : instruction_size(); |
| 10879 // If there might be a back edge table, stop before reaching it. |
| 10880 if (kind() == Code::FUNCTION) { |
| 10881 decode_size = |
| 10882 Min(decode_size, static_cast<int>(back_edge_table_offset())); |
| 10883 } |
| 10884 byte* begin = instruction_start(); |
| 10885 byte* end = begin + decode_size; |
| 10886 Disassembler::Decode(isolate, &os, begin, end, this); |
10878 } | 10887 } |
10879 os << "\n"; | 10888 os << "\n"; |
10880 | 10889 |
10881 if (kind() == FUNCTION) { | 10890 if (kind() == FUNCTION) { |
10882 DeoptimizationOutputData* data = | 10891 DeoptimizationOutputData* data = |
10883 DeoptimizationOutputData::cast(this->deoptimization_data()); | 10892 DeoptimizationOutputData::cast(this->deoptimization_data()); |
10884 data->DeoptimizationOutputDataPrint(os); | 10893 data->DeoptimizationOutputDataPrint(os); |
10885 } else if (kind() == OPTIMIZED_FUNCTION) { | 10894 } else if (kind() == OPTIMIZED_FUNCTION) { |
10886 DeoptimizationInputData* data = | 10895 DeoptimizationInputData* data = |
10887 DeoptimizationInputData::cast(this->deoptimization_data()); | 10896 DeoptimizationInputData::cast(this->deoptimization_data()); |
(...skipping 5466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16354 Handle<DependentCode> codes = | 16363 Handle<DependentCode> codes = |
16355 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16364 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
16356 DependentCode::kPropertyCellChangedGroup, | 16365 DependentCode::kPropertyCellChangedGroup, |
16357 info->object_wrapper()); | 16366 info->object_wrapper()); |
16358 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16367 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
16359 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16368 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
16360 cell, info->zone()); | 16369 cell, info->zone()); |
16361 } | 16370 } |
16362 | 16371 |
16363 } } // namespace v8::internal | 16372 } } // namespace v8::internal |
OLD | NEW |