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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } | 263 bool is_splitting_enabled() const { return GetFlag(kSplittingEnabled); } |
264 | 264 |
265 void MarkAsFirstCompile() { SetFlag(kFirstCompile); } | 265 void MarkAsFirstCompile() { SetFlag(kFirstCompile); } |
266 | 266 |
267 void MarkAsCompiled() { SetFlag(kFirstCompile, false); } | 267 void MarkAsCompiled() { SetFlag(kFirstCompile, false); } |
268 | 268 |
269 bool is_first_compile() const { return GetFlag(kFirstCompile); } | 269 bool is_first_compile() const { return GetFlag(kFirstCompile); } |
270 | 270 |
271 bool GeneratePreagedPrologue() const { | 271 bool GeneratePreagedPrologue() const { |
272 // Generate a pre-aged prologue if we are optimizing for size, which | 272 // Generate a pre-aged prologue if we are optimizing for size, which |
273 // will make code flushing more aggressive. The code for WASM functions | 273 // will make code flushing more aggressive. Only apply to Code::FUNCTION, |
274 // cannot be flushed, so it does not make sense to age them. | 274 // since StaticMarkingVisitor::IsFlushable only flushes proper functions. |
275 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && | 275 return FLAG_optimize_for_size && FLAG_age_code && !will_serialize() && |
276 !is_debug() && output_code_kind_ != Code::WASM_FUNCTION; | 276 !is_debug() && output_code_kind_ == Code::FUNCTION; |
277 } | 277 } |
278 | 278 |
279 void EnsureFeedbackVector(); | 279 void EnsureFeedbackVector(); |
280 Handle<TypeFeedbackVector> feedback_vector() const { | 280 Handle<TypeFeedbackVector> feedback_vector() const { |
281 return feedback_vector_; | 281 return feedback_vector_; |
282 } | 282 } |
283 void SetCode(Handle<Code> code) { code_ = code; } | 283 void SetCode(Handle<Code> code) { code_ = code; } |
284 | 284 |
285 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) { | 285 void SetBytecodeArray(Handle<BytecodeArray> bytecode_array) { |
286 bytecode_array_ = bytecode_array; | 286 bytecode_array_ = bytecode_array; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 size_t info_zone_start_allocation_size_; | 719 size_t info_zone_start_allocation_size_; |
720 base::ElapsedTimer timer_; | 720 base::ElapsedTimer timer_; |
721 | 721 |
722 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 722 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
723 }; | 723 }; |
724 | 724 |
725 } // namespace internal | 725 } // namespace internal |
726 } // namespace v8 | 726 } // namespace v8 |
727 | 727 |
728 #endif // V8_COMPILER_H_ | 728 #endif // V8_COMPILER_H_ |
OLD | NEW |