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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10642018: Minor tweaks to the bitops builtin checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 862556aa6983732ebbfa36de7b8263fd6c3e7aad..ba7eaf346de62395eb3a9238079700cede633aed 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -1381,7 +1381,7 @@ class HBinaryArithmetic extends HInvokeBinary {
bool get builtin() => left.isNumber() && right.isNumber();
HType computeTypeFromInputTypes() {
- if (left.isInteger() && right.isInteger()) return left.propagatedType;
+ if (left.isInteger() && right.isInteger()) return HType.INTEGER;
if (left.isNumber()) {
if (left.isDouble() || right.isDouble()) return HType.DOUBLE;
return HType.NUMBER;
@@ -1558,7 +1558,7 @@ class HShiftLeft extends HBinaryBitOp {
// Shift left cannot be mapped to the native operator unless the
// shift count is guaranteed to be an integer in the [0,31] range.
bool get builtin() {
- if (!left.isInteger() || !right.isConstantInteger()) return false;
+ if (!left.isNumber() || !right.isConstantInteger()) return false;
HConstant rightConstant = right;
IntConstant intConstant = rightConstant.constant;
int count = intConstant.value;
@@ -1672,8 +1672,6 @@ class HBitNot extends HInvokeUnary {
HBitNot(HStatic target, HInstruction input) : super(target, input);
accept(HVisitor visitor) => visitor.visitBitNot(this);
- bool get builtin() => operand.isInteger();
-
HType computeTypeFromInputTypes() {
// All bitwise operations on primitive types either produce an
// integer or throw an error.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698