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

Unified Diff: src/compiler/typer.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 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/compiler/typer.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 737dffaa0e377d9eadf3daddc55c4595f5467ca6..4b3a8830a0fff9cbed6694b9588742225d262814 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -45,7 +45,8 @@ enum LazyCachedType {
// TODO(turbofan): these types could be globally cached or cached per isolate.
class LazyTypeCache FINAL : public ZoneObject {
public:
- explicit LazyTypeCache(Zone* zone) : zone_(zone) {
+ explicit LazyTypeCache(Isolate* isolate, Zone* zone)
+ : isolate_(isolate), zone_(zone) {
memset(cache_, 0, sizeof(cache_));
}
@@ -133,10 +134,11 @@ class LazyTypeCache FINAL : public ZoneObject {
}
Factory* factory() const { return isolate()->factory(); }
- Isolate* isolate() const { return zone()->isolate(); }
+ Isolate* isolate() const { return isolate_; }
Zone* zone() const { return zone_; }
Type* cache_[kNumLazyCachedTypes];
+ Isolate* isolate_;
Zone* zone_;
};
@@ -151,15 +153,16 @@ class Typer::Decorator FINAL : public GraphDecorator {
};
-Typer::Typer(Graph* graph, MaybeHandle<Context> context)
- : graph_(graph),
+Typer::Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context)
+ : isolate_(isolate),
+ graph_(graph),
context_(context),
decorator_(NULL),
- cache_(new (graph->zone()) LazyTypeCache(graph->zone())),
+ cache_(new (graph->zone()) LazyTypeCache(isolate, graph->zone())),
weaken_min_limits_(graph->zone()),
weaken_max_limits_(graph->zone()) {
Zone* zone = this->zone();
- Factory* f = zone->isolate()->factory();
+ Factory* f = isolate->factory();
Handle<Object> zero = f->NewNumber(0);
Handle<Object> one = f->NewNumber(1);
« no previous file with comments | « src/compiler/typer.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698