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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element operator[](Node node); 8 Element operator[](Node node);
9 Selector getSelector(Send send); 9 Selector getSelector(Send send);
10 DartType getType(Node node); 10 DartType getType(Node node);
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 visitLiteralInt(LiteralInt node) { 1850 visitLiteralInt(LiteralInt node) {
1851 } 1851 }
1852 1852
1853 visitLiteralDouble(LiteralDouble node) { 1853 visitLiteralDouble(LiteralDouble node) {
1854 } 1854 }
1855 1855
1856 visitLiteralBool(LiteralBool node) { 1856 visitLiteralBool(LiteralBool node) {
1857 } 1857 }
1858 1858
1859 visitLiteralString(LiteralString node) { 1859 visitLiteralString(LiteralString node) {
1860 world.registerInstantiatedClass(compiler.stringClass);
1860 } 1861 }
1861 1862
1862 visitLiteralNull(LiteralNull node) { 1863 visitLiteralNull(LiteralNull node) {
1863 } 1864 }
1864 1865
1865 visitStringJuxtaposition(StringJuxtaposition node) { 1866 visitStringJuxtaposition(StringJuxtaposition node) {
1867 world.registerInstantiatedClass(compiler.stringClass);
1866 node.visitChildren(this); 1868 node.visitChildren(this);
1867 } 1869 }
1868 1870
1869 visitNodeList(NodeList node) { 1871 visitNodeList(NodeList node) {
1870 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) { 1872 for (Link<Node> link = node.nodes; !link.isEmpty; link = link.tail) {
1871 visit(link.head); 1873 visit(link.head);
1872 } 1874 }
1873 } 1875 }
1874 1876
1875 visitOperator(Operator node) { 1877 visitOperator(Operator node) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 } 2069 }
2068 } 2070 }
2069 visit(node.elements); 2071 visit(node.elements);
2070 } 2072 }
2071 2073
2072 visitConditional(Conditional node) { 2074 visitConditional(Conditional node) {
2073 node.visitChildren(this); 2075 node.visitChildren(this);
2074 } 2076 }
2075 2077
2076 visitStringInterpolation(StringInterpolation node) { 2078 visitStringInterpolation(StringInterpolation node) {
2079 world.registerInstantiatedClass(compiler.stringClass);
2077 node.visitChildren(this); 2080 node.visitChildren(this);
2078 } 2081 }
2079 2082
2080 visitStringInterpolationPart(StringInterpolationPart node) { 2083 visitStringInterpolationPart(StringInterpolationPart node) {
2081 registerImplicitInvocation(const SourceString('toString'), 0); 2084 registerImplicitInvocation(const SourceString('toString'), 0);
2082 node.visitChildren(this); 2085 node.visitChildren(this);
2083 } 2086 }
2084 2087
2085 visitBreakStatement(BreakStatement node) { 2088 visitBreakStatement(BreakStatement node) {
2086 TargetElement target; 2089 TargetElement target;
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 new NodeList.empty(), 2605 new NodeList.empty(),
2603 new Block(new NodeList.empty()), 2606 new Block(new NodeList.empty()),
2604 null, Modifiers.EMPTY, null, null); 2607 null, Modifiers.EMPTY, null, null);
2605 } 2608 }
2606 2609
2607 isBlackListed(DartType type) { 2610 isBlackListed(DartType type) {
2608 LibraryElement lib = element.getLibrary(); 2611 LibraryElement lib = element.getLibrary();
2609 return 2612 return
2610 !identical(lib, compiler.coreLibrary) && 2613 !identical(lib, compiler.coreLibrary) &&
2611 !identical(lib, compiler.jsHelperLibrary) && 2614 !identical(lib, compiler.jsHelperLibrary) &&
2615 !identical(lib, compiler.interceptorsLibrary) &&
2612 (identical(type.element, compiler.dynamicClass) || 2616 (identical(type.element, compiler.dynamicClass) ||
2613 identical(type.element, compiler.boolClass) || 2617 identical(type.element, compiler.boolClass) ||
2614 identical(type.element, compiler.numClass) || 2618 identical(type.element, compiler.numClass) ||
2615 identical(type.element, compiler.intClass) || 2619 identical(type.element, compiler.intClass) ||
2616 identical(type.element, compiler.doubleClass) || 2620 identical(type.element, compiler.doubleClass) ||
2617 identical(type.element, compiler.stringClass) || 2621 identical(type.element, compiler.stringClass) ||
2618 identical(type.element, compiler.nullClass) || 2622 identical(type.element, compiler.nullClass) ||
2619 identical(type.element, compiler.functionClass)); 2623 identical(type.element, compiler.functionClass));
2620 } 2624 }
2621 } 2625 }
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
3069 return e; 3073 return e;
3070 } 3074 }
3071 3075
3072 /// Assumed to be called by [resolveRedirectingFactory]. 3076 /// Assumed to be called by [resolveRedirectingFactory].
3073 Element visitReturn(Return node) { 3077 Element visitReturn(Return node) {
3074 Node expression = node.expression; 3078 Node expression = node.expression;
3075 return finishConstructorReference(visit(expression), 3079 return finishConstructorReference(visit(expression),
3076 expression, expression); 3080 expression, expression);
3077 } 3081 }
3078 } 3082 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698