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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 1106443003: Optimize DateTime properties (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 5 years, 7 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 | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index dac18f95c18ebd24cebef6be65468743df024a75..1edf437d85cbb3822f238f6a7fe44225d40eef2c 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -804,11 +804,17 @@ class DynamicCallSiteTypeInformation extends CallSiteTypeInformation {
// Dart code, for example:
// int + int -> int
// uint31 | uint31 -> uint31
- if (name == '*' || name == '+' || name == '%' || name == 'remainder' ||
+ if (name == '*' || name == '+' ||name == '%' || name == 'remainder' ||
name == '~/') {
if (isPositiveInt(receiver) &&
arguments.hasOnePositionalArgumentThatMatches(isPositiveInt)) {
- return inferrer.types.positiveIntType;
+ // uint31 + uint31 -> uint32
+ if (name == '+' && isUInt31(receiver) &&
+ arguments.hasOnePositionalArgumentThatMatches(isUInt31)) {
+ return inferrer.types.uint32Type;
+ } else {
+ return inferrer.types.positiveIntType;
+ }
} else if (arguments.hasOnePositionalArgumentThatMatches(isInt)) {
return inferrer.types.intType;
} else if (arguments.hasOnePositionalArgumentThatMatches(isEmpty)) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698