Commit 1cda2a6c authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Check type rather than node for HeapConstant

R=sigurds@chromium.org

Change-Id: I0478c38641cfba6ccbe5ffd0ba6e50d1040e6e58
Reviewed-on: https://chromium-review.googlesource.com/1109836Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53935}
parent 7977035f
...@@ -1440,10 +1440,10 @@ Reduction JSCreateLowering::ReduceJSCreateObject(Node* node) { ...@@ -1440,10 +1440,10 @@ Reduction JSCreateLowering::ReduceJSCreateObject(Node* node) {
Node* effect = NodeProperties::GetEffectInput(node); Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node); Node* control = NodeProperties::GetControlInput(node);
Node* prototype = NodeProperties::GetValueInput(node, 0); Node* prototype = NodeProperties::GetValueInput(node, 0);
HeapObjectMatcher m(prototype); Type prototype_type = NodeProperties::GetType(prototype);
if (!m.IsHeapConstant()) return NoChange(); if (!prototype_type.IsHeapConstant()) return NoChange();
Handle<HeapObject> prototype_const = m.Value(); Handle<HeapObject> prototype_const = prototype_type.AsHeapConstant()->Value();
Handle<Map> instance_map; Handle<Map> instance_map;
MaybeHandle<Map> maybe_instance_map = MaybeHandle<Map> maybe_instance_map =
Map::TryGetObjectCreateMap(prototype_const); Map::TryGetObjectCreateMap(prototype_const);
......
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