Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart

Issue 941293002: Fix type propagation for and operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/and_operation_on_non_integer_operand_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index 5511118ee603a6cf9148ffdf3f5150b14cfe79f6..c5cdc94635fe5760331445267d7670d70d465c24 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -564,7 +564,8 @@ class BitAndSpecializer extends BinaryBitOpSpecializer {
HInstruction left = instruction.inputs[1];
HInstruction right = instruction.inputs[2];
JavaScriptBackend backend = compiler.backend;
- if (left.isUInt31(compiler) || right.isUInt31(compiler)) {
+ if (left.isPrimitiveOrNull(compiler) &&
+ (left.isUInt31(compiler) || right.isUInt31(compiler))) {
return backend.uint31Type;
}
return super.computeTypeFromInputTypes(instruction, compiler);
« no previous file with comments | « no previous file | tests/language/and_operation_on_non_integer_operand_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698