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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart

Issue 448943004: Refactor and simplify the dart2dart renamer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix minifying name generation Created 6 years, 4 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 | sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import 'cps_ir_nodes.dart' as ir; 7 import 'cps_ir_nodes.dart' as ir;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../dart2jslib.dart'; 9 import '../dart2jslib.dart';
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // and generating the correct syntax. 103 // and generating the correct syntax.
104 if (element.isGetter || element.isSetter) return false; 104 if (element.isGetter || element.isSetter) return false;
105 105
106 // TODO(lry): support native functions (also in [visitReturn]). 106 // TODO(lry): support native functions (also in [visitReturn]).
107 if (function.isNative) return false; 107 if (function.isNative) return false;
108 108
109 // TODO(kmillikin,sigurdm): support syntax for redirecting factory 109 // TODO(kmillikin,sigurdm): support syntax for redirecting factory
110 if (function is ConstructorElement && function.isRedirectingFactory) { 110 if (function is ConstructorElement && function.isRedirectingFactory) {
111 return false; 111 return false;
112 } 112 }
113 // TODO(kmillikin,sigurdm): support syntax for factory constructors
114 if (function is ConstructorElement && function.isFactoryConstructor) {
115 return false;
116 }
113 117
114 return true; 118 return true;
115 } 119 }
116 120
117 bool get inCheckedMode { 121 bool get inCheckedMode {
118 bool result = false; 122 bool result = false;
119 assert((result = true)); 123 assert((result = true));
120 return result; 124 return result;
121 } 125 }
122 126
(...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 } 1813 }
1810 1814
1811 visitFunctionExpression(ast.FunctionExpression node) { 1815 visitFunctionExpression(ast.FunctionExpression node) {
1812 FunctionElement oldFunction = currentFunction; 1816 FunctionElement oldFunction = currentFunction;
1813 currentFunction = elements[node]; 1817 currentFunction = elements[node];
1814 visit(node.body); 1818 visit(node.body);
1815 currentFunction = oldFunction; 1819 currentFunction = oldFunction;
1816 } 1820 }
1817 1821
1818 } 1822 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698