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

Side by Side Diff: dart/frog/leg/resolver.dart

Issue 9380006: Support is!. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « no previous file | dart/frog/leg/scanner/listener.dart » ('j') | dart/frog/leg/ssa/builder.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 } 8 }
9 9
10 class TreeElementMapping implements TreeElements { 10 class TreeElementMapping implements TreeElements {
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 target = prefix.library.lookupLocalMember(name); 568 target = prefix.library.lookupLocalMember(name);
569 if (target == null) { 569 if (target == null) {
570 error(node, MessageKind.NO_SUCH_LIBRARY_MEMBER, 570 error(node, MessageKind.NO_SUCH_LIBRARY_MEMBER,
571 [resolvedReceiver.name, name]); 571 [resolvedReceiver.name, name]);
572 } 572 }
573 } 573 }
574 } 574 }
575 return target; 575 return target;
576 } 576 }
577 577
578 resolveTypeTest(TypeAnnotation node) { 578 resolveTypeTest(Node argument) {
579 TypeAnnotation node = argument.asTypeAnnotation();
ahe 2012/02/13 09:59:57 I'd be more comfortable with a visitor.
580 if (node == null) {
581 node = argument.asSend().receiver;
ahe 2012/02/13 09:59:57 This could cause a null pointer exception.
582 }
579 resolveTypeRequired(node); 583 resolveTypeRequired(node);
580 } 584 }
581 585
582 void handleArguments(Send node) { 586 void handleArguments(Send node) {
583 int count = 0; 587 int count = 0;
584 List<SourceString> namedArguments = <SourceString>[]; 588 List<SourceString> namedArguments = <SourceString>[];
585 for (Link<Node> link = node.argumentsNode.nodes; 589 for (Link<Node> link = node.argumentsNode.nodes;
586 !link.isEmpty(); 590 !link.isEmpty();
587 link = link.tail) { 591 link = link.tail) {
588 count++; 592 count++;
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 class TopScope extends Scope { 1153 class TopScope extends Scope {
1150 LibraryElement get library() => element; 1154 LibraryElement get library() => element;
1151 1155
1152 TopScope(LibraryElement library) : super(null, library); 1156 TopScope(LibraryElement library) : super(null, library);
1153 Element lookup(SourceString name) => library.find(name); 1157 Element lookup(SourceString name) => library.find(name);
1154 1158
1155 Element add(Element element) { 1159 Element add(Element element) {
1156 throw "Cannot add an element in the top scope"; 1160 throw "Cannot add an element in the top scope";
1157 } 1161 }
1158 } 1162 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/scanner/listener.dart » ('j') | dart/frog/leg/ssa/builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698