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

Unified Diff: pkg/compiler/lib/src/closure.dart

Issue 2981423003: Move .getLocalFunction from KernelToElementMap to KernelToLocalsMap (Closed)
Patch Set: Created 3 years, 5 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/closure.dart
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 637237cab18224ce7e258ac0df3acaea29e41b7b..5b43c620643ced8991ec76a4be9b896183b556e6 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -482,9 +482,7 @@ class ClosureClassElement extends ClassElementX {
// classes (since the emitter sorts classes by their id).
compiler.idGenerator.getNextFreeId(),
STATE_DONE) {
- ClassElement superclass = methodElement.isInstanceMember
- ? compiler.resolution.commonElements.boundClosureClass
Emily Fortuna 2017/07/21 22:21:43 This was the behavior in the old code. Why is it n
Johnni Winther 2017/07/28 12:08:19 This is what happens when the types are not precis
- : compiler.resolution.commonElements.closureClass;
+ ClassElement superclass = compiler.resolution.commonElements.closureClass;
superclass.ensureResolved(compiler.resolution);
supertype = superclass.thisType;
interfaces = const Link<ResolutionDartType>();
@@ -1379,7 +1377,7 @@ class ClosureTranslator extends Visitor {
ClosureClassElement globalizedElement =
new ClosureClassElement(node, closureName, compiler, element);
// Extend [globalizedElement] as an instantiated class in the closed world.
- closedWorldRefiner.registerClosureClass(globalizedElement, false);
+ closedWorldRefiner.registerClosureClass(globalizedElement);
MethodElement callElement = new SynthesizedCallMethodElementX(
Identifiers.call, element, globalizedElement, node, elements);
backend.mirrorsDataBuilder.maybeMarkClosureAsNeededForReflection(
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/closure.dart » ('j') | pkg/compiler/lib/src/js_model/js_strategy.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698