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

Unified Diff: pkg/compiler/lib/src/dart_backend/backend.dart

Issue 764023005: Generate typedef node from the element. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittest Created 6 years 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_backend/backend.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend.dart b/pkg/compiler/lib/src/dart_backend/backend.dart
index 171244dc5dfc0996c48f16892f5bd6df64133ffb..a3d7d152f0e6cfaab76161beee35f6bc1b7f49d3 100644
--- a/pkg/compiler/lib/src/dart_backend/backend.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend.dart
@@ -11,10 +11,7 @@ class ElementAst {
final Node ast;
final TreeElements treeElements;
- ElementAst(AstElement element)
- : this.internal(element.resolvedAst.node, element.resolvedAst.elements);
-
- ElementAst.internal(this.ast, this.treeElements);
+ ElementAst(this.ast, this.treeElements);
}
class DartBackend extends Backend {
@@ -182,7 +179,7 @@ class DartBackend extends Backend {
backend_ast.ExecutableDefinition backendAst =
backend_ast_emitter.emit(treeDefinition);
Node frontend_ast = backend2frontend.emit(treeElements, backendAst);
- return new ElementAst.internal(frontend_ast, treeElements);
+ return new ElementAst(frontend_ast, treeElements);
}
@@ -202,7 +199,8 @@ class DartBackend extends Backend {
ElementAst computeElementAst(AstElement element) {
if (!compiler.irBuilder.hasIr(element)) {
- return new ElementAst(element);
+ return new ElementAst(element.resolvedAst.node,
+ element.resolvedAst.elements);
} else {
cps_ir.ExecutableDefinition definition =
compiler.irBuilder.getIr(element);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698