| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 kDebug = 1 << 6, | 151 kDebug = 1 << 6, |
| 152 kSerializing = 1 << 7, | 152 kSerializing = 1 << 7, |
| 153 kFunctionContextSpecializing = 1 << 8, | 153 kFunctionContextSpecializing = 1 << 8, |
| 154 kFrameSpecializing = 1 << 9, | 154 kFrameSpecializing = 1 << 9, |
| 155 kNativeContextSpecializing = 1 << 10, | 155 kNativeContextSpecializing = 1 << 10, |
| 156 kInliningEnabled = 1 << 11, | 156 kInliningEnabled = 1 << 11, |
| 157 kDisableFutureOptimization = 1 << 12, | 157 kDisableFutureOptimization = 1 << 12, |
| 158 kSplittingEnabled = 1 << 13, | 158 kSplittingEnabled = 1 << 13, |
| 159 kDeoptimizationEnabled = 1 << 14, | 159 kDeoptimizationEnabled = 1 << 14, |
| 160 kSourcePositionsEnabled = 1 << 15, | 160 kSourcePositionsEnabled = 1 << 15, |
| 161 kFirstCompile = 1 << 16, | 161 kBailoutOnUninitialized = 1 << 16, |
| 162 kBailoutOnUninitialized = 1 << 17, | |
| 163 }; | 162 }; |
| 164 | 163 |
| 165 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); | 164 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); |
| 166 CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, | 165 CompilationInfo(const char* debug_name, Isolate* isolate, Zone* zone, |
| 167 Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); | 166 Code::Flags code_flags = Code::ComputeFlags(Code::STUB)); |
| 168 virtual ~CompilationInfo(); | 167 virtual ~CompilationInfo(); |
| 169 | 168 |
| 170 ParseInfo* parse_info() const { return parse_info_; } | 169 ParseInfo* parse_info() const { return parse_info_; } |
| 171 | 170 |
| 172 // ----------------------------------------------------------- | 171 // ----------------------------------------------------------- |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 } | 284 } |
| 286 | 285 |
| 287 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } | 286 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
| 288 | 287 |
| 289 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 288 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
| 290 | 289 |
| 291 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } | 290 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } |
| 292 | 291 |
| 293 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } | 292 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } |
| 294 | 293 |
| 295 void MarkAsFirstCompile() { SetFlag(kFirstCompile); } | |
| 296 | |
| 297 void MarkAsCompiled() { SetFlag(kFirstCompile, false); } | |
| 298 | |
| 299 bool is_first_compile() const { return GetFlag(kFirstCompile); } | |
| 300 | |
| 301 void MarkAsBailoutOnUninitialized() { SetFlag(kBailoutOnUninitialized); } | 294 void MarkAsBailoutOnUninitialized() { SetFlag(kBailoutOnUninitialized); } |
| 302 | 295 |
| 303 bool is_bailout_on_uninitialized() const { | 296 bool is_bailout_on_uninitialized() const { |
| 304 return GetFlag(kBailoutOnUninitialized); | 297 return GetFlag(kBailoutOnUninitialized); |
| 305 } | 298 } |
| 306 | 299 |
| 307 bool GeneratePreagedPrologue() const { | 300 bool GeneratePreagedPrologue() const { |
| 308 // Generate a pre-aged prologue if we are optimizing for size, which | 301 // Generate a pre-aged prologue if we are optimizing for size, which |
| 309 // will make code flushing more aggressive. Only apply to Code::FUNCTION, | 302 // will make code flushing more aggressive. Only apply to Code::FUNCTION, |
| 310 // since StaticMarkingVisitor::IsFlushable only flushes proper functions. | 303 // since StaticMarkingVisitor::IsFlushable only flushes proper functions. |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 MUST_USE_RESULT Status SetLastStatus(Status status) { | 616 MUST_USE_RESULT Status SetLastStatus(Status status) { |
| 624 last_status_ = status; | 617 last_status_ = status; |
| 625 return last_status_; | 618 return last_status_; |
| 626 } | 619 } |
| 627 }; | 620 }; |
| 628 | 621 |
| 629 } // namespace internal | 622 } // namespace internal |
| 630 } // namespace v8 | 623 } // namespace v8 |
| 631 | 624 |
| 632 #endif // V8_COMPILER_H_ | 625 #endif // V8_COMPILER_H_ |
| OLD | NEW |