Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1382)

Unified Diff: src/x64/codegen-x64.cc

Issue 1756007: Fix error in static type information computation for bitwise shift. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/codegen-x64.cc
===================================================================
--- src/x64/codegen-x64.cc (revision 4470)
+++ src/x64/codegen-x64.cc (working copy)
@@ -5840,9 +5840,9 @@
result_type = TypeInfo::Smi();
break;
case Token::SHR:
- // Result of x >>> y is always a smi if y >= 1, otherwise a number.
+ // Result of x >>> y is always a smi if masked y >= 1, otherwise a number.
result_type = (right.is_constant() && right.handle()->IsSmi()
- && Smi::cast(*right.handle())->value() >= 1)
+ && (Smi::cast(*right.handle())->value() & 0x1F) >= 1)
? TypeInfo::Smi()
: TypeInfo::Number();
break;
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | test/mjsunit/smi-ops.js » ('j') | test/mjsunit/smi-ops.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698