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

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

Issue 1201753004: Revert "dart2js cps: Refactor and optimize string concatenations." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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(new TrueConstantValue()); 85 return new Constant(
86 new BoolConstantExpression(true),
87 new TrueConstantValue());
86 } 88 }
87 89
88 Constant get falseConstant { 90 Constant get falseConstant {
89 return new Constant(new FalseConstantValue()); 91 return new Constant(
92 new BoolConstantExpression(false),
93 new FalseConstantValue());
90 } 94 }
91 95
92 Constant get nullConstant { 96 Constant get nullConstant {
93 return new Constant(new NullConstantValue()); 97 return new Constant(
98 new NullConstantExpression(),
99 new NullConstantValue());
94 } 100 }
95 101
96 void insertLetPrim(Primitive primitive, Expression node) { 102 void insertLetPrim(Primitive primitive, Expression node) {
97 LetPrim let = new LetPrim(primitive); 103 LetPrim let = new LetPrim(primitive);
98 InteriorNode parent = node.parent; 104 InteriorNode parent = node.parent;
99 parent.body = let; 105 parent.body = let;
100 let.body = node; 106 let.body = node;
101 node.parent = let; 107 node.parent = let;
102 let.parent = parent; 108 let.parent = parent;
103 } 109 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 condition.value.unlink(); 285 condition.value.unlink();
280 node.trueContinuation.unlink(); 286 node.trueContinuation.unlink();
281 node.falseContinuation.unlink(); 287 node.falseContinuation.unlink();
282 parent.body = newNode; 288 parent.body = newNode;
283 } 289 }
284 290
285 processInterceptor(Interceptor node) { 291 processInterceptor(Interceptor node) {
286 _glue.registerSpecializedGetInterceptor(node.interceptedClasses); 292 _glue.registerSpecializedGetInterceptor(node.interceptedClasses);
287 } 293 }
288 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698