Commit e25d51cc authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix constant folding of %_IsMinusZero.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/190793015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3ad279ab
...@@ -3145,8 +3145,8 @@ bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) { ...@@ -3145,8 +3145,8 @@ bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
if (constant->HasDoubleValue()) { if (constant->HasDoubleValue()) {
*block = IsMinusZero(constant->DoubleValue()) *block = IsMinusZero(constant->DoubleValue())
? FirstSuccessor() : SecondSuccessor(); ? FirstSuccessor() : SecondSuccessor();
return true;
} }
return true;
} }
if (value()->representation().IsSmiOrInteger32()) { if (value()->representation().IsSmiOrInteger32()) {
// A Smi or Integer32 cannot contain minus zero. // A Smi or Integer32 cannot contain minus zero.
......
...@@ -34,6 +34,10 @@ function test() { ...@@ -34,6 +34,10 @@ function test() {
assertTrue(%_IsSpecObject(new Date())); assertTrue(%_IsSpecObject(new Date()));
assertFalse(%_IsSpecObject(1)); assertFalse(%_IsSpecObject(1));
assertTrue(%_IsMinusZero(-0.0));
assertFalse(%_IsMinusZero(1));
assertFalse(%_IsMinusZero(""));
} }
......
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