From 859a676a105a59748351e1a1b55f9306bd787e09 Mon Sep 17 00:00:00 2001 From: bmeurer Date: Fri, 16 Jan 2015 02:36:19 -0800 Subject: [PATCH] [turbofan] Only mark non-smis as references. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/812033012 Cr-Commit-Position: refs/heads/master@{#26094} --- src/compiler/instruction-selector.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index 4b07194..e788329 100644 --- a/src/compiler/instruction-selector.cc +++ b/src/compiler/instruction-selector.cc @@ -701,9 +701,12 @@ void InstructionSelector::VisitNode(Node* node) { case IrOpcode::kFloat64Constant: return MarkAsDouble(node), VisitConstant(node); case IrOpcode::kHeapConstant: - case IrOpcode::kNumberConstant: - // TODO(turbofan): only mark non-smis as references. return MarkAsReference(node), VisitConstant(node); + case IrOpcode::kNumberConstant: { + double value = OpParameter(node); + if (!IsSmiDouble(value)) MarkAsReference(node); + return VisitConstant(node); + } case IrOpcode::kCall: return VisitCall(node); case IrOpcode::kFrameState: -- 2.7.4