Revision: 25249
Author: [email protected]
Date: Mon Nov 10 15:24:58 2014 UTC
Log: Fix has_constant_parameter_count() confusion in LReturn
BUG=chromium:431602
LOG=y
[email protected]
Review URL: https://codereview.chromium.org/714663002
https://code.google.com/p/v8/source/detail?r=25249
Added:
/branches/bleeding_edge/test/mjsunit/regress/regress-crbug-431602.js
Modified:
/branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
/branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc
/branches/bleeding_edge/src/hydrogen-instructions.cc
/branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc
/branches/bleeding_edge/src/x64/lithium-codegen-x64.cc
/branches/bleeding_edge/src/x87/lithium-codegen-x87.cc
=======================================
--- /dev/null
+++ /branches/bleeding_edge/test/mjsunit/regress/regress-crbug-431602.js
Mon Nov 10 15:24:58 2014 UTC
@@ -0,0 +1,23 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --always-opt
+
+var heap_number_producer = {y:1.5};
+heap_number_producer.y = 0;
+var heap_number_zero = heap_number_producer.y;
+var non_constant_eight = {};
+non_constant_eight = 8;
+
+function BreakIt() {
+ return heap_number_zero | (1 | non_constant_eight);
+}
+
+function expose(a, b, c) {
+ return b;
+}
+
+assertEquals(9, expose(8, 9, 10));
+assertEquals(9, expose(8, BreakIt(), 10));
+assertEquals(9, BreakIt());
=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Oct 20
11:42:56 2014 UTC
+++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2964,6 +2964,7 @@
__ add(sp, sp, Operand(sp_delta));
}
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiUntag(reg);
=======================================
--- /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Fri Nov 7
09:47:08 2014 UTC
+++ /branches/bleeding_edge/src/arm64/lithium-codegen-arm64.cc Mon Nov 10
15:24:58 2014 UTC
@@ -4766,6 +4766,7 @@
int parameter_count = ToInteger32(instr->constant_parameter_count());
__ Drop(parameter_count + 1);
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register parameter_count = ToRegister(instr->parameter_count());
__ DropBySMI(parameter_count);
}
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Nov 5
12:40:56 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2834,6 +2834,10 @@
// could cause heap object checks not to get emitted.
object_ = Unique<Object>(Handle<Object>::null());
}
+ if (r.IsSmiOrInteger32()) {
+ // If it's not a heap object, it can't be in new space.
+ bit_field_ = IsNotInNewSpaceField::update(bit_field_, true);
+ }
set_representation(r);
SetFlag(kUseGVN);
}
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Oct 20
11:42:56 2014 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2753,6 +2753,7 @@
}
__ Ret((parameter_count + extra_value_count) * kPointerSize, ecx);
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiUntag(reg);
@@ -2770,6 +2771,7 @@
if (dynamic_frame_alignment) {
__ inc(reg); // 1 more for alignment
}
+
__ shl(reg, kPointerSizeLog2);
__ add(esp, reg);
__ jmp(return_addr_reg);
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Oct 20
11:42:56 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2858,6 +2858,7 @@
__ Addu(sp, sp, Operand(sp_delta));
}
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiUntag(reg);
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Mon Oct 20
17:59:59 2014 UTC
+++ /branches/bleeding_edge/src/mips64/lithium-codegen-mips64.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2828,6 +2828,7 @@
__ Daddu(sp, sp, Operand(sp_delta));
}
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiUntag(reg);
=======================================
--- /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Mon Oct 20
11:42:56 2014 UTC
+++ /branches/bleeding_edge/src/x64/lithium-codegen-x64.cc Mon Nov 10
15:24:58 2014 UTC
@@ -2822,6 +2822,7 @@
__ Ret((ToInteger32(instr->constant_parameter_count()) + 1) *
kPointerSize,
rcx);
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiToInteger32(reg, reg);
=======================================
--- /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Mon Nov 10
04:47:19 2014 UTC
+++ /branches/bleeding_edge/src/x87/lithium-codegen-x87.cc Mon Nov 10
15:24:58 2014 UTC
@@ -3050,6 +3050,7 @@
}
__ Ret((parameter_count + extra_value_count) * kPointerSize, ecx);
} else {
+ DCHECK(info()->IsStub()); // Functions would need to drop one more
value.
Register reg = ToRegister(instr->parameter_count());
// The argument count parameter is a smi
__ SmiUntag(reg);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.