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

Unified Diff: lib/compiler/implementation/ssa/closure.dart

Issue 10310040: Sort the output (for now just the classes and instance members). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/closure.dart
diff --git a/lib/compiler/implementation/ssa/closure.dart b/lib/compiler/implementation/ssa/closure.dart
index 82ee51afec661305c02f58d0dda510b39cce048d..780b3ffe31949dfaaabf356859e4887a9fdb325c 100644
--- a/lib/compiler/implementation/ssa/closure.dart
+++ b/lib/compiler/implementation/ssa/closure.dart
@@ -10,15 +10,21 @@ class ClosureFieldElement extends Element {
bool isAssignable() => false;
String toString() => "ClosureFieldElement($name)";
+ Token position() => enclosingElement.position();
}
class ClosureClassElement extends ClassElement {
- ClosureClassElement(Compiler compiler, Element enclosingElement)
+ Token originalPosition;
+
+ ClosureClassElement(Compiler compiler, Element enclosingElement,
+ this.originalPosition)
: super(compiler.closureClass.name, enclosingElement) {
isResolved = true;
compiler.closureClass.ensureResolved(compiler);
supertype = compiler.closureClass.computeType(compiler);
}
+
+ Token position() => originalPosition;
}
class BoxElement extends Element {
@@ -318,7 +324,9 @@ class ClosureTranslator extends AbstractVisitor {
ClosureData globalizeClosure(FunctionExpression node) {
FunctionElement element = elements[node];
ClassElement globalizedElement =
- new ClosureClassElement(compiler, element.getCompilationUnit());
+ new ClosureClassElement(compiler,
+ element.getCompilationUnit(),
+ element.position());
FunctionElement callElement =
new FunctionElement.from(Namer.CLOSURE_INVOCATION_NAME,
element,
« lib/compiler/implementation/emitter.dart ('K') | « lib/compiler/implementation/scanner/token.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698