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

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

Issue 1148343004: Remove ConstantExpression.value (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update comments. 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
86 new BoolConstantExpression( 86 new BoolConstantExpression(true),
87 true, 87 new TrueConstantValue());
88 new TrueConstantValue()));
89 } 88 }
90 89
91 Constant get falseConstant { 90 Constant get falseConstant {
92 return new Constant( 91 return new Constant(
93 new BoolConstantExpression( 92 new BoolConstantExpression(false),
94 false, 93 new FalseConstantValue());
95 new FalseConstantValue()));
96 } 94 }
97 95
98 Constant get nullConstant { 96 Constant get nullConstant {
99 return new Constant( 97 return new Constant(
100 new NullConstantExpression( 98 new NullConstantExpression(),
101 new NullConstantValue())); 99 new NullConstantValue());
102 } 100 }
103 101
104 void insertLetPrim(Primitive primitive, Expression node) { 102 void insertLetPrim(Primitive primitive, Expression node) {
105 LetPrim let = new LetPrim(primitive); 103 LetPrim let = new LetPrim(primitive);
106 InteriorNode parent = node.parent; 104 InteriorNode parent = node.parent;
107 parent.body = let; 105 parent.body = let;
108 let.body = node; 106 let.body = node;
109 node.parent = let; 107 node.parent = let;
110 let.parent = parent; 108 let.parent = parent;
111 } 109 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 condition.value.unlink(); 285 condition.value.unlink();
288 node.trueContinuation.unlink(); 286 node.trueContinuation.unlink();
289 node.falseContinuation.unlink(); 287 node.falseContinuation.unlink();
290 parent.body = newNode; 288 parent.body = newNode;
291 } 289 }
292 290
293 processInterceptor(Interceptor node) { 291 processInterceptor(Interceptor node) {
294 _glue.registerSpecializedGetInterceptor(node.interceptedClasses); 292 _glue.registerSpecializedGetInterceptor(node.interceptedClasses);
295 } 293 }
296 } 294 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698