Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: src/isolate.cc

Issue 2630343002: [Parser] Introduce AstStringConstants to share constants across AstValueFactory (Closed)
Patch Set: Fix test Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 0c0af8472a75f3067d63c17f662b2639d78edd85..a77a871fedfc8af766cdf3c1a11bb4fe2b3ef1b2 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -9,6 +9,7 @@
#include <fstream> // NOLINT(readability/streams)
#include <sstream>
+#include "src/ast/ast-value-factory.h"
#include "src/ast/context-slot-cache.h"
#include "src/base/hashmap.h"
#include "src/base/platform/platform.h"
@@ -2375,6 +2376,9 @@ void Isolate::Deinit() {
delete interpreter_;
interpreter_ = NULL;
+ delete ast_string_constants_;
+ ast_string_constants_ = nullptr;
+
delete cpu_profiler_;
cpu_profiler_ = NULL;
@@ -2698,6 +2702,11 @@ bool Isolate::Init(Deserializer* des) {
time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs();
+ {
+ HandleScope scope(this);
+ ast_string_constants_ = new AstStringConstants(this, heap()->HashSeed());
+ }
+
if (!create_heap_objects) {
// Now that the heap is consistent, it's OK to generate the code for the
// deopt entry table that might have been referred to by optimized code in
« no previous file with comments | « src/isolate.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698