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

Side by Side Diff: pkg/compiler/lib/src/js_backend/codegen/unsugar.dart

Issue 1195573003: dart2js cps: Refactor and optimize string concatenations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Revert doc comment change Created 5 years, 6 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
OLDNEW
1 library dart2js.unsugar_cps; 1 library dart2js.unsugar_cps;
2 2
3 import '../../cps_ir/cps_ir_nodes.dart'; 3 import '../../cps_ir/cps_ir_nodes.dart';
4 4
5 import '../../cps_ir/optimizers.dart' show ParentVisitor; 5 import '../../cps_ir/optimizers.dart' show ParentVisitor;
6 import '../../constants/expressions.dart'; 6 import '../../constants/expressions.dart';
7 import '../../constants/values.dart'; 7 import '../../constants/values.dart';
8 import '../../elements/elements.dart' show 8 import '../../elements/elements.dart' show
9 ClassElement, 9 ClassElement,
10 FieldElement, 10 FieldElement,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 visit(function); 75 visit(function);
76 } 76 }
77 77
78 @override 78 @override
79 visit(Node node) { 79 visit(Node node) {
80 Node result = node.accept(this); 80 Node result = node.accept(this);
81 return result != null ? result : node; 81 return result != null ? result : node;
82 } 82 }
83 83
84 Constant get trueConstant { 84 Constant get trueConstant {
85 return new Constant( 85 return new Constant(new TrueConstantValue());
86 new BoolConstantExpression(true),
87 new TrueConstantValue());
88 } 86 }
89 87
90 Constant get falseConstant { 88 Constant get falseConstant {
91 return new Constant( 89 return new Constant(new FalseConstantValue());
92 new BoolConstantExpression(false),
93 new FalseConstantValue());
94 } 90 }
95 91
96 Constant get nullConstant { 92 Constant get nullConstant {
97 return new Constant( 93 return new Constant(new NullConstantValue());
98 new NullConstantExpression(),
99 new NullConstantValue());
100 } 94 }
101 95
102 void insertLetPrim(Primitive primitive, Expression node) { 96 void insertLetPrim(Primitive primitive, Expression node) {
103 LetPrim let = new LetPrim(primitive); 97 LetPrim let = new LetPrim(primitive);
104 InteriorNode parent = node.parent; 98 InteriorNode parent = node.parent;
105 parent.body = let; 99 parent.body = let;
106 let.body = node; 100 let.body = node;
107 node.parent = let; 101 node.parent = let;
108 let.parent = parent; 102 let.parent = parent;
109 } 103 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 condition.value.unlink(); 279 condition.value.unlink();
286 node.trueContinuation.unlink(); 280 node.trueContinuation.unlink();
287 node.falseContinuation.unlink(); 281 node.falseContinuation.unlink();
288 parent.body = newNode; 282 parent.body = newNode;
289 } 283 }
290 284
291 processInterceptor(Interceptor node) { 285 processInterceptor(Interceptor node) {
292 _glue.registerSpecializedGetInterceptor(node.interceptedClasses); 286 _glue.registerSpecializedGetInterceptor(node.interceptedClasses);
293 } 287 }
294 } 288 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698