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

Side by Side Diff: src/deoptimizer.h

Issue 595513002: Further improve deopt reason output. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/lithium-codegen-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_DEOPTIMIZER_H_ 5 #ifndef V8_DEOPTIMIZER_H_
6 #define V8_DEOPTIMIZER_H_ 6 #define V8_DEOPTIMIZER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // This last bailout type is not really a bailout, but used by the 97 // This last bailout type is not really a bailout, but used by the
98 // debugger to deoptimize stack frames to allow inspection. 98 // debugger to deoptimize stack frames to allow inspection.
99 DEBUGGER 99 DEBUGGER
100 }; 100 };
101 101
102 static const int kBailoutTypesWithCodeEntry = SOFT + 1; 102 static const int kBailoutTypesWithCodeEntry = SOFT + 1;
103 103
104 struct Reason { 104 struct Reason {
105 Reason(int r, const char* m, const char* d) 105 Reason(int r, const char* m, const char* d)
106 : raw_position(r), mnemonic(m), detail(d) {} 106 : raw_position(r), mnemonic(m), detail(d) {}
107
108 bool operator==(const Reason& other) const {
109 return raw_position == other.raw_position &&
110 CStringEquals(mnemonic, other.mnemonic) &&
111 CStringEquals(detail, other.detail);
112 }
113
114 bool operator!=(const Reason& other) const { return !(*this == other); }
115
107 int raw_position; 116 int raw_position;
108 const char* mnemonic; 117 const char* mnemonic;
109 const char* detail; 118 const char* detail;
110 }; 119 };
111 120
112 struct JumpTableEntry : public ZoneObject { 121 struct JumpTableEntry : public ZoneObject {
113 inline JumpTableEntry(Address entry, const Reason& the_reason, 122 inline JumpTableEntry(Address entry, const Reason& the_reason,
114 Deoptimizer::BailoutType type, bool frame) 123 Deoptimizer::BailoutType type, bool frame)
115 : label(), 124 : label(),
116 address(entry), 125 address(entry),
117 reason(the_reason), 126 reason(the_reason),
118 bailout_type(type), 127 bailout_type(type),
119 needs_frame(frame) {} 128 needs_frame(frame) {}
129
130 bool IsEquivalentTo(const JumpTableEntry& other) const {
131 return address == other.address && bailout_type == other.bailout_type &&
132 needs_frame == other.needs_frame &&
133 (!FLAG_trace_deopt || reason == other.reason);
134 }
135
120 Label label; 136 Label label;
121 Address address; 137 Address address;
122 Reason reason; 138 Reason reason;
123 Deoptimizer::BailoutType bailout_type; 139 Deoptimizer::BailoutType bailout_type;
124 bool needs_frame; 140 bool needs_frame;
125 }; 141 };
126 142
127 static bool TraceEnabledFor(BailoutType deopt_type, 143 static bool TraceEnabledFor(BailoutType deopt_type,
128 StackFrame::Type frame_type); 144 StackFrame::Type frame_type);
129 static const char* MessageFor(BailoutType type); 145 static const char* MessageFor(BailoutType type);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 Object** parameters_; 981 Object** parameters_;
966 Object** expression_stack_; 982 Object** expression_stack_;
967 int source_position_; 983 int source_position_;
968 984
969 friend class Deoptimizer; 985 friend class Deoptimizer;
970 }; 986 };
971 987
972 } } // namespace v8::internal 988 } } // namespace v8::internal
973 989
974 #endif // V8_DEOPTIMIZER_H_ 990 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698