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

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

Issue 10174040: Better constant fold identity checks. (100 bytes saved on swarm, yeah! :)) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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
Index: lib/compiler/implementation/ssa/nodes.dart
===================================================================
--- lib/compiler/implementation/ssa/nodes.dart (revision 6994)
+++ lib/compiler/implementation/ssa/nodes.dart (working copy)
@@ -874,6 +874,7 @@
}
bool isConstant() => false;
+ bool isConstantBoolean() => false;
bool isConstantNull() => false;
bool isConstantNumber() => false;
bool isConstantString() => false;
@@ -1868,10 +1869,10 @@
accept(HVisitor visitor) => visitor.visitEquals(this);
bool get builtin() {
- // All useful types have === semantics.
+ // All primitive types have === semantics.
// Note that this includes all constants except the user-constructed
// objects.
- return left.isConstantNull() || left.propagatedType.isUseful();
+ return left.isConstantNull() || left.propagatedType.isPrimitive();
}
HType computeTypeFromInputTypes() {
« no previous file with comments | « frog/tests/leg_only/src/ConstantFoldNumberDart2JSTest.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698