Reviewers: Jakob,

Message:
PTAL

Description:
Always assume SetOwnPropertyIgnoreAttributes to be CERTAINLY_NOT_FROM_KEYED

BUG=

Please review this at https://codereview.chromium.org/463963002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+12, -21 lines):
  M src/objects.h
  M src/objects.cc
  M src/runtime.h
  M src/runtime.cc


Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 5399c8ed1b2862e099b24bf4569d56870fb9ffb6..0f8efcd38b1d68f1037baefd7b4250ae605f5d76 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3894,7 +3894,6 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
     Handle<Name> name,
     Handle<Object> value,
     PropertyAttributes attributes,
-    StoreFromKeyed store_from_keyed,
     ExecutableAccessorInfoHandling handling) {
   DCHECK(!value->IsTheHole());
   LookupIterator it(object, name, LookupIterator::CHECK_HIDDEN_ACCESS);
@@ -4012,7 +4011,8 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
     }
   }

-  return AddDataProperty(&it, value, attributes, STRICT, store_from_keyed);
+  return AddDataProperty(&it, value, attributes, STRICT,
+                         CERTAINLY_NOT_STORE_FROM_KEYED);
 }


Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 169654411e90098716a5b8ccfb7dfcc8df2550d5..ae3e634641bdb282b1c47851667af37e7ed1fadc 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2151,7 +2151,6 @@ class JSObject: public JSReceiver {
       Handle<Name> key,
       Handle<Object> value,
       PropertyAttributes attributes,
-      StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED,
       ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);

   static void AddProperty(Handle<JSObject> object, Handle<Name> key,
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 0492ac4a8a53145f73a3ad3382661770a2a60109..4a753650cbd1ba3369047b2badb4f7f777ce429d 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5042,16 +5042,14 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyUnchecked) {
         isolate, result,
         JSObject::SetOwnPropertyIgnoreAttributes(
             js_object, name, obj_value, attr,
- JSReceiver::MAY_BE_STORE_FROM_KEYED, JSObject::DONT_FORCE_FIELD));
+            JSObject::DONT_FORCE_FIELD));
     return *result;
   }

   Handle<Object> result;
   ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
       isolate, result,
-      Runtime::DefineObjectProperty(
-          js_object, name, obj_value, attr,
-          JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED));
+      Runtime::DefineObjectProperty(js_object, name, obj_value, attr));
   return *result;
 }

@@ -5163,12 +5161,10 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
 }


-MaybeHandle<Object> Runtime::DefineObjectProperty(
-    Handle<JSObject> js_object,
-    Handle<Object> key,
-    Handle<Object> value,
-    PropertyAttributes attr,
-    JSReceiver::StoreFromKeyed store_from_keyed) {
+MaybeHandle<Object> Runtime::DefineObjectProperty(Handle<JSObject> js_object,
+                                                  Handle<Object> key,
+                                                  Handle<Object> value,
+ PropertyAttributes attr) {
   Isolate* isolate = js_object->GetIsolate();
   // Check if the given key is an array index.
   uint32_t index;
@@ -5196,7 +5192,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
     } else {
if (name->IsString()) name = String::Flatten(Handle<String>::cast(name)); return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value, - attr, store_from_keyed);
+                                                      attr);
     }
   }

@@ -5211,7 +5207,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
                                 SLOPPY, false, DEFINE_PROPERTY);
   } else {
     return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
- attr, store_from_keyed);
+                                                    attr);
   }
 }

Index: src/runtime.h
diff --git a/src/runtime.h b/src/runtime.h
index 4a78edb897d45036a9618182802299d79469ca5c..745919a061a8645d245f2bda1a2339117713de0a 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -827,12 +827,8 @@ class Runtime : public AllStatic {
       Handle<Object> value, StrictMode strict_mode);

   MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty(
-      Handle<JSObject> object,
-      Handle<Object> key,
-      Handle<Object> value,
-      PropertyAttributes attr,
-      JSReceiver::StoreFromKeyed store_from_keyed =
-          JSReceiver::MAY_BE_STORE_FROM_KEYED);
+      Handle<JSObject> object, Handle<Object> key, Handle<Object> value,
+      PropertyAttributes attr);

   MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty(
       Isolate* isolate,


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to