| 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 kTypeFeedbackEnabled = 1 << 14, | 128 kTypeFeedbackEnabled = 1 << 14, |
| 129 kDeoptimizationEnabled = 1 << 15, | 129 kDeoptimizationEnabled = 1 << 15, |
| 130 kSourcePositionsEnabled = 1 << 16 | 130 kSourcePositionsEnabled = 1 << 16, |
| 131 kNewScript = 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } | 239 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
| 239 | 240 |
| 240 void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); } | 241 void MarkAsTypingEnabled() { SetFlag(kTypingEnabled); } |
| 241 | 242 |
| 242 bool is_typing_enabled() const { return GetFlag(kTypingEnabled); } | 243 bool is_typing_enabled() const { return GetFlag(kTypingEnabled); } |
| 243 | 244 |
| 244 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } | 245 void MarkAsSplittingEnabled() { SetFlag(kSplittingEnabled); } |
| 245 | 246 |
| 246 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } | 247 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } |
| 247 | 248 |
| 249 void MarkAsNewScript() { SetFlag(kNewScript); } |
| 250 |
| 251 bool is_new_script() const { return GetFlag(kNewScript); } |
| 252 |
| 248 bool IsCodePreAgingActive() const { | 253 bool IsCodePreAgingActive() const { |
| 249 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && | 254 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && |
| 250 !is_debug(); | 255 !is_debug(); |
| 251 } | 256 } |
| 252 | 257 |
| 253 void EnsureFeedbackVector(); | 258 void EnsureFeedbackVector(); |
| 254 Handle<TypeFeedbackVector> feedback_vector() const { | 259 Handle<TypeFeedbackVector> feedback_vector() const { |
| 255 return feedback_vector_; | 260 return feedback_vector_; |
| 256 } | 261 } |
| 257 void SetCode(Handle<Code> code) { code_ = code; } | 262 void SetCode(Handle<Code> code) { code_ = code; } |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 Zone zone_; | 686 Zone zone_; |
| 682 size_t info_zone_start_allocation_size_; | 687 size_t info_zone_start_allocation_size_; |
| 683 base::ElapsedTimer timer_; | 688 base::ElapsedTimer timer_; |
| 684 | 689 |
| 685 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 690 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 686 }; | 691 }; |
| 687 | 692 |
| 688 } } // namespace v8::internal | 693 } } // namespace v8::internal |
| 689 | 694 |
| 690 #endif // V8_COMPILER_H_ | 695 #endif // V8_COMPILER_H_ |
| OLD | NEW |