| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.operators; | 5 library dart2js.operators; |
| 6 | 6 |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../universe/call_structure.dart' show CallStructure; | 8 import '../universe/call_structure.dart' show CallStructure; |
| 9 import '../universe/selector.dart' show Selector, SelectorKind; | 9 import '../universe/selector.dart' show Selector, SelectorKind; |
| 10 | 10 |
| 11 enum UnaryOperatorKind { NOT, NEGATE, COMPLEMENT, } | 11 enum UnaryOperatorKind { |
| 12 NOT, |
| 13 NEGATE, |
| 14 COMPLEMENT, |
| 15 } |
| 12 | 16 |
| 13 class UnaryOperator { | 17 class UnaryOperator { |
| 14 final UnaryOperatorKind kind; | 18 final UnaryOperatorKind kind; |
| 15 final String name; | 19 final String name; |
| 16 final String selectorName; | 20 final String selectorName; |
| 17 | 21 |
| 18 const UnaryOperator(this.kind, this.name, this.selectorName); | 22 const UnaryOperator(this.kind, this.name, this.selectorName); |
| 19 | 23 |
| 20 bool get isUserDefinable => selectorName != null; | 24 bool get isUserDefinable => selectorName != null; |
| 21 | 25 |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 | 498 |
| 495 static IncDecOperator fromKind(IncDecOperatorKind kind) { | 499 static IncDecOperator fromKind(IncDecOperatorKind kind) { |
| 496 switch (kind) { | 500 switch (kind) { |
| 497 case IncDecOperatorKind.INC: | 501 case IncDecOperatorKind.INC: |
| 498 return INC; | 502 return INC; |
| 499 case IncDecOperatorKind.DEC: | 503 case IncDecOperatorKind.DEC: |
| 500 return DEC; | 504 return DEC; |
| 501 } | 505 } |
| 502 } | 506 } |
| 503 } | 507 } |
| OLD | NEW |