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

Unified Diff: src/elements.cc

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE 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/deoptimizer.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index fb73d6c24c836d5d3098ec545f1a78056d578578..83733cb835d3883fd3617e25f0655cc6ebad2e65 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1970,7 +1970,7 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> {
if (new_length == 0) {
receiver->set_elements(heap->empty_fixed_array());
- receiver->set_length(Smi::FromInt(0));
+ receiver->set_length(Smi::kZero);
return isolate->factory()->NewJSArrayWithElements(
backing_store, KindTraits::Kind, delete_count);
}
« no previous file with comments | « src/deoptimizer.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698