Index: src/compiler/typed-optimization.cc |
diff --git a/src/compiler/typed-optimization.cc b/src/compiler/typed-optimization.cc |
index c5e8648ca5457ee18c38cae036eda6652d20aaf8..34661ee9618d99b2888cc495e0975b51e9cab5bc 100644 |
--- a/src/compiler/typed-optimization.cc |
+++ b/src/compiler/typed-optimization.cc |
@@ -22,8 +22,9 @@ TypedOptimization::TypedOptimization(Editor* editor, |
dependencies_(dependencies), |
flags_(flags), |
jsgraph_(jsgraph), |
- true_type_(Type::Constant(factory()->true_value(), graph()->zone())), |
- false_type_(Type::Constant(factory()->false_value(), graph()->zone())), |
+ true_type_(Type::HeapConstant(factory()->true_value(), graph()->zone())), |
+ false_type_( |
+ Type::HeapConstant(factory()->false_value(), graph()->zone())), |
type_cache_(TypeCache::Get()) {} |
TypedOptimization::~TypedOptimization() {} |
@@ -43,8 +44,9 @@ Reduction TypedOptimization::Reduce(Node* node) { |
// the Operator::kNoDeopt property). |
Type* upper = NodeProperties::GetType(node); |
if (upper->IsInhabited()) { |
- if (upper->IsConstant()) { |
- Node* replacement = jsgraph()->Constant(upper->AsConstant()->Value()); |
+ if (upper->IsHeapConstant()) { |
+ Node* replacement = |
+ jsgraph()->Constant(upper->AsHeapConstant()->Value()); |
ReplaceWithValue(node, replacement); |
return Changed(replacement); |
} else if (upper->Is(Type::MinusZero())) { |
@@ -96,10 +98,11 @@ Reduction TypedOptimization::Reduce(Node* node) { |
namespace { |
MaybeHandle<Map> GetStableMapFromObjectType(Type* object_type) { |
- if (object_type->IsConstant() && |
- object_type->AsConstant()->Value()->IsHeapObject()) { |
+ if (object_type->IsHeapConstant() && |
+ object_type->AsHeapConstant()->Value()->IsHeapObject()) { |
Handle<Map> object_map( |
- Handle<HeapObject>::cast(object_type->AsConstant()->Value())->map()); |
+ Handle<HeapObject>::cast(object_type->AsHeapConstant()->Value()) |
+ ->map()); |
if (object_map->is_stable()) return object_map; |
} |
return MaybeHandle<Map>(); |
@@ -121,8 +124,8 @@ Reduction TypedOptimization::ReduceCheckMaps(Node* node) { |
for (int i = 1; i < node->op()->ValueInputCount(); ++i) { |
Node* const map = NodeProperties::GetValueInput(node, i); |
Type* const map_type = NodeProperties::GetType(map); |
- if (map_type->IsConstant() && |
- map_type->AsConstant()->Value().is_identical_to(object_map)) { |
+ if (map_type->IsHeapConstant() && |
+ map_type->AsHeapConstant()->Value().is_identical_to(object_map)) { |
if (object_map->CanTransition()) { |
dependencies()->AssumeMapStable(object_map); |
} |