serializer-for-background-compilation.h 1.11 KB
Newer Older
1 2 3 4 5 6 7
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_
#define V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_

8
#include "src/handles/handles.h"
9 10 11 12

namespace v8 {
namespace internal {

13
class BailoutId;
14 15 16 17
class Zone;

namespace compiler {

18
class CompilationDependencies;
19
class JSHeapBroker;
20
class ZoneStats;
21

22 23 24
enum class SerializerForBackgroundCompilationFlag : uint8_t {
  kBailoutOnUninitialized = 1 << 0,
  kCollectSourcePositions = 1 << 1,
25
  kAnalyzeEnvironmentLiveness = 1 << 2,
26 27 28 29
};
using SerializerForBackgroundCompilationFlags =
    base::Flags<SerializerForBackgroundCompilationFlag>;

30
void RunSerializerForBackgroundCompilation(
31 32 33
    ZoneStats* zone_stats, JSHeapBroker* broker,
    CompilationDependencies* dependencies, Handle<JSFunction> closure,
    SerializerForBackgroundCompilationFlags flags, BailoutId osr_offset);
34 35 36 37 38 39

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_SERIALIZER_FOR_BACKGROUND_COMPILATION_H_