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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart

Issue 980203002: Fix dart2dart new_backend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | tests/language/language_dart2js.status » ('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) 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 dart_tree_printer; 5 library dart_tree_printer;
6 6
7 import '../constants/values.dart' as values; 7 import '../constants/values.dart' as values;
8 import '../dart_types.dart' as types; 8 import '../dart_types.dart' as types;
9 import '../dart2jslib.dart' as dart2js; 9 import '../dart2jslib.dart' as dart2js;
10 import '../elements/elements.dart' as elements; 10 import '../elements/elements.dart' as elements;
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 null, // body 969 null, // body
970 param.type == null ? null : makeType(param.type), 970 param.type == null ? null : makeType(param.type),
971 makeEmptyModifiers(), // TODO: Function parameter modifiers? 971 makeEmptyModifiers(), // TODO: Function parameter modifiers?
972 null, // initializers 972 null, // initializers
973 null, // get/set 973 null, // get/set
974 null); // async modifier 974 null); // async modifier
975 if (param.element != null) { 975 if (param.element != null) {
976 setElement(definition, param.element, param); 976 setElement(definition, param.element, param);
977 } 977 }
978 if (param.defaultValue != null) { 978 if (param.defaultValue != null) {
979 return new tree.SendSet( 979 definition = new tree.SendSet(
Johnni Winther 2015/03/05 10:48:01 This fixes a crash in language/issue13179_test
980 null, 980 null,
981 definition, 981 definition,
982 new tree.Operator(assignOperator), 982 new tree.Operator(assignOperator),
983 singleton(makeExpression(param.defaultValue))); 983 singleton(makeExpression(param.defaultValue)));
984 } else {
985 return new tree.VariableDefinitions(
986 null,
987 makeEmptyModifiers(),
988 singleton(definition));
989 } 984 }
985 return new tree.VariableDefinitions(
986 null,
987 makeEmptyModifiers(),
988 singleton(definition));
990 } else { 989 } else {
991 tree.Node definition; 990 tree.Node definition;
992 if (param.defaultValue != null) { 991 if (param.defaultValue != null) {
993 definition = new tree.SendSet( 992 definition = new tree.SendSet(
994 null, 993 null,
995 makeIdentifier(param.name), 994 makeIdentifier(param.name),
996 new tree.Operator(assignOperator), 995 new tree.Operator(assignOperator),
997 singleton(makeExpression(param.defaultValue))); 996 singleton(makeExpression(param.defaultValue)));
998 } else { 997 } else {
999 definition = makeIdentifier(param.name); 998 definition = makeIdentifier(param.name);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 printStringChunk(chunk.previous), 1333 printStringChunk(chunk.previous),
1335 node); 1334 node);
1336 } else { 1335 } else {
1337 return node; 1336 return node;
1338 } 1337 }
1339 } 1338 }
1340 return printStringChunk(output.chunk); 1339 return printStringChunk(output.chunk);
1341 } 1340 }
1342 1341
1343 } 1342 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698