Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium
New issue 3670 by [email protected]: typeof comparison with undefined
causes incorrect type inferences
https://code.google.com/p/v8/issues/detail?id=3670
Here's a simplified case where v8 makes incorrect type inferences.
Originalk report from [email protected]:
https://code.google.com/p/v8/issues/detail?id=3264#c2
This code fails to optimize going all the way back to 2012 starting in
r12961:
"Lattice-based representation inference, powered by left/right specific type
feedback for BinaryOps and comparisons"
///////////////////////////////////////////////
// run with --nouse-inlining
function repro(x, y) {
if (typeof y != 'undefined') {
y = y | 0;
}
if (typeof y == 'undefined') {
y = 0;
}
return 1 - y;
}
var total = 0;
for (var i = 0; i < 500000; i++) {
var x = repro(i);
total += x;
}
print(total);
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.