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

Unified Diff: src/objects.h

Issue 2127583002: [runtime] Better encapsulation of dictionary objects handling in lookup iterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes Created 4 years, 5 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/lookup.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 5dc18607b2b9431a96dd50693f00d35837a27af3..4c3e47db97894811792337eb0eba7f3976f1e84f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2479,12 +2479,6 @@ class JSObject: public JSReceiver {
MUST_USE_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck(
LookupIterator* it, Handle<Object> value, ShouldThrow should_throw);
- // Add a property to a slow-case object.
- static void AddSlowProperty(Handle<JSObject> object,
- Handle<Name> name,
- Handle<Object> value,
- PropertyAttributes attributes);
-
MUST_USE_RESULT static Maybe<bool> DeletePropertyWithInterceptor(
LookupIterator* it, ShouldThrow should_throw);
@@ -3514,11 +3508,10 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
Handle<Object> value,
PropertyDetails details);
- MUST_USE_RESULT static Handle<Derived> Add(
- Handle<Derived> dictionary,
- Key key,
- Handle<Object> value,
- PropertyDetails details);
+ MUST_USE_RESULT static Handle<Derived> Add(Handle<Derived> dictionary,
+ Key key, Handle<Object> value,
+ PropertyDetails details,
+ int* entry_out = nullptr);
// Returns iteration indices array for the |dictionary|.
// Values are direct indices in the |HashTable| array.
@@ -3532,13 +3525,9 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
Key key,
Handle<Object> value);
- // Add entry to dictionary.
- static void AddEntry(
- Handle<Derived> dictionary,
- Key key,
- Handle<Object> value,
- PropertyDetails details,
- uint32_t hash);
+ // Add entry to dictionary. Returns entry value.
+ static int AddEntry(Handle<Derived> dictionary, Key key, Handle<Object> value,
+ PropertyDetails details, uint32_t hash);
// Generate new enumeration indices to avoid enumeration index overflow.
// Returns iteration indices array for the |dictionary|.
@@ -7829,8 +7818,9 @@ class JSGlobalObject : public JSObject {
static void InvalidatePropertyCell(Handle<JSGlobalObject> object,
Handle<Name> name);
// Ensure that the global object has a cell for the given property name.
- static Handle<PropertyCell> EnsurePropertyCell(Handle<JSGlobalObject> global,
- Handle<Name> name);
+ static Handle<PropertyCell> EnsureEmptyPropertyCell(
+ Handle<JSGlobalObject> global, Handle<Name> name,
+ PropertyCellType cell_type, int* entry_out = nullptr);
DECLARE_CAST(JSGlobalObject)
@@ -9680,8 +9670,12 @@ class PropertyCell : public HeapObject {
static PropertyCellType UpdatedType(Handle<PropertyCell> cell,
Handle<Object> value,
PropertyDetails details);
- static void UpdateCell(Handle<GlobalDictionary> dictionary, int entry,
- Handle<Object> value, PropertyDetails details);
+ // Prepares property cell at given entry for receiving given value.
+ // As a result the old cell could be invalidated and/or dependent code could
+ // be deoptimized. Returns the prepared property cell.
+ static Handle<PropertyCell> PrepareForValue(
+ Handle<GlobalDictionary> dictionary, int entry, Handle<Object> value,
+ PropertyDetails details);
static Handle<PropertyCell> InvalidateEntry(
Handle<GlobalDictionary> dictionary, int entry);
« no previous file with comments | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698