Commit 0a6d2dec authored by olivf@chromium.org's avatar olivf@chromium.org

Fix lower bound of shr.

BUG=
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/27503002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17243 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 18482d0d
......@@ -603,8 +603,10 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
case Token::SHR:
RECURSE(Visit(expr->left()));
RECURSE(Visit(expr->right()));
// TODO(rossberg): we could use an UnsignedSmi as lower bound here...
NarrowType(expr, Bounds(Type::Unsigned32(), isolate_));
// TODO(rossberg): The upper bound would be Unsigned32, but since there
// is no 'positive Smi' type for the lower bound, we use the smallest
// union of Smi and Unsigned32 as upper bound instead.
NarrowType(expr, Bounds(Type::Smi(), Type::Number(), isolate_));
break;
case Token::ADD: {
RECURSE(Visit(expr->left()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment