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

Unified Diff: src/types.h

Issue 2305383002: [turbofan] Nuke the context types. (Closed)
Patch Set: 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/compiler/verifier.cc ('k') | src/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index faa38c6aed51a750f256a5236bcf714dc81b41f4..8b9476515cc701112c0b2f83acf2d4eab69e3424 100644
--- a/src/types.h
+++ b/src/types.h
@@ -48,12 +48,11 @@ namespace internal {
// Constant(x) < T iff instance_type(map(x)) < T
// Array(T) < Array
// Function(R, S, T0, T1, ...) < Function
-// Context(T) < Internal
//
// Both structural Array and Function types are invariant in all parameters;
// relaxing this would make Union and Intersect operations more involved.
-// There is no subtyping relation between Array, Function, or Context types
-// and respective Constant types, since these types cannot be reconstructed
+// There is no subtyping relation between Array or Function types and
+// respective Constant types, since these types cannot be reconstructed
// for arbitrary heap values.
//
//
@@ -349,7 +348,6 @@ class TypeBase {
enum Kind {
kConstant,
- kContext,
kArray,
kFunction,
kTuple,
@@ -467,30 +465,6 @@ class RangeType : public TypeBase {
};
// -----------------------------------------------------------------------------
-// Context types.
-
-class ContextType : public TypeBase {
- public:
- Type* Outer() { return outer_; }
-
- private:
- friend class Type;
-
- static Type* New(Type* outer, Zone* zone) {
- return AsType(new (zone->New(sizeof(ContextType))) ContextType(outer));
- }
-
- static ContextType* cast(Type* type) {
- DCHECK(IsKind(type, kContext));
- return static_cast<ContextType*>(FromType(type));
- }
-
- explicit ContextType(Type* outer) : TypeBase(kContext), outer_(outer) {}
-
- Type* outer_;
-};
-
-// -----------------------------------------------------------------------------
// Array types.
class ArrayType : public TypeBase {
@@ -658,9 +632,6 @@ class Type {
BitsetType::kUntaggedNumber),
zone);
}
- static Type* Context(Type* outer, Zone* zone) {
- return ContextType::New(outer, zone);
- }
static Type* Array(Type* element, Zone* zone) {
return ArrayType::New(element, zone);
}
@@ -740,14 +711,12 @@ class Type {
// Inspection.
bool IsRange() { return IsKind(TypeBase::kRange); }
bool IsConstant() { return IsKind(TypeBase::kConstant); }
- bool IsContext() { return IsKind(TypeBase::kContext); }
bool IsArray() { return IsKind(TypeBase::kArray); }
bool IsFunction() { return IsKind(TypeBase::kFunction); }
bool IsTuple() { return IsKind(TypeBase::kTuple); }
ConstantType* AsConstant() { return ConstantType::cast(this); }
RangeType* AsRange() { return RangeType::cast(this); }
- ContextType* AsContext() { return ContextType::cast(this); }
ArrayType* AsArray() { return ArrayType::cast(this); }
FunctionType* AsFunction() { return FunctionType::cast(this); }
TupleType* AsTuple() { return TupleType::cast(this); }
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698