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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 11419118: Change === to identical in the dart2js source. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index e322c4ee1e1e5d5e7b3025e522c0975c218f8c78..9df0ec1231e9d7213cd9b2dc110123f2289bcd6d 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -1136,7 +1136,7 @@ class FunctionElement extends Element {
* changed by the resolver to point to the redirection target. If
* this is an interface constructor, [defaultImplementation] will be
* changed by the resolver to point to the default implementation.
- * Otherwise, [:defaultImplementation === this:].
+ * Otherwise, [:identical(defaultImplementation, this):].
*/
// TODO(ahe): Rename this field to redirectionTarget and remove
// mention of interface constructors above.
@@ -1868,27 +1868,27 @@ class Elements {
static SourceString constructOperatorName(SourceString op, bool isUnary) {
String value = op.stringValue;
- if ((value === '==') ||
- (value === '~') ||
- (value === '[]') ||
- (value === '[]=') ||
- (value === '*') ||
- (value === '/') ||
- (value === '%') ||
- (value === '~/') ||
- (value === '+') ||
- (value === '<<') ||
- (value === '>>>') ||
- (value === '>>') ||
- (value === '>=') ||
- (value === '>') ||
- (value === '<=') ||
- (value === '<') ||
- (value === '&') ||
- (value === '^') ||
- (value === '|')) {
+ if ((identical(value, '==')) ||
+ (identical(value, '~')) ||
+ (identical(value, '[]')) ||
+ (identical(value, '[]=')) ||
+ (identical(value, '*')) ||
+ (identical(value, '/')) ||
+ (identical(value, '%')) ||
+ (identical(value, '~/')) ||
+ (identical(value, '+')) ||
+ (identical(value, '<<')) ||
+ (identical(value, '>>>')) ||
+ (identical(value, '>>')) ||
+ (identical(value, '>=')) ||
+ (identical(value, '>')) ||
+ (identical(value, '<=')) ||
+ (identical(value, '<')) ||
+ (identical(value, '&')) ||
+ (identical(value, '^')) ||
+ (identical(value, '|'))) {
return op;
- } else if (value === '-') {
+ } else if (identical(value, '-')) {
return isUnary ? const SourceString('unary-') : op;
} else {
throw 'Unhandled operator: ${op.slowToString()}';
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/constants.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698