| Index: lib/compiler/implementation/elements/elements.dart
|
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
|
| index 6ecc0848ff4121fed3d06d52c5e05d18925784c2..791a7e5dcc576e1580dc3d717db1bf437aa5c264 100644
|
| --- a/lib/compiler/implementation/elements/elements.dart
|
| +++ b/lib/compiler/implementation/elements/elements.dart
|
| @@ -1655,6 +1655,25 @@ class Elements {
|
| return new SourceString('operator\$$str');
|
| }
|
|
|
| + static SourceString mapToUserOperator(SourceString op) {
|
| + String value = op.stringValue;
|
| +
|
| + if (value === '!=') return const SourceString('==');
|
| + if (value === '*=') return const SourceString('*');
|
| + if (value === '/=') return const SourceString('/');
|
| + if (value === '%=') return const SourceString('%');
|
| + if (value === '~/=') return const SourceString('~/');
|
| + if (value === '+=') return const SourceString('+');
|
| + if (value === '-=') return const SourceString('-');
|
| + if (value === '<<=') return const SourceString('<<');
|
| + if (value === '>>=') return const SourceString('>>');
|
| + if (value === '&=') return const SourceString('&');
|
| + if (value === '^=') return const SourceString('^');
|
| + if (value === '|=') return const SourceString('|');
|
| +
|
| + throw 'Unhandled operator: ${op.slowToString()}';
|
| + }
|
| +
|
| static bool isNumberOrStringSupertype(Element element, Compiler compiler) {
|
| LibraryElement coreLibrary = compiler.coreLibrary;
|
| return (element == coreLibrary.find(const SourceString('Comparable')))
|
|
|