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

Unified Diff: src/runtime/runtime-array.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/regexp/jsregexp.cc ('k') | src/runtime/runtime-collections.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-array.cc
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
index f790f617d7a96bf5c0b7e9d4e1b810bb4cd53ccc..cbde8f372e872dcdb5053e24b6f87258d44a68ed 100644
--- a/src/runtime/runtime-array.cc
+++ b/src/runtime/runtime-array.cc
@@ -28,7 +28,7 @@ RUNTIME_FUNCTION(Runtime_FinishArrayPrototypeSetup) {
// This is necessary to enable fast checks for absence of elements
// on Array.prototype and below.
prototype->set_elements(isolate->heap()->empty_fixed_array());
- return Smi::kZero;
+ return Smi::FromInt(0);
}
static void InstallCode(Isolate* isolate, Handle<JSObject> holder,
@@ -140,7 +140,7 @@ RUNTIME_FUNCTION(Runtime_MoveArrayContents) {
to->set_length(from->length());
JSObject::ResetElements(from);
- from->set_length(Smi::kZero);
+ from->set_length(Smi::FromInt(0));
JSObject::ValidateElements(to);
return *to;
@@ -376,7 +376,7 @@ RUNTIME_FUNCTION(Runtime_GrowArrayElements) {
if (index >= capacity) {
if (!object->GetElementsAccessor()->GrowCapacity(object, index)) {
- return Smi::kZero;
+ return Smi::FromInt(0);
}
}
« no previous file with comments | « src/regexp/jsregexp.cc ('k') | src/runtime/runtime-collections.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698