5 #ifndef V8_COMPILER_PER_ISOLATE_COMPILER_CACHE_H_ 6 #define V8_COMPILER_PER_ISOLATE_COMPILER_CACHE_H_ 8 #include "src/compiler/refs-map.h" 9 #include "src/isolate.h" 10 #include "src/zone/zone-containers.h" 28 : zone_(zone), refs_snapshot_(
nullptr) {}
30 RefsMap* GetSnapshot() {
return refs_snapshot_; }
31 void SetSnapshot(
RefsMap* refs) {
32 DCHECK_NULL(refs_snapshot_);
33 DCHECK(!refs->IsEmpty());
34 refs_snapshot_ =
new (zone_)
RefsMap(refs, zone_);
37 bool HasSnapshot()
const {
return refs_snapshot_; }
39 Zone* zone()
const {
return zone_; }
41 static void Setup(
Isolate* isolate) {
42 if (isolate->compiler_cache())
return;
48 Zone* compiler_zone =
new Zone(isolate->allocator(),
"Compiler zone");
51 isolate->set_compiler_utils(compiler_cache, compiler_zone);
64 #endif // V8_COMPILER_PER_ISOLATE_COMPILER_CACHE_H_