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

Unified Diff: src/effects.h

Issue 2302283002: Forking the type system between Crankshaft & Turbofan. (Closed)
Patch Set: Nits. Created 4 years, 3 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/crankshaft/typing.cc ('k') | src/field-type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects.h
diff --git a/src/effects.h b/src/effects.h
index 020471830cb4577c1e54b0644527ac6d9eabb6d8..f8b1bd9b2f25695847090a204c4a75e46703445f 100644
--- a/src/effects.h
+++ b/src/effects.h
@@ -5,7 +5,7 @@
#ifndef V8_EFFECTS_H_
#define V8_EFFECTS_H_
-#include "src/types.h"
+#include "src/ast/ast-types.h"
namespace v8 {
namespace internal {
@@ -28,31 +28,31 @@ struct Effect {
enum Modality { POSSIBLE, DEFINITE };
Modality modality;
- Bounds bounds;
+ AstBounds bounds;
Effect() : modality(DEFINITE) {}
- explicit Effect(Bounds b, Modality m = DEFINITE) : modality(m), bounds(b) {}
+ explicit Effect(AstBounds b, Modality m = DEFINITE)
+ : modality(m), bounds(b) {}
// The unknown effect.
static Effect Unknown(Zone* zone) {
- return Effect(Bounds::Unbounded(), POSSIBLE);
+ return Effect(AstBounds::Unbounded(), POSSIBLE);
}
static Effect Forget(Zone* zone) {
- return Effect(Bounds::Unbounded(), DEFINITE);
+ return Effect(AstBounds::Unbounded(), DEFINITE);
}
// Sequential composition, as in 'e1; e2'.
static Effect Seq(Effect e1, Effect e2, Zone* zone) {
if (e2.modality == DEFINITE) return e2;
- return Effect(Bounds::Either(e1.bounds, e2.bounds, zone), e1.modality);
+ return Effect(AstBounds::Either(e1.bounds, e2.bounds, zone), e1.modality);
}
// Alternative composition, as in 'cond ? e1 : e2'.
static Effect Alt(Effect e1, Effect e2, Zone* zone) {
- return Effect(
- Bounds::Either(e1.bounds, e2.bounds, zone),
- e1.modality == POSSIBLE ? POSSIBLE : e2.modality);
+ return Effect(AstBounds::Either(e1.bounds, e2.bounds, zone),
+ e1.modality == POSSIBLE ? POSSIBLE : e2.modality);
}
};
@@ -84,10 +84,10 @@ class EffectsMixin: public Base {
? locator.value() : Effect::Unknown(Base::zone());
}
- Bounds LookupBounds(Var var) {
+ AstBounds LookupBounds(Var var) {
Effect effect = Lookup(var);
- return effect.modality == Effect::DEFINITE
- ? effect.bounds : Bounds::Unbounded();
+ return effect.modality == Effect::DEFINITE ? effect.bounds
+ : AstBounds::Unbounded();
}
// Sequential composition.
« no previous file with comments | « src/crankshaft/typing.cc ('k') | src/field-type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698