Revision: 25074
Author: [email protected]
Date: Mon Nov 3 13:58:39 2014 UTC
Log: [turbofan] Fix Typer::Rangify to handle integral bitset types.
[email protected]
BUG=
Review URL: https://codereview.chromium.org/688413003
https://code.google.com/p/v8/source/detail?r=25074
Modified:
/branches/bleeding_edge/src/compiler/typer.cc
=======================================
--- /branches/bleeding_edge/src/compiler/typer.cc Mon Nov 3 12:36:14 2014
UTC
+++ /branches/bleeding_edge/src/compiler/typer.cc Mon Nov 3 13:58:39 2014
UTC
@@ -408,10 +408,19 @@
Type* Typer::Visitor::Rangify(Type* type, Typer* t) {
if (type->IsRange()) return type; // Shortcut.
- if (!type->Is(t->integer)) return type; // Give up.
+ if (!type->Is(t->integer) && !type->Is(Type::Integral32())) {
+ return type; // Give up on non-integer types.
+ }
+ double min = type->Min();
+ double max = type->Max();
+ // Handle the degenerate case of empty bitset types (such as
+ // OtherUnsigned31 and OtherSigned32 on 64-bit architectures).
+ if (std::isnan(min)) {
+ DCHECK(std::isnan(max));
+ return type;
+ }
Factory* f = t->isolate()->factory();
- return Type::Range(f->NewNumber(type->Min()), f->NewNumber(type->Max()),
- t->zone());
+ return Type::Range(f->NewNumber(min), f->NewNumber(max), t->zone());
}
--
--
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.