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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 11548027: Implement is-checks for closures. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add ClassElement.lookupBackendMember. Created 8 years 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 | « sdk/lib/_internal/compiler/implementation/elements/elements.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 8b808f06dc260b84ac1840951de76e4abb20aaac..1d66cb51ee67accab7f1975e5b3c9ce5f2ca86a4 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1084,6 +1084,10 @@ $lazyInitializerLogic
if (checkedClasses.contains(compiler.functionClass) ||
!checkedTypedefs.isEmpty) {
FunctionElement call = cls.lookupLocalMember(Compiler.CALL_OPERATOR_NAME);
+ if (call == null) {
+ // If [cls] is a closure, it has a synthetic call operator method.
+ call = cls.lookupBackendMember(Compiler.CALL_OPERATOR_NAME);
+ }
if (call != null) {
generateInterfacesIsTests(compiler.functionClass,
emitIsTest,
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/elements/elements.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698