Commit 7ef72907 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Remove uncertainty from OddballType.

We decided not to use this.

R=jarin@chromium.org

Bug: v8:7790
Change-Id: I18413bb1a363477bd297a5e44aeff2623e2f1c8e
Reviewed-on: https://chromium-review.googlesource.com/1113931Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54015}
parent 92f461c0
...@@ -172,8 +172,7 @@ Reduction JSContextSpecialization::ReduceJSLoadContext(Node* node) { ...@@ -172,8 +172,7 @@ Reduction JSContextSpecialization::ReduceJSLoadContext(Node* node) {
// the hole or undefined. Only if it is neither of these, can we be sure // the hole or undefined. Only if it is neither of these, can we be sure
// that it won't change anymore. // that it won't change anymore.
OddballType oddball_type = maybe_value->oddball_type(js_heap_broker()); OddballType oddball_type = maybe_value->oddball_type(js_heap_broker());
if (oddball_type == OddballType::kAny || if (oddball_type == OddballType::kUndefined ||
oddball_type == OddballType::kUndefined ||
oddball_type == OddballType::kHole) { oddball_type == OddballType::kHole) {
maybe_value.reset(); maybe_value.reset();
} }
......
...@@ -21,8 +21,7 @@ enum class OddballType : uint8_t { ...@@ -21,8 +21,7 @@ enum class OddballType : uint8_t {
kNull, kNull,
kHole, kHole,
kUninitialized, kUninitialized,
kOther, // Oddball, but none of the above. kOther // Oddball, but none of the above.
kAny // Any Oddball.
}; };
class HeapObjectType { class HeapObjectType {
......
...@@ -742,8 +742,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadGlobal(Node* node) { ...@@ -742,8 +742,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadGlobal(Node* node) {
if (result) { if (result) {
ObjectRef contents = result->context.get(js_heap_broker(), result->index); ObjectRef contents = result->context.get(js_heap_broker(), result->index);
OddballType oddball_type = contents.oddball_type(js_heap_broker()); OddballType oddball_type = contents.oddball_type(js_heap_broker());
if (oddball_type == OddballType::kHole || if (oddball_type == OddballType::kHole) {
oddball_type == OddballType::kAny) {
return NoChange(); return NoChange();
} }
Node* context = jsgraph()->Constant(js_heap_broker(), result->context); Node* context = jsgraph()->Constant(js_heap_broker(), result->context);
...@@ -772,8 +771,7 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreGlobal(Node* node) { ...@@ -772,8 +771,7 @@ Reduction JSNativeContextSpecialization::ReduceJSStoreGlobal(Node* node) {
if (result) { if (result) {
ObjectRef contents = result->context.get(js_heap_broker(), result->index); ObjectRef contents = result->context.get(js_heap_broker(), result->index);
OddballType oddball_type = contents.oddball_type(js_heap_broker()); OddballType oddball_type = contents.oddball_type(js_heap_broker());
if (oddball_type == OddballType::kHole || if (oddball_type == OddballType::kHole || result->immutable) {
oddball_type == OddballType::kAny || result->immutable) {
return NoChange(); return NoChange();
} }
Node* context = jsgraph()->Constant(js_heap_broker(), result->context); Node* context = jsgraph()->Constant(js_heap_broker(), result->context);
......
...@@ -178,8 +178,6 @@ Type::bitset BitsetType::Lub(HeapObjectType const& type) { ...@@ -178,8 +178,6 @@ Type::bitset BitsetType::Lub(HeapObjectType const& type) {
case OddballType::kOther: case OddballType::kOther:
// TODO(neis): We should add a kOtherOddball type. // TODO(neis): We should add a kOtherOddball type.
return kOtherInternal; return kOtherInternal;
case OddballType::kAny:
return kOddball | kOtherInternal;
} }
UNREACHABLE(); UNREACHABLE();
case HEAP_NUMBER_TYPE: case HEAP_NUMBER_TYPE:
......
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