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

Side by Side Diff: lib/compiler/implementation/resolver.dart

Issue 10917254: Move registering of interceptors to the JsBackend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 abstract class TreeElements { 5 abstract class TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 DartType getType(TypeAnnotation annotation); 8 DartType getType(TypeAnnotation annotation);
9 bool isParameterChecked(Element element); 9 bool isParameterChecked(Element element);
10 } 10 }
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 } else if (selector.isSetter()) { 1539 } else if (selector.isSetter()) {
1540 world.registerDynamicSetter(selector.name, selector); 1540 world.registerDynamicSetter(selector.name, selector);
1541 } else { 1541 } else {
1542 world.registerDynamicInvocation(selector.name, selector); 1542 world.registerDynamicInvocation(selector.name, selector);
1543 } 1543 }
1544 } else if (Elements.isStaticOrTopLevel(target)) { 1544 } else if (Elements.isStaticOrTopLevel(target)) {
1545 // TODO(kasperl): It seems like we're not supposed to register 1545 // TODO(kasperl): It seems like we're not supposed to register
1546 // the use of classes. Wouldn't it be simpler if we just did? 1546 // the use of classes. Wouldn't it be simpler if we just did?
1547 if (!target.isClass()) world.registerStaticUse(target); 1547 if (!target.isClass()) world.registerStaticUse(target);
1548 } 1548 }
1549 1549 compiler.backend.onUseSelector(selector, world);
kasperl 2012/09/14 09:04:41 I think this would be cleaner if you'd call world.
karlklose 2012/10/08 13:15:35 Done.
1550 var interceptor =
1551 new Interceptors(compiler).getStaticInterceptorBySelector(selector);
1552 if (interceptor !== null) {
1553 world.registerStaticUse(interceptor);
1554 }
1555 } 1550 }
1556 1551
1557 visitLiteralInt(LiteralInt node) { 1552 visitLiteralInt(LiteralInt node) {
1558 } 1553 }
1559 1554
1560 visitLiteralDouble(LiteralDouble node) { 1555 visitLiteralDouble(LiteralDouble node) {
1561 } 1556 }
1562 1557
1563 visitLiteralBool(LiteralBool node) { 1558 visitLiteralBool(LiteralBool node) {
1564 } 1559 }
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 2782
2788 Element localLookup(SourceString name) => library.find(name); 2783 Element localLookup(SourceString name) => library.find(name);
2789 Element lookup(SourceString name) => localLookup(name); 2784 Element lookup(SourceString name) => localLookup(name);
2790 Element lexicalLookup(SourceString name) => localLookup(name); 2785 Element lexicalLookup(SourceString name) => localLookup(name);
2791 2786
2792 Element add(Element newElement) { 2787 Element add(Element newElement) {
2793 throw "Cannot add an element in the top scope"; 2788 throw "Cannot add an element in the top scope";
2794 } 2789 }
2795 String toString() => '$element'; 2790 String toString() => '$element';
2796 } 2791 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698