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

Side by Side Diff: src/objects.cc

Issue 2023503002: Reland Implement .eh_frame writer and disassembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame-base
Patch Set: Rebase on master. Created 4 years, 5 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
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/perf-jit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "src/source-position-table.h" 54 #include "src/source-position-table.h"
55 #include "src/string-builder.h" 55 #include "src/string-builder.h"
56 #include "src/string-search.h" 56 #include "src/string-search.h"
57 #include "src/string-stream.h" 57 #include "src/string-stream.h"
58 #include "src/utils.h" 58 #include "src/utils.h"
59 #include "src/zone.h" 59 #include "src/zone.h"
60 60
61 #ifdef ENABLE_DISASSEMBLER 61 #ifdef ENABLE_DISASSEMBLER
62 #include "src/disasm.h" 62 #include "src/disasm.h"
63 #include "src/disassembler.h" 63 #include "src/disassembler.h"
64 #include "src/eh-frame.h"
64 #endif 65 #endif
65 66
66 namespace v8 { 67 namespace v8 {
67 namespace internal { 68 namespace internal {
68 69
69 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) { 70 std::ostream& operator<<(std::ostream& os, InstanceType instance_type) {
70 switch (instance_type) { 71 switch (instance_type) {
71 #define WRITE_TYPE(TYPE) \ 72 #define WRITE_TYPE(TYPE) \
72 case TYPE: \ 73 case TYPE: \
73 return os << #TYPE; 74 return os << #TYPE;
(...skipping 14268 matching lines...) Expand 10 before | Expand all | Expand 10 after
14342 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os); 14343 HandlerTable::cast(handler_table())->HandlerTableReturnPrint(os);
14343 } 14344 }
14344 os << "\n"; 14345 os << "\n";
14345 } 14346 }
14346 14347
14347 os << "RelocInfo (size = " << relocation_size() << ")\n"; 14348 os << "RelocInfo (size = " << relocation_size() << ")\n";
14348 for (RelocIterator it(this); !it.done(); it.next()) { 14349 for (RelocIterator it(this); !it.done(); it.next()) {
14349 it.rinfo()->Print(GetIsolate(), os); 14350 it.rinfo()->Print(GetIsolate(), os);
14350 } 14351 }
14351 os << "\n"; 14352 os << "\n";
14353
14354 if (has_unwinding_info()) {
14355 os << "UnwindingInfo (size = " << unwinding_info_size() << ")\n";
14356 EhFrameDisassembler eh_frame_disassembler(unwinding_info_start(),
14357 unwinding_info_end());
14358 eh_frame_disassembler.DisassembleToStream(os);
14359 os << "\n";
14360 }
14352 } 14361 }
14353 #endif // ENABLE_DISASSEMBLER 14362 #endif // ENABLE_DISASSEMBLER
14354 14363
14355 14364
14356 void BytecodeArray::Disassemble(std::ostream& os) { 14365 void BytecodeArray::Disassemble(std::ostream& os) {
14357 os << "Parameter count " << parameter_count() << "\n"; 14366 os << "Parameter count " << parameter_count() << "\n";
14358 os << "Frame size " << frame_size() << "\n"; 14367 os << "Frame size " << frame_size() << "\n";
14359 14368
14360 const uint8_t* base_address = GetFirstBytecodeAddress(); 14369 const uint8_t* base_address = GetFirstBytecodeAddress();
14361 SourcePositionTableIterator source_positions(source_position_table()); 14370 SourcePositionTableIterator source_positions(source_position_table());
(...skipping 4572 matching lines...) Expand 10 before | Expand all | Expand 10 after
18934 18943
18935 Object* data_obj = 18944 Object* data_obj =
18936 constructor->shared()->get_api_func_data()->access_check_info(); 18945 constructor->shared()->get_api_func_data()->access_check_info();
18937 if (data_obj->IsUndefined(isolate)) return nullptr; 18946 if (data_obj->IsUndefined(isolate)) return nullptr;
18938 18947
18939 return AccessCheckInfo::cast(data_obj); 18948 return AccessCheckInfo::cast(data_obj);
18940 } 18949 }
18941 18950
18942 } // namespace internal 18951 } // namespace internal
18943 } // namespace v8 18952 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/perf-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698