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

Unified Diff: runtime/lib/string_base.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
« no previous file with comments | « runtime/lib/regexp_patch.dart ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_base.dart
diff --git a/runtime/lib/string_base.dart b/runtime/lib/string_base.dart
index c0f9063a82e20b797288e4d8cfc0cb5204a81f53..22e17b9662c0098a0a15de1770e430b36c459db3 100644
--- a/runtime/lib/string_base.dart
+++ b/runtime/lib/string_base.dart
@@ -43,7 +43,7 @@ class _StringBase {
int get length native "String_getLength";
bool get isEmpty {
- return this.length === 0;
+ return this.length == 0;
}
String concat(String other) native "String_concat";
@@ -61,7 +61,7 @@ class _StringBase {
// TODO(5413632): Compare hash codes when both are present.
return false;
}
- return this.compareTo(other) === 0;
+ return this.compareTo(other) == 0;
}
int compareTo(String other) {
@@ -141,7 +141,7 @@ class _StringBase {
}
String substring(int startIndex, [int endIndex]) {
- if (endIndex === null) endIndex = this.length;
+ if (endIndex == null) endIndex = this.length;
if ((startIndex < 0) || (startIndex > this.length)) {
throw new RangeError.value(startIndex);
@@ -318,7 +318,7 @@ class _StringBase {
// Implementations of Strings methods follow below.
static String join(List<String> strings, String separator) {
final int length = strings.length;
- if (length === 0) {
+ if (length == 0) {
return "";
}
@@ -365,7 +365,7 @@ class _OneByteString extends _StringBase implements String {
// whitespaces for one byte strings.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
@@ -383,7 +383,7 @@ class _TwoByteString extends _StringBase implements String {
// whitespaces. Add checking for multi-byte whitespace codepoints.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
}
@@ -400,7 +400,7 @@ class _FourByteString extends _StringBase implements String {
// whitespaces. Add checking for multi-byte whitespace codepoints.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
}
@@ -417,7 +417,7 @@ class _ExternalOneByteString extends _StringBase implements String {
// whitespaces for one byte strings.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
}
@@ -434,7 +434,7 @@ class _ExternalTwoByteString extends _StringBase implements String {
// whitespaces. Add checking for multi-byte whitespace codepoints.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
}
@@ -451,7 +451,7 @@ class _ExternalFourByteString extends _StringBase implements String {
// whitespaces. Add checking for multi-byte whitespace codepoints.
bool _isWhitespace(int codePoint) {
return
- (codePoint === 32) || // Space.
+ (codePoint == 32) || // Space.
((9 <= codePoint) && (codePoint <= 13)); // CR, LF, TAB, etc.
}
}
« no previous file with comments | « runtime/lib/regexp_patch.dart ('k') | runtime/tests/vm/dart/isolate_mirror_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698