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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.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 side-by-side diff with in-line comments
Download patch
Index: dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart b/dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
index a1067c3ff5d7f0c947f1350a11cc6c20617b9dd9..64b60034ab1df1ec01041e56fad70ccc5786cf10 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
@@ -8,7 +8,6 @@ const DART_CONSTANT_SYSTEM = const DartConstantSystem();
class BitNotOperation implements UnaryOperation {
final String name = '~';
- bool isUserDefinable() => true;
const BitNotOperation();
Constant fold(Constant constant) {
if (constant.isInt()) {
@@ -17,12 +16,10 @@ class BitNotOperation implements UnaryOperation {
}
return null;
}
- apply(value) => ~value;
}
class NegateOperation implements UnaryOperation {
final String name = 'negate';
- bool isUserDefinable() => true;
const NegateOperation();
Constant fold(Constant constant) {
if (constant.isInt()) {
@@ -35,12 +32,10 @@ class NegateOperation implements UnaryOperation {
}
return null;
}
- apply(value) => -value;
}
class NotOperation implements UnaryOperation {
final String name = '!';
- bool isUserDefinable() => true;
const NotOperation();
Constant fold(Constant constant) {
if (constant.isBool()) {
@@ -49,14 +44,12 @@ class NotOperation implements UnaryOperation {
}
return null;
}
- apply(value) => !value;
}
/**
* Operations that only work if both arguments are integers.
*/
abstract class BinaryBitOperation implements BinaryOperation {
- bool isUserDefinable() => true;
const BinaryBitOperation();
Constant fold(Constant left, Constant right) {
if (left.isInt() && right.isInt()) {
@@ -116,7 +109,6 @@ class ShiftRightOperation extends BinaryBitOperation {
}
abstract class BinaryBoolOperation implements BinaryOperation {
- bool isUserDefinable() => false;
const BinaryBoolOperation();
Constant fold(Constant left, Constant right) {
if (left.isBool() && right.isBool()) {
@@ -146,7 +138,6 @@ class BooleanOrOperation extends BinaryBoolOperation {
}
abstract class ArithmeticNumOperation implements BinaryOperation {
- bool isUserDefinable() => true;
const ArithmeticNumOperation();
Constant fold(Constant left, Constant right) {
if (left.isNum() && right.isNum()) {
@@ -228,7 +219,6 @@ class DivideOperation extends ArithmeticNumOperation {
class AddOperation implements BinaryOperation {
final String name = '+';
- bool isUserDefinable() => true;
const AddOperation();
Constant fold(Constant left, Constant right) {
if (left.isInt() && right.isInt()) {
@@ -249,7 +239,6 @@ class AddOperation implements BinaryOperation {
}
abstract class RelationalNumOperation implements BinaryOperation {
- bool isUserDefinable() => true;
const RelationalNumOperation();
Constant fold(Constant left, Constant right) {
if (left.isNum() && right.isNum()) {
@@ -294,7 +283,6 @@ class GreaterEqualOperation extends RelationalNumOperation {
class EqualsOperation implements BinaryOperation {
final String name = '==';
- bool isUserDefinable() => true;
const EqualsOperation();
Constant fold(Constant left, Constant right) {
if (left.isNum() && right.isNum()) {
@@ -317,7 +305,6 @@ class EqualsOperation implements BinaryOperation {
class IdentityOperation implements BinaryOperation {
final String name = '===';
- bool isUserDefinable() => false;
const IdentityOperation();
BoolConstant fold(Constant left, Constant right) {
// In order to preserve runtime semantics which says that NaN !== NaN don't

Powered by Google App Engine
This is Rietveld 408576698