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

Side by Side Diff: lib/src/js/printer.dart

Issue 1011153002: js: fix core.Object, output order, static const fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
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
« no previous file with comments | « lib/src/js/nodes.dart ('k') | test/codegen/expect/BenchmarkBase.js » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of js_ast; 5 part of js_ast;
6 6
7 7
8 class JavaScriptPrintingOptions { 8 class JavaScriptPrintingOptions {
9 final bool shouldCompressOutput; 9 final bool shouldCompressOutput;
10 final bool minifyLocalVariables; 10 final bool minifyLocalVariables;
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 visit(node.classExpr); 972 visit(node.classExpr);
973 lineOut(); 973 lineOut();
974 } 974 }
975 975
976 visitClassExpression(ClassExpression node) { 976 visitClassExpression(ClassExpression node) {
977 out('class '); 977 out('class ');
978 visit(node.name); 978 visit(node.name);
979 if (node.heritage != null) { 979 if (node.heritage != null) {
980 out(' extends '); 980 out(' extends ');
981 visit(node.heritage); 981 visit(node.heritage);
982 spaceOut();
983 } 982 }
983 spaceOut();
984 out('{'); 984 out('{');
985 lineOut(); 985 lineOut();
986 indentMore(); 986 indentMore();
987 for (var method in node.methods) { 987 for (var method in node.methods) {
988 indent(); 988 indent();
989 visit(method); 989 visit(method);
990 lineOut(); 990 lineOut();
991 } 991 }
992 indentLess(); 992 indentLess();
993 indent(); 993 indent();
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 codes.add(nthLetter((n ~/ nameSpaceSize) % LETTERS)); 1405 codes.add(nthLetter((n ~/ nameSpaceSize) % LETTERS));
1406 } 1406 }
1407 codes.add(charCodes.$0 + digit); 1407 codes.add(charCodes.$0 + digit);
1408 newName = new String.fromCharCodes(codes); 1408 newName = new String.fromCharCodes(codes);
1409 } 1409 }
1410 assert(new RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName)); 1410 assert(new RegExp(r'[a-zA-Z][a-zA-Z0-9]*').hasMatch(newName));
1411 maps.last[oldName] = newName; 1411 maps.last[oldName] = newName;
1412 return newName; 1412 return newName;
1413 } 1413 }
1414 } 1414 }
OLDNEW
« no previous file with comments | « lib/src/js/nodes.dart ('k') | test/codegen/expect/BenchmarkBase.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698