| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_COMPILATION_INFO_H_ | 5 #ifndef V8_COMPILATION_INFO_H_ |
| 6 #define V8_COMPILATION_INFO_H_ | 6 #define V8_COMPILATION_INFO_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/compilation-dependencies.h" | 10 #include "src/compilation-dependencies.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 kSerializing = 1 << 6, | 42 kSerializing = 1 << 6, |
| 43 kFunctionContextSpecializing = 1 << 7, | 43 kFunctionContextSpecializing = 1 << 7, |
| 44 kFrameSpecializing = 1 << 8, | 44 kFrameSpecializing = 1 << 8, |
| 45 kInliningEnabled = 1 << 9, | 45 kInliningEnabled = 1 << 9, |
| 46 kDisableFutureOptimization = 1 << 10, | 46 kDisableFutureOptimization = 1 << 10, |
| 47 kSplittingEnabled = 1 << 11, | 47 kSplittingEnabled = 1 << 11, |
| 48 kDeoptimizationEnabled = 1 << 12, | 48 kDeoptimizationEnabled = 1 << 12, |
| 49 kSourcePositionsEnabled = 1 << 13, | 49 kSourcePositionsEnabled = 1 << 13, |
| 50 kBailoutOnUninitialized = 1 << 14, | 50 kBailoutOnUninitialized = 1 << 14, |
| 51 kOptimizeFromBytecode = 1 << 15, | 51 kOptimizeFromBytecode = 1 << 15, |
| 52 kLoopPeelingEnabled = 1 << 16, |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); | 55 CompilationInfo(ParseInfo* parse_info, Handle<JSFunction> closure); |
| 55 CompilationInfo(Vector<const char> debug_name, Isolate* isolate, Zone* zone, | 56 CompilationInfo(Vector<const char> debug_name, Isolate* isolate, Zone* zone, |
| 56 Code::Flags code_flags); | 57 Code::Flags code_flags); |
| 57 ~CompilationInfo(); | 58 ~CompilationInfo(); |
| 58 | 59 |
| 59 ParseInfo* parse_info() const { return parse_info_; } | 60 ParseInfo* parse_info() const { return parse_info_; } |
| 60 | 61 |
| 61 // ----------------------------------------------------------- | 62 // ----------------------------------------------------------- |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 bool is_bailout_on_uninitialized() const { | 166 bool is_bailout_on_uninitialized() const { |
| 166 return GetFlag(kBailoutOnUninitialized); | 167 return GetFlag(kBailoutOnUninitialized); |
| 167 } | 168 } |
| 168 | 169 |
| 169 void MarkAsOptimizeFromBytecode() { SetFlag(kOptimizeFromBytecode); } | 170 void MarkAsOptimizeFromBytecode() { SetFlag(kOptimizeFromBytecode); } |
| 170 | 171 |
| 171 bool is_optimizing_from_bytecode() const { | 172 bool is_optimizing_from_bytecode() const { |
| 172 return GetFlag(kOptimizeFromBytecode); | 173 return GetFlag(kOptimizeFromBytecode); |
| 173 } | 174 } |
| 174 | 175 |
| 176 void MarkAsLoopPeelingEnabled() { SetFlag(kLoopPeelingEnabled); } |
| 177 |
| 178 bool is_loop_peeling_enabled() const { return GetFlag(kLoopPeelingEnabled); } |
| 179 |
| 175 bool GeneratePreagedPrologue() const { | 180 bool GeneratePreagedPrologue() const { |
| 176 // Generate a pre-aged prologue if we are optimizing for size, which | 181 // Generate a pre-aged prologue if we are optimizing for size, which |
| 177 // will make code flushing more aggressive. Only apply to Code::FUNCTION, | 182 // will make code flushing more aggressive. Only apply to Code::FUNCTION, |
| 178 // since StaticMarkingVisitor::IsFlushable only flushes proper functions. | 183 // since StaticMarkingVisitor::IsFlushable only flushes proper functions. |
| 179 return FLAG_optimize_for_size && FLAG_age_code && !is_debug() && | 184 return FLAG_optimize_for_size && FLAG_age_code && !is_debug() && |
| 180 output_code_kind() == Code::FUNCTION; | 185 output_code_kind() == Code::FUNCTION; |
| 181 } | 186 } |
| 182 | 187 |
| 183 void SetCode(Handle<Code> code) { code_ = code; } | 188 void SetCode(Handle<Code> code) { code_ = code; } |
| 184 | 189 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 385 |
| 381 Vector<const char> debug_name_; | 386 Vector<const char> debug_name_; |
| 382 | 387 |
| 383 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); | 388 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); |
| 384 }; | 389 }; |
| 385 | 390 |
| 386 } // namespace internal | 391 } // namespace internal |
| 387 } // namespace v8 | 392 } // namespace v8 |
| 388 | 393 |
| 389 #endif // V8_COMPILATION_INFO_H_ | 394 #endif // V8_COMPILATION_INFO_H_ |
| OLD | NEW |