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

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

Issue 1070293004: Use UnaryOperator and BinaryOperator in ConstantSystem. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reinsert from bad merge Created 5 years, 8 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
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 backend_ast_emitter; 5 library backend_ast_emitter;
6 6
7 import '../tree_ir/tree_ir_nodes.dart' as tree; 7 import '../tree_ir/tree_ir_nodes.dart' as tree;
8 import 'backend_ast_nodes.dart'; 8 import 'backend_ast_nodes.dart';
9 import '../constants/expressions.dart'; 9 import '../constants/expressions.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 ..element = exp.element; 1252 ..element = exp.element;
1253 } 1253 }
1254 1254
1255 @override 1255 @override
1256 Expression visitBinary(BinaryConstantExpression exp, 1256 Expression visitBinary(BinaryConstantExpression exp,
1257 BuilderContext<Statement> context) { 1257 BuilderContext<Statement> context) {
1258 return handlePrimitiveConstant(exp.value); 1258 return handlePrimitiveConstant(exp.value);
1259 } 1259 }
1260 1260
1261 @override 1261 @override
1262 Expression visitIdentical(IdenticalConstantExpression exp,
1263 BuilderContext<Statement> context) {
1264 return handlePrimitiveConstant(exp.value);
1265 }
1266
1267 @override
1262 Expression visitConditional(ConditionalConstantExpression exp, 1268 Expression visitConditional(ConditionalConstantExpression exp,
1263 BuilderContext<Statement> context) { 1269 BuilderContext<Statement> context) {
1264 if (exp.condition.value.isTrue) { 1270 if (exp.condition.value.isTrue) {
1265 return exp.trueExp.accept(this); 1271 return exp.trueExp.accept(this);
1266 } else { 1272 } else {
1267 return exp.falseExp.accept(this); 1273 return exp.falseExp.accept(this);
1268 } 1274 }
1269 } 1275 }
1270 1276
1271 @override 1277 @override
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); 1359 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null);
1354 1360
1355 ExecutableElement get executableContext => enclosingElement; 1361 ExecutableElement get executableContext => enclosingElement;
1356 1362
1357 ExecutableElement get memberContext => executableContext.memberContext; 1363 ExecutableElement get memberContext => executableContext.memberContext;
1358 1364
1359 bool get isLocal => true; 1365 bool get isLocal => true;
1360 1366
1361 LibraryElement get implementationLibrary => enclosingElement.library; 1367 LibraryElement get implementationLibrary => enclosingElement.library;
1362 } 1368 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/resolution/operators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698