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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/constant_system.dart

Issue 99303004: Remove unused API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 years 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of dart2js; 5 part of dart2js;
6 6
7 abstract class Operation { 7 abstract class Operation {
8 String get name; 8 String get name;
9 bool isUserDefinable();
10 } 9 }
11 10
12 abstract class UnaryOperation extends Operation { 11 abstract class UnaryOperation extends Operation {
13 /** Returns [:null:] if it was unable to fold the operation. */ 12 /** Returns [:null:] if it was unable to fold the operation. */
14 Constant fold(Constant constant); 13 Constant fold(Constant constant);
15 apply(value);
16 } 14 }
17 15
18 abstract class BinaryOperation extends Operation { 16 abstract class BinaryOperation extends Operation {
19 /** Returns [:null:] if it was unable to fold the operation. */ 17 /** Returns [:null:] if it was unable to fold the operation. */
20 Constant fold(Constant left, Constant right); 18 Constant fold(Constant left, Constant right);
21 apply(left, right); 19 apply(left, right);
22 } 20 }
23 21
24 /** 22 /**
25 * A [ConstantSystem] is responsible for creating constants and folding them. 23 * A [ConstantSystem] is responsible for creating constants and folding them.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool isBool(Constant constant); 68 bool isBool(Constant constant);
71 /** Returns true if the [constant] is null at runtime. */ 69 /** Returns true if the [constant] is null at runtime. */
72 bool isNull(Constant constant); 70 bool isNull(Constant constant);
73 71
74 Operation lookupUnary(String operator) { 72 Operation lookupUnary(String operator) {
75 if (operator == '-') return negate; 73 if (operator == '-') return negate;
76 if (operator == '~') return bitNot; 74 if (operator == '~') return bitNot;
77 return null; 75 return null;
78 } 76 }
79 } 77 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698