Chromium Code Reviews| Index: src/asmjs/typing-asm.cc |
| diff --git a/src/asmjs/typing-asm.cc b/src/asmjs/typing-asm.cc |
| index 01db88aa94ad0acdab6a9d776a97fcf0084a9357..5bba85bbcfd3b6a5fbb3a0fa3ff1d9601b851c47 100644 |
| --- a/src/asmjs/typing-asm.cc |
| +++ b/src/asmjs/typing-asm.cc |
| @@ -763,14 +763,14 @@ void AsmTyper::VisitHeapAccess(Property* expr, bool assigning, |
| // FAIL(right, "call mask must match function table"); |
| // } |
| // bin->set_bounds(Bounds(cache_.kAsmSigned)); |
| - RECURSE(VisitWithExpectation(expr->key(), cache_.kAsmSigned, |
| - "must be integer")); |
| + RECURSE(VisitWithExpectation(expr->key(), cache_.kAsmUnsigned, |
| + "must be unsigned")); |
| RECURSE(IntersectResult(expr, type)); |
| } else { |
| Literal* literal = expr->key()->AsLiteral(); |
| if (literal) { |
| - RECURSE(VisitWithExpectation(literal, cache_.kAsmSigned, |
| - "array index expected to be integer")); |
| + RECURSE(VisitWithExpectation(literal, cache_.kAsmUnsigned, |
| + "array index expected to be unsigned")); |
| } else { |
| int expected_shift = ElementShiftSize(type); |
| if (expected_shift == 0) { |
| @@ -780,7 +780,7 @@ void AsmTyper::VisitHeapAccess(Property* expr, bool assigning, |
| if (bin == nullptr || bin->op() != Token::SAR) { |
| FAIL(expr->key(), "expected >> in heap access"); |
| } |
| - RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmSigned, |
| + RECURSE(VisitWithExpectation(bin->left(), cache_.kAsmInt, |
|
bradnelson
2016/07/11 22:40:24
I think this can only be int for int8 / uint8
bradn
2016/07/11 23:02:59
nm, you are correct.
|
| "array index expected to be integer")); |
| Literal* right = bin->right()->AsLiteral(); |
| if (right == nullptr || right->raw_value()->ContainsDot()) { |