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
This commit is contained in:
parent
18482d0da2
commit
0a6d2dec9f
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user