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

Side by Side Diff: src/deoptimizer.h

Issue 587623002: Introduce a class to carry around a deoptimization reason. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Re-added a few Comment calls which were accidentally removed. Created 6 years, 3 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.h » ('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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 EAGER, 94 EAGER,
95 LAZY, 95 LAZY,
96 SOFT, 96 SOFT,
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 {
105 Reason(const char* m, const char* d) : mnemonic(m), detail(d) {}
106 const char* mnemonic;
107 const char* detail;
108 };
109
104 struct JumpTableEntry : public ZoneObject { 110 struct JumpTableEntry : public ZoneObject {
105 inline JumpTableEntry(Address entry, const char* the_mnemonic, 111 inline JumpTableEntry(Address entry, const Reason& the_reason,
106 const char* the_reason, Deoptimizer::BailoutType type, 112 Deoptimizer::BailoutType type, bool frame)
107 bool frame)
108 : label(), 113 : label(),
109 address(entry), 114 address(entry),
110 mnemonic(the_mnemonic),
111 reason(the_reason), 115 reason(the_reason),
112 bailout_type(type), 116 bailout_type(type),
113 needs_frame(frame) {} 117 needs_frame(frame) {}
114 Label label; 118 Label label;
115 Address address; 119 Address address;
116 const char* mnemonic; 120 Reason reason;
117 const char* reason;
118 Deoptimizer::BailoutType bailout_type; 121 Deoptimizer::BailoutType bailout_type;
119 bool needs_frame; 122 bool needs_frame;
120 }; 123 };
121 124
122 static bool TraceEnabledFor(BailoutType deopt_type, 125 static bool TraceEnabledFor(BailoutType deopt_type,
123 StackFrame::Type frame_type); 126 StackFrame::Type frame_type);
124 static const char* MessageFor(BailoutType type); 127 static const char* MessageFor(BailoutType type);
125 128
126 int output_count() const { return output_count_; } 129 int output_count() const { return output_count_; }
127 130
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 Object** parameters_; 963 Object** parameters_;
961 Object** expression_stack_; 964 Object** expression_stack_;
962 int source_position_; 965 int source_position_;
963 966
964 friend class Deoptimizer; 967 friend class Deoptimizer;
965 }; 968 };
966 969
967 } } // namespace v8::internal 970 } } // namespace v8::internal
968 971
969 #endif // V8_DEOPTIMIZER_H_ 972 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698