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/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 kDebug = 1 << 6, | 152 kDebug = 1 << 6, |
153 kSerializing = 1 << 7, | 153 kSerializing = 1 << 7, |
154 kFunctionContextSpecializing = 1 << 8, | 154 kFunctionContextSpecializing = 1 << 8, |
155 kFrameSpecializing = 1 << 9, | 155 kFrameSpecializing = 1 << 9, |
156 kNativeContextSpecializing = 1 << 10, | 156 kNativeContextSpecializing = 1 << 10, |
157 kInliningEnabled = 1 << 11, | 157 kInliningEnabled = 1 << 11, |
158 kDisableFutureOptimization = 1 << 12, | 158 kDisableFutureOptimization = 1 << 12, |
159 kSplittingEnabled = 1 << 13, | 159 kSplittingEnabled = 1 << 13, |
160 kDeoptimizationEnabled = 1 << 14, | 160 kDeoptimizationEnabled = 1 << 14, |
161 kSourcePositionsEnabled = 1 << 15, | 161 kSourcePositionsEnabled = 1 << 15, |
162 kEffectSchedulingEnabled = 1 << 16, | 162 kBailoutOnUninitialized = 1 << 16, |
163 kBailoutOnUninitialized = 1 << 17, | 163 kOptimizeFromBytecode = 1 << 17, |
164 kOptimizeFromBytecode = 1 << 18, | |
165 }; | 164 }; |
166 | 165 |
167 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); | 166 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); |
168 CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, | 167 CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, |
169 Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); | 168 Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); |
170 virtual ~CompilationInfo(); | 169 virtual ~CompilationInfo(); |
171 | 170 |
172 ParseInfo* parse_info() const { return parse_info_; } | 171 ParseInfo* parse_info() const { return parse_info_; } |
173 | 172 |
174 // ----------------------------------------------------------- | 173 // ----------------------------------------------------------- |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 bool is_native_context_specializing() const { | 267 bool is_native_context_specializing() const { |
269 return GetFlag(kNativeContextSpecializing); | 268 return GetFlag(kNativeContextSpecializing); |
270 } | 269 } |
271 | 270 |
272 void MarkAsDeoptimizationEnabled() { SetFlag(kDeoptimizationEnabled); } | 271 void MarkAsDeoptimizationEnabled() { SetFlag(kDeoptimizationEnabled); } |
273 | 272 |
274 bool is_deoptimization_enabled() const { | 273 bool is_deoptimization_enabled() const { |
275 return GetFlag(kDeoptimizationEnabled); | 274 return GetFlag(kDeoptimizationEnabled); |
276 } | 275 } |
277 | 276 |
278 void MarkAsEffectSchedulingEnabled() { SetFlag(kEffectSchedulingEnabled); } | |
279 | |
280 bool is_effect_scheduling_enabled() const { | |
281 return GetFlag(kEffectSchedulingEnabled); | |
282 } | |
283 | |
284 void MarkAsSourcePositionsEnabled() { SetFlag(kSourcePositionsEnabled); } | 277 void MarkAsSourcePositionsEnabled() { SetFlag(kSourcePositionsEnabled); } |
285 | 278 |
286 bool is_source_positions_enabled() const { | 279 bool is_source_positions_enabled() const { |
287 return GetFlag(kSourcePositionsEnabled); | 280 return GetFlag(kSourcePositionsEnabled); |
288 } | 281 } |
289 | 282 |
290 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 283 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
291 | 284 |
292 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 285 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
293 | 286 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 MUST_USE_RESULT Status SetLastStatus(Status status) { | 619 MUST_USE_RESULT Status SetLastStatus(Status status) { |
627 last_status_ = status; | 620 last_status_ = status; |
628 return last_status_; | 621 return last_status_; |
629 } | 622 } |
630 }; | 623 }; |
631 | 624 |
632 } // namespace internal | 625 } // namespace internal |
633 } // namespace v8 | 626 } // namespace v8 |
634 | 627 |
635 #endif // V8_COMPILER_H_ | 628 #endif // V8_COMPILER_H_ |
OLD | NEW |