Chromium Code Reviews| Index: src/wasm/asm-wasm-builder.cc |
| diff --git a/src/wasm/asm-wasm-builder.cc b/src/wasm/asm-wasm-builder.cc |
| index 4340bddbd3fd455fe3cc462961f7c0f631767386..5e3da290c5dddd9d3fe1cb0da5a8257e384f6793 100644 |
| --- a/src/wasm/asm-wasm-builder.cc |
| +++ b/src/wasm/asm-wasm-builder.cc |
| @@ -622,9 +622,7 @@ class AsmWasmBuilderImpl : public AstVisitor { |
| ConvertOperation MatchOr(BinaryOperation* expr) { |
| if (MatchIntBinaryOperation(expr, Token::BIT_OR, 0)) { |
| - DCHECK(TypeOf(expr->left()) == kAstI32); |
| - DCHECK(TypeOf(expr->right()) == kAstI32); |
| - return kAsIs; |
| + return (TypeOf(expr->left()) == kAstI32) ? kAsIs : kToInt; |
|
ahaas
2016/01/12 13:35:09
Why is this change only required for MatchOr and M
|
| } else { |
| return kNone; |
| } |
| @@ -632,9 +630,8 @@ class AsmWasmBuilderImpl : public AstVisitor { |
| ConvertOperation MatchShr(BinaryOperation* expr) { |
| if (MatchIntBinaryOperation(expr, Token::SHR, 0)) { |
| - DCHECK(TypeOf(expr->left()) == kAstI32); |
| - DCHECK(TypeOf(expr->right()) == kAstI32); |
| - return kAsIs; |
| + // TODO(titzer): this probably needs to be kToUint |
| + return (TypeOf(expr->left()) == kAstI32) ? kAsIs : kToInt; |
| } else { |
| return kNone; |
| } |