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

Unified Diff: src/runtime/runtime-strings.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 months 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 | « src/runtime/runtime-regexp.cc ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-strings.cc
diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc
index aea9a89a258610e91528965858e2db9f61b6fa27..393e18fbf0bc2694dfde76f0b33c2ba63a45c963 100644
--- a/src/runtime/runtime-strings.cc
+++ b/src/runtime/runtime-strings.cc
@@ -256,7 +256,7 @@ RUNTIME_FUNCTION(Runtime_StringCompare) {
break;
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
@@ -573,13 +573,13 @@ static int CopyCachedOneByteCharsToArray(Heap* heap, const uint8_t* chars,
elements->set(i, value, mode);
}
if (i < length) {
- DCHECK(Smi::kZero == 0);
+ DCHECK(Smi::FromInt(0) == 0);
memset(elements->data_start() + i, 0, kPointerSize * (length - i));
}
#ifdef DEBUG
for (int j = 0; j < length; ++j) {
Object* element = elements->get(j);
- DCHECK(element == Smi::kZero ||
+ DCHECK(element == Smi::FromInt(0) ||
(element->IsString() && String::cast(element)->LooksValid()));
}
#endif
@@ -942,7 +942,7 @@ RUNTIME_FUNCTION(Runtime_StringLessThan) {
break;
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
RUNTIME_FUNCTION(Runtime_StringLessThanOrEqual) {
@@ -960,7 +960,7 @@ RUNTIME_FUNCTION(Runtime_StringLessThanOrEqual) {
break;
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
RUNTIME_FUNCTION(Runtime_StringGreaterThan) {
@@ -978,7 +978,7 @@ RUNTIME_FUNCTION(Runtime_StringGreaterThan) {
break;
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
RUNTIME_FUNCTION(Runtime_StringGreaterThanOrEqual) {
@@ -996,7 +996,7 @@ RUNTIME_FUNCTION(Runtime_StringGreaterThanOrEqual) {
break;
}
UNREACHABLE();
- return Smi::kZero;
+ return Smi::FromInt(0);
}
RUNTIME_FUNCTION(Runtime_StringEqual) {
« no previous file with comments | « src/runtime/runtime-regexp.cc ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698