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

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

Issue 9418045: Support for native in leg, and start moving native tests to a specific test suite. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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
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 #library('elements'); 5 #library('elements');
6 6
7 #import('../tree/tree.dart'); 7 #import('../tree/tree.dart');
8 #import('../scanner/scannerlib.dart'); 8 #import('../scanner/scannerlib.dart');
9 #import('../leg.dart'); // TODO(karlklose): we only need type. 9 #import('../leg.dart'); // TODO(karlklose): we only need type.
10 #import('../util/util.dart'); 10 #import('../util/util.dart');
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 * Returns the super class, if any. 628 * Returns the super class, if any.
629 * 629 *
630 * The returned element may not be resolved yet. 630 * The returned element may not be resolved yet.
631 */ 631 */
632 ClassElement get superclass() { 632 ClassElement get superclass() {
633 assert(isResolved); 633 assert(isResolved);
634 return supertype === null ? null : supertype.element; 634 return supertype === null ? null : supertype.element;
635 } 635 }
636 636
637 bool isInterface() => false; 637 bool isInterface() => false;
638 bool isNative() => nativeName != null;
639 SourceString nativeName;
638 } 640 }
639 641
640 class Elements { 642 class Elements {
641 static bool isLocal(Element element) { 643 static bool isLocal(Element element) {
642 return ((element !== null) 644 return ((element !== null)
643 && !element.isInstanceMember() 645 && !element.isInstanceMember()
644 && !isStaticOrTopLevelField(element) 646 && !isStaticOrTopLevelField(element)
645 && !isStaticOrTopLevelFunction(element) 647 && !isStaticOrTopLevelFunction(element)
646 && (element.kind === ElementKind.VARIABLE || 648 && (element.kind === ElementKind.VARIABLE ||
647 element.kind === ElementKind.PARAMETER || 649 element.kind === ElementKind.PARAMETER ||
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 bool isContinueTarget = false; 744 bool isContinueTarget = false;
743 745
744 StatementElement(this.origin, Element enclosingElement) 746 StatementElement(this.origin, Element enclosingElement)
745 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); 747 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement);
746 StatementElement.label(String name, this.origin, Element enclosingElement) 748 StatementElement.label(String name, this.origin, Element enclosingElement)
747 : super(new SourceString(name), ElementKind.STATEMENT, enclosingElement); 749 : super(new SourceString(name), ElementKind.STATEMENT, enclosingElement);
748 bool get isTarget() => isBreakTarget || isContinueTarget; 750 bool get isTarget() => isBreakTarget || isContinueTarget;
749 751
750 Node parseNode(DiagnosticListener l) => origin; 752 Node parseNode(DiagnosticListener l) => origin;
751 } 753 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698