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 << 11, | 117 kMustNotHaveEagerFrame = 1 << 11, |
118 kDeoptimizationSupport = 1 << 12, | 118 kDeoptimizationSupport = 1 << 12, |
119 kDebug = 1 << 13, | 119 kDebug = 1 << 13, |
120 kCompilingForDebugging = 1 << 14, | 120 kCompilingForDebugging = 1 << 14, |
121 kSerializing = 1 << 16, | 121 kSerializing = 1 << 16, |
122 kContextSpecializing = 1 << 17, | 122 kContextSpecializing = 1 << 17, |
123 kInliningEnabled = 1 << 18, | 123 kInliningEnabled = 1 << 18, |
124 kTypingEnabled = 1 << 19, | 124 kTypingEnabled = 1 << 19, |
125 kDisableFutureOptimization = 1 << 20, | 125 kDisableFutureOptimization = 1 << 20, |
126 kSplittingEnabled = 1 << 23, | 126 kSplittingEnabled = 1 << 23, |
127 kBuiltinInliningEnabled = 1 << 24 | 127 kBuiltinInliningEnabled = 1 << 24, |
| 128 kTypeFeedbackEnabled = 1 << 25 |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 bool is_debug() const { return GetFlag(kDebug); } | 204 bool is_debug() const { return GetFlag(kDebug); } |
204 | 205 |
205 void PrepareForSerializing() { SetFlag(kSerializing); } | 206 void PrepareForSerializing() { SetFlag(kSerializing); } |
206 | 207 |
207 bool will_serialize() const { return GetFlag(kSerializing); } | 208 bool will_serialize() const { return GetFlag(kSerializing); } |
208 | 209 |
209 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } | 210 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } |
210 | 211 |
211 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } | 212 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } |
212 | 213 |
| 214 void MarkAsTypeFeedbackEnabled() { SetFlag(kTypeFeedbackEnabled); } |
| 215 |
| 216 bool is_type_feedback_enabled() const { |
| 217 return GetFlag(kTypeFeedbackEnabled); |
| 218 } |
| 219 |
213 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 220 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
214 | 221 |
215 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 222 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
216 | 223 |
217 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } | 224 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } |
218 | 225 |
219 bool is_builtin_inlining_enabled() const { | 226 bool is_builtin_inlining_enabled() const { |
220 return GetFlag(kBuiltinInliningEnabled); | 227 return GetFlag(kBuiltinInliningEnabled); |
221 } | 228 } |
222 | 229 |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 Zone zone_; | 708 Zone zone_; |
702 size_t info_zone_start_allocation_size_; | 709 size_t info_zone_start_allocation_size_; |
703 base::ElapsedTimer timer_; | 710 base::ElapsedTimer timer_; |
704 | 711 |
705 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 712 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
706 }; | 713 }; |
707 | 714 |
708 } } // namespace v8::internal | 715 } } // namespace v8::internal |
709 | 716 |
710 #endif // V8_COMPILER_H_ | 717 #endif // V8_COMPILER_H_ |
OLD | NEW |