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

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: 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 | « no previous file | 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 7b7df7049c2abed7692025b1268dc227ab6a7322..91f40b445b4d47657722adb0a94a351192ba6fff 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -1056,6 +1056,15 @@ $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.
ngeoffray 2012/12/12 13:28:02 Please add a cls.lookupBackendMember.
+ for (Element element in cls.backendMembers) {
+ if (element.name == Compiler.CALL_OPERATOR_NAME) {
+ call = element;
+ break;
+ }
+ }
+ }
if (call != null) {
generateInterfacesIsTests(compiler.functionClass,
emitIsTest,
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698