| Index: sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart b/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
|
| index d800d6dd30f8e3dbe4407afa5984dbd2b3c672e1..624d967e47ee75dd93ba0217fce0ef113471d04a 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/constant_system_dart.dart
|
| @@ -318,35 +318,6 @@ class IdentityOperation implements BinaryOperation {
|
| apply(left, right) => identical(left, right);
|
| }
|
|
|
| -abstract class CodeUnitAtOperation implements BinaryOperation {
|
| - final String name = 'charCodeAt';
|
| - const CodeUnitAtOperation();
|
| - apply(left, right) => left.codeUnitAt(right);
|
| -}
|
| -
|
| -class CodeUnitAtConstantOperation extends CodeUnitAtOperation {
|
| - const CodeUnitAtConstantOperation();
|
| - ConstantValue fold(ConstantValue left, ConstantValue right) {
|
| - // 'a'.codeUnitAt(0) is not a constant expression.
|
| - return null;
|
| - }
|
| -}
|
| -
|
| -class CodeUnitAtRuntimeOperation extends CodeUnitAtOperation {
|
| - const CodeUnitAtRuntimeOperation();
|
| - IntConstantValue fold(ConstantValue left, ConstantValue right) {
|
| - if (left.isString && right.isInt) {
|
| - DartString dartString = left.primitiveValue;
|
| - int index = right.primitiveValue;
|
| - if (index < 0 || index >= dartString.length) return null;
|
| - String string = dartString.slowToString();
|
| - int value = string.codeUnitAt(index);
|
| - return DART_CONSTANT_SYSTEM.createInt(value);
|
| - }
|
| - return null;
|
| - }
|
| -}
|
| -
|
| /**
|
| * A constant system implementing the Dart semantics. This system relies on
|
| * the underlying runtime-system. That is, if dart2js is run in an environment
|
| @@ -376,7 +347,6 @@ class DartConstantSystem extends ConstantSystem {
|
| final shiftRight = const ShiftRightOperation();
|
| final subtract = const SubtractOperation();
|
| final truncatingDivide = const TruncatingDivideOperation();
|
| - final codeUnitAt = const CodeUnitAtConstantOperation();
|
|
|
| const DartConstantSystem();
|
|
|
|
|