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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 kBuiltinInliningEnabled = 1 << 14, |
129 kTypeFeedbackEnabled = 1 << 15, | 129 kTypeFeedbackEnabled = 1 << 15, |
130 kDeoptimizationEnabled = 1 << 16 | 130 kDeoptimizationEnabled = 1 << 16, |
| 131 kSourcePositionsEnabled = 1 << 17 |
131 }; | 132 }; |
132 | 133 |
133 explicit CompilationInfo(ParseInfo* parse_info); | 134 explicit CompilationInfo(ParseInfo* parse_info); |
134 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); | 135 CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); |
135 virtual ~CompilationInfo(); | 136 virtual ~CompilationInfo(); |
136 | 137 |
137 ParseInfo* parse_info() const { return parse_info_; } | 138 ParseInfo* parse_info() const { return parse_info_; } |
138 | 139 |
139 // ----------------------------------------------------------- | 140 // ----------------------------------------------------------- |
140 // TODO(titzer): inline and delete accessors of ParseInfo | 141 // TODO(titzer): inline and delete accessors of ParseInfo |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 bool is_type_feedback_enabled() const { | 218 bool is_type_feedback_enabled() const { |
218 return GetFlag(kTypeFeedbackEnabled); | 219 return GetFlag(kTypeFeedbackEnabled); |
219 } | 220 } |
220 | 221 |
221 void MarkAsDeoptimizationEnabled() { SetFlag(kDeoptimizationEnabled); } | 222 void MarkAsDeoptimizationEnabled() { SetFlag(kDeoptimizationEnabled); } |
222 | 223 |
223 bool is_deoptimization_enabled() const { | 224 bool is_deoptimization_enabled() const { |
224 return GetFlag(kDeoptimizationEnabled); | 225 return GetFlag(kDeoptimizationEnabled); |
225 } | 226 } |
226 | 227 |
| 228 void MarkAsSourcePositionsEnabled() { SetFlag(kSourcePositionsEnabled); } |
| 229 |
| 230 bool is_source_positions_enabled() const { |
| 231 return GetFlag(kSourcePositionsEnabled); |
| 232 } |
| 233 |
227 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 234 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
228 | 235 |
229 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 236 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
230 | 237 |
231 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } | 238 void MarkAsBuiltinInliningEnabled() { SetFlag(kBuiltinInliningEnabled); } |
232 | 239 |
233 bool is_builtin_inlining_enabled() const { | 240 bool is_builtin_inlining_enabled() const { |
234 return GetFlag(kBuiltinInliningEnabled); | 241 return GetFlag(kBuiltinInliningEnabled); |
235 } | 242 } |
236 | 243 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 Zone zone_; | 674 Zone zone_; |
668 size_t info_zone_start_allocation_size_; | 675 size_t info_zone_start_allocation_size_; |
669 base::ElapsedTimer timer_; | 676 base::ElapsedTimer timer_; |
670 | 677 |
671 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 678 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
672 }; | 679 }; |
673 | 680 |
674 } } // namespace v8::internal | 681 } } // namespace v8::internal |
675 | 682 |
676 #endif // V8_COMPILER_H_ | 683 #endif // V8_COMPILER_H_ |
OLD | NEW |