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

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

Issue 2864573002: dart2js allocation tweaks (Closed)
Patch Set: Created 3 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/io/location_provider.dart » ('j') | pkg/kernel/lib/ast.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_system.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index 43f4074b1ad3e1eaf50b0599bf809fa1ac5c1ccf..72dec4b5d37ef6f65ddbbd746e04b9e2d803be41 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -325,9 +325,8 @@ class TypeSystem {
ElementTypeInformation getInferredTypeOf(Element element) {
element = element.implementation;
- return typeInformations.putIfAbsent(element, () {
- return new ElementTypeInformation(element, this);
- });
+ return typeInformations[element] ??=
+ new ElementTypeInformation(element, this);
}
/**
« no previous file with comments | « no previous file | pkg/compiler/lib/src/io/location_provider.dart » ('j') | pkg/kernel/lib/ast.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698