• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
6 #define V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
7 
8 #include "src/handles/handles.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 class BailoutId;
14 class Zone;
15 
16 namespace compiler {
17 
18 class CompilationDependencies;
19 class JSHeapBroker;
20 class ZoneStats;
21 
22 enum class SerializerForBackgroundCompilationFlag : uint8_t {
23   kBailoutOnUninitialized = 1 << 0,
24   kCollectSourcePositions = 1 << 1,
25   kAnalyzeEnvironmentLiveness = 1 << 2,
26   kEnableTurboInlining = 1 << 3,
27 };
28 using SerializerForBackgroundCompilationFlags =
29     base::Flags<SerializerForBackgroundCompilationFlag>;
30 
31 void RunSerializerForBackgroundCompilation(
32     ZoneStats* zone_stats, JSHeapBroker* broker,
33     CompilationDependencies* dependencies, Handle<JSFunction> closure,
34     SerializerForBackgroundCompilationFlags flags, BailoutId osr_offset);
35 
36 }  // namespace compiler
37 }  // namespace internal
38 }  // namespace v8
39 
40 #endif  // V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
41