| 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/zone.h" | 10 #include "src/zone.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 kDeferredCalling = 1 << 6, | 73 kDeferredCalling = 1 << 6, |
| 74 kNonDeferredCalling = 1 << 7, | 74 kNonDeferredCalling = 1 << 7, |
| 75 kSavesCallerDoubles = 1 << 8, | 75 kSavesCallerDoubles = 1 << 8, |
| 76 kRequiresFrame = 1 << 9, | 76 kRequiresFrame = 1 << 9, |
| 77 kMustNotHaveEagerFrame = 1 << 10, | 77 kMustNotHaveEagerFrame = 1 << 10, |
| 78 kDeoptimizationSupport = 1 << 11, | 78 kDeoptimizationSupport = 1 << 11, |
| 79 kDebug = 1 << 12, | 79 kDebug = 1 << 12, |
| 80 kCompilingForDebugging = 1 << 13, | 80 kCompilingForDebugging = 1 << 13, |
| 81 kParseRestriction = 1 << 14, | 81 kParseRestriction = 1 << 14, |
| 82 kSerializing = 1 << 15, | 82 kSerializing = 1 << 15, |
| 83 kContextSpecializing = 1 << 16 | 83 kContextSpecializing = 1 << 16, |
| 84 kInliningEnabled = 1 << 17 |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 CompilationInfo(Handle<JSFunction> closure, Zone* zone); | 87 CompilationInfo(Handle<JSFunction> closure, Zone* zone); |
| 87 CompilationInfo(Isolate* isolate, Zone* zone); | 88 CompilationInfo(Isolate* isolate, Zone* zone); |
| 88 virtual ~CompilationInfo(); | 89 virtual ~CompilationInfo(); |
| 89 | 90 |
| 90 Isolate* isolate() const { | 91 Isolate* isolate() const { |
| 91 return isolate_; | 92 return isolate_; |
| 92 } | 93 } |
| 93 Zone* zone() { return zone_; } | 94 Zone* zone() { return zone_; } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 bool is_debug() const { return GetFlag(kDebug); } | 180 bool is_debug() const { return GetFlag(kDebug); } |
| 180 | 181 |
| 181 void PrepareForSerializing() { SetFlag(kSerializing); } | 182 void PrepareForSerializing() { SetFlag(kSerializing); } |
| 182 | 183 |
| 183 bool will_serialize() const { return GetFlag(kSerializing); } | 184 bool will_serialize() const { return GetFlag(kSerializing); } |
| 184 | 185 |
| 185 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } | 186 void MarkAsContextSpecializing() { SetFlag(kContextSpecializing); } |
| 186 | 187 |
| 187 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } | 188 bool is_context_specializing() const { return GetFlag(kContextSpecializing); } |
| 188 | 189 |
| 190 void MarkAsInliningEnabled() { SetFlag(kInliningEnabled); } |
| 191 |
| 192 bool is_inlining_enabled() const { return GetFlag(kInliningEnabled); } |
| 193 |
| 189 bool IsCodePreAgingActive() const { | 194 bool IsCodePreAgingActive() const { |
| 190 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && | 195 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && |
| 191 !is_debug(); | 196 !is_debug(); |
| 192 } | 197 } |
| 193 | 198 |
| 194 void SetParseRestriction(ParseRestriction restriction) { | 199 void SetParseRestriction(ParseRestriction restriction) { |
| 195 SetFlag(kParseRestriction, restriction != NO_PARSE_RESTRICTION); | 200 SetFlag(kParseRestriction, restriction != NO_PARSE_RESTRICTION); |
| 196 } | 201 } |
| 197 | 202 |
| 198 ParseRestriction parse_restriction() const { | 203 ParseRestriction parse_restriction() const { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 Zone zone_; | 707 Zone zone_; |
| 703 unsigned info_zone_start_allocation_size_; | 708 unsigned info_zone_start_allocation_size_; |
| 704 base::ElapsedTimer timer_; | 709 base::ElapsedTimer timer_; |
| 705 | 710 |
| 706 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 711 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
| 707 }; | 712 }; |
| 708 | 713 |
| 709 } } // namespace v8::internal | 714 } } // namespace v8::internal |
| 710 | 715 |
| 711 #endif // V8_COMPILER_H_ | 716 #endif // V8_COMPILER_H_ |
| OLD | NEW |