OLD | NEW |
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_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 kMustNotHaveEagerFrame = 1 << 4, | 117 kMustNotHaveEagerFrame = 1 << 4, |
118 kDeoptimizationSupport = 1 << 5, | 118 kDeoptimizationSupport = 1 << 5, |
119 kDebug = 1 << 6, | 119 kDebug = 1 << 6, |
120 kCompilingForDebugging = 1 << 7, | 120 kCompilingForDebugging = 1 << 7, |
121 kSerializing = 1 << 8, | 121 kSerializing = 1 << 8, |
122 kContextSpecializing = 1 << 9, | 122 kContextSpecializing = 1 << 9, |
123 kInliningEnabled = 1 << 10, | 123 kInliningEnabled = 1 << 10, |
124 kTypingEnabled = 1 << 11, | 124 kTypingEnabled = 1 << 11, |
125 kDisableFutureOptimization = 1 << 12, | 125 kDisableFutureOptimization = 1 << 12, |
126 kSplittingEnabled = 1 << 13, | 126 kSplittingEnabled = 1 << 13, |
127 kBuiltinInliningEnabled = 1 << 14 | 127 kBuiltinInliningEnabled = 1 << 14, |
| 128 kTypeFeedbackEnabled = 1 << 15 |
128 }; | 129 }; |
129 | 130 |
130 explicit CompilationInfo(ParseInfo* parse_info); | 131 explicit CompilationInfo(ParseInfo* parse_info); |
131 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); | 132 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); |
132 virtual ~CompilationInfo(); | 133 virtual ~CompilationInfo(); |
133 | 134 |
134 ParseInfo* parse_info() const { return parse_info_; } | 135 ParseInfo* parse_info() const { return parse_info_; } |
135 | 136 |
136 // ----------------------------------------------------------- | 137 // ----------------------------------------------------------- |
137 // TODO(titzer): inline and delete accessors of ParseInfo | 138 // TODO(titzer): inline and delete accessors of ParseInfo |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 bool is_debug() const { return GetFlag(kDebug); } | 203 bool is_debug() const { return GetFlag(kDebug); } |
203 | 204 |
204 void PrepareForSerializing() { SetFlag(kSerializing); } | 205 void PrepareForSerializing() { SetFlag(kSerializing); } |
205 | 206 |
206 bool will_serialize() const { return GetFlag(kSerializing); } | 207 bool will_serialize() const { return GetFlag(kSerializing); } |
207 | 208 |
208 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } | 209 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } |
209 | 210 |
210 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } | 211 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } |
211 | 212 |
| 213 void MarkAsTypeFeedbackEnabled() { SetFlag(kTypeFeedbackEnabled); } |
| 214 |
| 215 bool is_type_feedback_enabled() const { |
| 216 return GetFlag(kTypeFeedbackEnabled); |
| 217 } |
| 218 |
212 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 219 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
213 | 220 |
214 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 221 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
215 | 222 |
216 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } | 223 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } |
217 | 224 |
218 bool is_builtin_inlining_enabled() const { | 225 bool is_builtin_inlining_enabled() const { |
219 return GetFlag(kBuiltinInliningEnabled); | 226 return GetFlag(kBuiltinInliningEnabled); |
220 } | 227 } |
221 | 228 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 Zone zone_; | 692 Zone zone_; |
686 size_t info_zone_start_allocation_size_; | 693 size_t info_zone_start_allocation_size_; |
687 base::ElapsedTimer timer_; | 694 base::ElapsedTimer timer_; |
688 | 695 |
689 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 696 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
690 }; | 697 }; |
691 | 698 |
692 } } // namespace v8::internal | 699 } } // namespace v8::internal |
693 | 700 |
694 #endif // V8_COMPILER_H_ | 701 #endif // V8_COMPILER_H_ |
OLD | NEW |