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

Side by Side Diff: pkg/analyzer2dart/lib/src/cps_generator.dart

Issue 1068243002: Overhaul tree IR visitor and rename IR classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer2dart.cps_generator; 5 library analyzer2dart.cps_generator;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 8
9 import 'package:compiler/src/dart_types.dart' as dart2js; 9 import 'package:compiler/src/dart_types.dart' as dart2js;
10 import 'package:compiler/src/elements/elements.dart' as dart2js; 10 import 'package:compiler/src/elements/elements.dart' as dart2js;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 @override 49 @override
50 ir.FieldDefinition visitTopLevelVariableElement( 50 ir.FieldDefinition visitTopLevelVariableElement(
51 analyzer.TopLevelVariableElement element) { 51 analyzer.TopLevelVariableElement element) {
52 CpsGeneratingVisitor visitor = new CpsGeneratingVisitor(converter, element); 52 CpsGeneratingVisitor visitor = new CpsGeneratingVisitor(converter, element);
53 VariableDeclaration variableDeclaration = node; 53 VariableDeclaration variableDeclaration = node;
54 return visitor.handleFieldDeclaration(element, variableDeclaration); 54 return visitor.handleFieldDeclaration(element, variableDeclaration);
55 } 55 }
56 56
57 @override 57 @override
58 ir.ExecutableDefinition visitConstructorElement( 58 ir.RootNode visitConstructorElement(analyzer.ConstructorElement element) {
59 analyzer.ConstructorElement element) {
60 CpsGeneratingVisitor visitor = new CpsGeneratingVisitor(converter, element); 59 CpsGeneratingVisitor visitor = new CpsGeneratingVisitor(converter, element);
61 if (!element.isFactory) { 60 if (!element.isFactory) {
62 ConstructorDeclaration constructorDeclaration = node; 61 ConstructorDeclaration constructorDeclaration = node;
63 FunctionBody body; 62 FunctionBody body;
64 if (constructorDeclaration != null) { 63 if (constructorDeclaration != null) {
65 body = constructorDeclaration.body; 64 body = constructorDeclaration.body;
66 } else { 65 } else {
67 assert(element.isSynthetic); 66 assert(element.isSynthetic);
68 } 67 }
69 return visitor.handleConstructorDeclaration(element, body); 68 return visitor.handleConstructorDeclaration(element, body);
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 irBuilder.buildTry( 582 irBuilder.buildTry(
584 tryStatementInfo: new TryStatementInfo(), 583 tryStatementInfo: new TryStatementInfo(),
585 buildTryBlock: subbuild(node.body), 584 buildTryBlock: subbuild(node.body),
586 catchClauseInfos: catchClauseInfos); 585 catchClauseInfos: catchClauseInfos);
587 } 586 }
588 } 587 }
589 588
590 class NullCapturedVariables extends DartCapturedVariables { 589 class NullCapturedVariables extends DartCapturedVariables {
591 NullCapturedVariables() : super(null); 590 NullCapturedVariables() : super(null);
592 } 591 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer2dart/test/sexpr_test.dart » ('j') | pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698