From 1047a48c0cb1399338802af3a0ac19820e0d5806 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Fri, 29 Aug 2014 15:01:50 +0000 Subject: [PATCH] Workaround to avoid generic lowering breaking branches. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/520643002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler/js-generic-lowering.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc index 4d0753c..b8cf803 100644 --- a/src/compiler/js-generic-lowering.cc +++ b/src/compiler/js-generic-lowering.cc @@ -385,9 +385,14 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, Node* JSGenericLowering::LowerBranch(Node* node) { - Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), - jsgraph()->TrueConstant()); - node->ReplaceInput(0, test); + if (!info()->is_typing_enabled()) { + // TODO(mstarzinger): If typing is enabled then simplified lowering will + // have inserted the correct ChangeBoolToBit, otherwise we need to perform + // poor-man's representation inference here and insert manual change. + Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), + jsgraph()->TrueConstant()); + node->ReplaceInput(0, test); + } return node; } -- 2.7.4