Commit cb44d296 authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

[turbofan] Remove unused Type::Of.

Bug: v8:7790
Change-Id: I9ca667109b17c5787aca8499dc379238cd43e5cb
Reviewed-on: https://chromium-review.googlesource.com/1073418
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53380}
parent f3a3c1ce
......@@ -376,17 +376,6 @@ class V8_EXPORT_PRIVATE Type {
static Type Union(Type type1, Type type2, Zone* zone);
static Type Intersect(Type type1, Type type2, Zone* zone);
static Type Of(double value, Zone* zone) {
return NewBitset(BitsetType::ExpandInternals(BitsetType::Lub(value)));
}
static Type Of(Isolate* isolate, i::Object* value, Zone* zone) {
return NewBitset(
BitsetType::ExpandInternals(BitsetType::Lub(isolate, value)));
}
static Type Of(Isolate* isolate, i::Handle<i::Object> value, Zone* zone) {
return Of(isolate, *value, zone);
}
static Type For(Isolate* isolate, i::Map* map) {
return NewBitset(
BitsetType::ExpandInternals(BitsetType::Lub(isolate, map)));
......
......@@ -329,39 +329,6 @@ struct Tests {
}
}
void Of() {
// Constant(V).Is(Of(V))
for (ValueIterator vt = T.values.begin(); vt != T.values.end(); ++vt) {
Handle<i::Object> value = *vt;
Type const_type = T.NewConstant(value);
Type of_type = T.Of(value);
CHECK(const_type.Is(of_type));
}
// If Of(V).Is(T), then Constant(V).Is(T)
for (ValueIterator vt = T.values.begin(); vt != T.values.end(); ++vt) {
for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
Handle<i::Object> value = *vt;
Type type = *it;
Type const_type = T.NewConstant(value);
Type of_type = T.Of(value);
CHECK(!of_type.Is(type) || const_type.Is(type));
}
}
// If Constant(V).Is(T), then Of(V).Is(T) or T.Maybe(Constant(V))
for (ValueIterator vt = T.values.begin(); vt != T.values.end(); ++vt) {
for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
Handle<i::Object> value = *vt;
Type type = *it;
Type const_type = T.NewConstant(value);
Type of_type = T.Of(value);
CHECK(!const_type.Is(type) || of_type.Is(type) ||
type.Maybe(const_type));
}
}
}
void MinMax() {
// If b is regular numeric bitset, then Range(b.Min(), b.Max()).Is(b).
// TODO(neis): Need to ignore representation for this to be true.
......@@ -1083,8 +1050,6 @@ TEST(ConstantType) { Tests().Constant(); }
TEST(RangeType) { Tests().Range(); }
TEST(Of) { Tests().Of(); }
TEST(MinMax) { Tests().MinMax(); }
TEST(BitsetGlb) { Tests().BitsetGlb(); }
......
......@@ -141,8 +141,6 @@ class Types {
ValueVector values;
ValueVector integers; // "Integer" values used for range limits.
Type Of(Handle<i::Object> value) { return Type::Of(isolate_, value, zone_); }
Type NewConstant(Handle<i::Object> value) {
return Type::NewConstant(isolate_, value, zone_);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment