Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: src/compiler/instruction-selector.cc

Issue 812033012: [turbofan] Only mark non-smis as references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 4b07194c87be3b195062f35afb2a9b4b9b95ec8d..e7883294cd33aa87eeba49b1697d6252dc28bac8 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<double>(node);
+ if (!IsSmiDouble(value)) MarkAsReference(node);
+ return VisitConstant(node);
+ }
case IrOpcode::kCall:
return VisitCall(node);
case IrOpcode::kFrameState:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698