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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 kMustNotHaveEagerFrame = 1 << 4, | 118 kMustNotHaveEagerFrame = 1 << 4, |
119 kDeoptimizationSupport = 1 << 5, | 119 kDeoptimizationSupport = 1 << 5, |
120 kDebug = 1 << 6, | 120 kDebug = 1 << 6, |
121 kCompilingForDebugging = 1 << 7, | 121 kCompilingForDebugging = 1 << 7, |
122 kSerializing = 1 << 8, | 122 kSerializing = 1 << 8, |
123 kContextSpecializing = 1 << 9, | 123 kContextSpecializing = 1 << 9, |
124 kInliningEnabled = 1 << 10, | 124 kInliningEnabled = 1 << 10, |
125 kTypingEnabled = 1 << 11, | 125 kTypingEnabled = 1 << 11, |
126 kDisableFutureOptimization = 1 << 12, | 126 kDisableFutureOptimization = 1 << 12, |
127 kSplittingEnabled = 1 << 13, | 127 kSplittingEnabled = 1 << 13, |
128 kBuiltinInliningEnabled = 1 << 14, | 128 kTypeFeedbackEnabled = 1 << 14, |
129 kTypeFeedbackEnabled = 1 << 15, | 129 kDeoptimizationEnabled = 1 << 15, |
130 kDeoptimizationEnabled = 1 << 16, | 130 kSourcePositionsEnabled = 1 << 16 |
131 kSourcePositionsEnabled = 1 << 17 | |
132 }; | 131 }; |
133 | 132 |
134 explicit CompilationInfo(ParseInfo* parse_info); | 133 explicit CompilationInfo(ParseInfo* parse_info); |
135 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); | 134 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); |
136 virtual ~CompilationInfo(); | 135 virtual ~CompilationInfo(); |
137 | 136 |
138 ParseInfo* parse_info() const { return parse_info_; } | 137 ParseInfo* parse_info() const { return parse_info_; } |
139 | 138 |
140 // ----------------------------------------------------------- | 139 // ----------------------------------------------------------- |
141 // TODO(titzer): inline and delete accessors of ParseInfo | 140 // TODO(titzer): inline and delete accessors of ParseInfo |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 void MarkAsSourcePositionsEnabled() { SetFlag(kSourcePositionsEnabled); } | 230 void MarkAsSourcePositionsEnabled() { SetFlag(kSourcePositionsEnabled); } |
232 | 231 |
233 bool is_source_positions_enabled() const { | 232 bool is_source_positions_enabled() const { |
234 return GetFlag(kSourcePositionsEnabled); | 233 return GetFlag(kSourcePositionsEnabled); |
235 } | 234 } |
236 | 235 |
237 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 236 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
238 | 237 |
239 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 238 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
240 | 239 |
241 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } | |
242 | |
243 bool is_builtin_inlining_enabled() const { | |
244 return GetFlag(kBuiltinInliningEnabled); | |
245 } | |
246 | |
247 void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); } | 240 void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); } |
248 | 241 |
249 bool is_typing_enabled() const { return GetFlag(kTypingEnabled); } | 242 bool is_typing_enabled() const { return GetFlag(kTypingEnabled); } |
250 | 243 |
251 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } | 244 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } |
252 | 245 |
253 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } | 246 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } |
254 | 247 |
255 bool IsCodePreAgingActive() const { | 248 bool IsCodePreAgingActive() const { |
256 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && | 249 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 Zone zone_; | 672 Zone zone_; |
680 size_t info_zone_start_allocation_size_; | 673 size_t info_zone_start_allocation_size_; |
681 base::ElapsedTimer timer_; | 674 base::ElapsedTimer timer_; |
682 | 675 |
683 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 676 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
684 }; | 677 }; |
685 | 678 |
686 } } // namespace v8::internal | 679 } } // namespace v8::internal |
687 | 680 |
688 #endif // V8_COMPILER_H_ | 681 #endif // V8_COMPILER_H_ |
OLD | NEW |