Reviewers: Igor Sheludko,
Message:
PTAL
Description:
HRor and HSar can deoptimize.
BUG=v8:3359
LOG=y
Please review this at https://codereview.chromium.org/309483002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+5, -12 lines):
M src/hydrogen-instructions.cc
A + test/mjsunit/regress/regress-3359.js
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
ce1e9db6952a4609f003030a6aae7fcd2f903547..effafdc685ce25a321ace2787ec4779949a81437
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -831,8 +831,6 @@ bool HInstruction::CanDeoptimize() {
case HValue::kPushArguments:
case HValue::kRegExpLiteral:
case HValue::kReturn:
- case HValue::kRor:
- case HValue::kSar:
case HValue::kSeqStringGetChar:
case HValue::kStoreCodeEntry:
case HValue::kStoreKeyed:
@@ -877,6 +875,8 @@ bool HInstruction::CanDeoptimize() {
case HValue::kMul:
case HValue::kOsrEntry:
case HValue::kPower:
+ case HValue::kRor:
+ case HValue::kSar:
case HValue::kSeqStringSetChar:
case HValue::kShl:
case HValue::kShr:
Index: test/mjsunit/regress/regress-3359.js
diff --git a/test/mjsunit/regress/regress-347909.js
b/test/mjsunit/regress/regress-3359.js
similarity index 71%
copy from test/mjsunit/regress/regress-347909.js
copy to test/mjsunit/regress/regress-3359.js
index
90a8e6a759eab76afef1dc968c814bd9d324b147..0973797e7e73a2905fbae9e64211c24dbc9d3f6c
100644
--- a/test/mjsunit/regress/regress-347909.js
+++ b/test/mjsunit/regress/regress-3359.js
@@ -4,16 +4,9 @@
// Flags: --allow-natives-syntax
-var a = {y:1.5};
-a.y = 0;
-var b = a.y;
-a.y = {};
-var d = 1;
function f() {
- d = 0;
- return {y: b};
+ return 1 >> Boolean.constructor + 1;
}
-f();
-f();
+assertEquals(1, f());
%OptimizeFunctionOnNextCall(f);
-f();
+assertEquals(1, f());
--
--
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.