summaryrefslogtreecommitdiff
path: root/chromium/v8/src/compiler/compilation-dependency.h
blob: 852c7b76406ec8f54e18f24da5931b0585b79a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2019 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_COMPILATION_DEPENDENCY_H_
#define V8_COMPILER_COMPILATION_DEPENDENCY_H_

#include "src/zone/zone.h"

namespace v8 {
namespace internal {

class MaybeObjectHandle;

namespace compiler {

class CompilationDependency : public ZoneObject {
 public:
  virtual bool IsValid() const = 0;
  virtual void PrepareInstall() const {}
  virtual void Install(Handle<Code> code) const = 0;

#ifdef DEBUG
  virtual bool IsPretenureModeDependency() const { return false; }
  virtual bool IsFieldRepresentationDependencyOnMap(
      Handle<Map> const& receiver_map) const {
    return false;
  }
  virtual bool IsConsistentJSFunctionViewDependency() const { return false; }
#endif
};

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

#endif  // V8_COMPILER_COMPILATION_DEPENDENCY_H_