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

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: Cleanup 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 ..element = exp.element; 1248 ..element = exp.element;
1249 } 1249 }
1250 1250
1251 @override 1251 @override
1252 Expression visitBinary(BinaryConstantExpression exp, 1252 Expression visitBinary(BinaryConstantExpression exp,
1253 BuilderContext<Statement> context) { 1253 BuilderContext<Statement> context) {
1254 return handlePrimitiveConstant(exp.value); 1254 return handlePrimitiveConstant(exp.value);
1255 } 1255 }
1256 1256
1257 @override 1257 @override
1258 Expression visitIdentical(IdenticalConstantExpression exp,
1259 BuilderContext<Statement> context) {
1260 return handlePrimitiveConstant(exp.value);
1261 }
1262
1263 @override
1258 Expression visitConditional(ConditionalConstantExpression exp, 1264 Expression visitConditional(ConditionalConstantExpression exp,
1259 BuilderContext<Statement> context) { 1265 BuilderContext<Statement> context) {
1260 if (exp.condition.value.isTrue) { 1266 if (exp.condition.value.isTrue) {
1261 return exp.trueExp.accept(this); 1267 return exp.trueExp.accept(this);
1262 } else { 1268 } else {
1263 return exp.falseExp.accept(this); 1269 return exp.falseExp.accept(this);
1264 } 1270 }
1265 } 1271 }
1266 1272
1267 @override 1273 @override
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null); 1355 : super(name, ElementKind.VARIABLE, enclosingElement, variables, null);
1350 1356
1351 ExecutableElement get executableContext => enclosingElement; 1357 ExecutableElement get executableContext => enclosingElement;
1352 1358
1353 ExecutableElement get memberContext => executableContext.memberContext; 1359 ExecutableElement get memberContext => executableContext.memberContext;
1354 1360
1355 bool get isLocal => true; 1361 bool get isLocal => true;
1356 1362
1357 LibraryElement get implementationLibrary => enclosingElement.library; 1363 LibraryElement get implementationLibrary => enclosingElement.library;
1358 } 1364 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698