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

Unified Diff: src/objects.h

Issue 1196163005: Cleanup adding elements and in particular dictionary elements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 083bce8b54aac80d26aade82102e255cf61ea6a1..6ac1374b1e8e2f585ba67443b76981279a65e176 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2015,14 +2015,11 @@ class JSObject: public JSReceiver {
// an access at key?
bool WouldConvertToSlowElements(uint32_t index);
inline bool WouldConvertToSlowElements(Handle<Object> key);
- // Do we want to keep the elements in fast case when increasing the
- // capacity?
- bool ShouldConvertToSlowElements(int new_capacity);
- // Returns true if the backing storage for the slow-case elements of
- // this object takes up nearly as much space as a fast-case backing
- // storage would. In that case the JSObject should have fast
- // elements.
- bool ShouldConvertToFastElements();
+ // Do we want to keep fast elements when adding an element at |index|?
+ // Returns |new_capacity| indicating to which capacity the object should be
+ // increased.
+ bool ShouldConvertToSlowElements(uint32_t capacity, uint32_t index,
+ uint32_t* new_capacity);
ElementsKind BestFittingFastElementsKind();
// Computes the new capacity when expanding the elements of a JSObject.
@@ -10140,10 +10137,6 @@ class JSArray: public JSObject {
// is set to a smi. This matches the set function on FixedArray.
inline void set_length(Smi* length);
- static void JSArrayUpdateLengthFromIndex(Handle<JSArray> array,
- uint32_t index,
- Handle<Object> value);
-
static bool HasReadOnlyLength(Handle<JSArray> array);
static bool WouldChangeReadOnlyLength(Handle<JSArray> array, uint32_t index);
static MaybeHandle<Object> ReadOnlyLengthError(Handle<JSArray> array);
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698