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

Unified Diff: pkg/compiler/lib/src/world.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
Index: pkg/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 6928f7dda7fe402bb836ff7e787bef8e0c20ba94..b49f3c6a3e01935da16afb0b0b447a5496cde985 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -1038,11 +1038,11 @@ abstract class ClosedWorldBase implements ClosedWorld, ClosedWorldRefiner {
SideEffects getSideEffectsOfElement(Entity element) {
assert(_checkEntity(element));
- return _sideEffects.putIfAbsent(element, () {
- return new SideEffects();
- });
+ return _sideEffects.putIfAbsent(element, _makeSideEffects);
}
+ static _makeSideEffects() => new SideEffects();
+
@override
SideEffects getCurrentlyKnownSideEffects(Entity element) {
return getSideEffectsOfElement(element);

Powered by Google App Engine
This is Rietveld 408576698