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

Unified Diff: src/objects.h

Issue 1194023004: Let AddDictionaryElement / AddFastElement purely add, move transition heuristics to AddDataElement (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test 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 | « no previous file | 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 a5277c11f5eb0c3ba88191cb85282cf487f7d15c..fcc8fe9c7d6e0fce4d94f8ea2f81358cd45cf723 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1899,9 +1899,6 @@ class JSObject: public JSReceiver {
static void SetNormalizedProperty(Handle<JSObject> object, Handle<Name> name,
Handle<Object> value,
PropertyDetails details);
- static void AddDictionaryElement(Handle<JSObject> object, uint32_t index,
- Handle<Object> value,
- PropertyAttributes attributes);
static void SetDictionaryElement(Handle<JSObject> object, uint32_t index,
Handle<Object> value,
PropertyAttributes attributes);
@@ -2011,12 +2008,6 @@ class JSObject: public JSReceiver {
// an access at key?
bool WouldConvertToSlowElements(uint32_t index);
inline bool WouldConvertToSlowElements(Handle<Object> key);
- // 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.
static uint32_t NewElementsCapacity(uint32_t old_capacity) {
@@ -2285,6 +2276,9 @@ class JSObject: public JSReceiver {
Handle<JSObject> object, const char* type, Handle<Name> name,
Handle<Object> old_value);
+ // Gets the current elements capacity and the number of used elements.
+ void GetElementsCapacityAndUsage(int* capacity, int* used);
+
private:
friend class DictionaryElementsAccessor;
friend class JSReceiver;
@@ -2319,12 +2313,6 @@ class JSObject: public JSReceiver {
ElementsKind kind,
Object* object);
- // Returns true if most of the elements backing storage is used.
- bool HasDenseElements();
-
- // Gets the current elements capacity and the number of used elements.
- void GetElementsCapacityAndUsage(int* capacity, int* used);
-
static bool CanSetCallback(Handle<JSObject> object, Handle<Name> name);
static void SetElementCallback(Handle<JSObject> object,
uint32_t index,
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698