Remove unused IsDirty
authorverwaest@chromium.org <verwaest@chromium.org>
Tue, 21 Oct 2014 11:21:54 +0000 (11:21 +0000)
committerverwaest@chromium.org <verwaest@chromium.org>
Tue, 21 Oct 2014 11:21:54 +0000 (11:21 +0000)
BUG=
R=dcarney@chromium.org

Review URL: https://codereview.chromium.org/670703002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

include/v8.h
src/api.cc
src/objects.cc
src/objects.h

index 750adf8..74d0354 100644 (file)
@@ -2507,15 +2507,6 @@ class V8_EXPORT Object : public Value {
   bool DeleteHiddenValue(Handle<String> key);
 
   /**
-   * Returns true if this is an instance of an api function (one
-   * created from a function created from a function template) and has
-   * been modified since it was created.  Note that this method is
-   * conservative and may return true for objects that haven't actually
-   * been modified.
-   */
-  bool IsDirty();
-
-  /**
    * Clone this object with a fast but shallow copy.  Values will point
    * to the same values as the original object.
    */
index ae6ab1a..b6c7176 100644 (file)
@@ -3774,11 +3774,6 @@ void v8::Object::TurnOnAccessCheck() {
 }
 
 
-bool v8::Object::IsDirty() {
-  return Utils::OpenHandle(this)->IsDirty();
-}
-
-
 Local<v8::Object> v8::Object::Clone() {
   i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
   ON_BAILOUT(isolate, "v8::Object::Clone()", return Local<Object>());
index 811ad74..47a61f6 100644 (file)
@@ -731,21 +731,6 @@ Handle<Object> JSObject::DeleteNormalizedProperty(Handle<JSObject> object,
 }
 
 
-bool JSObject::IsDirty() {
-  Object* cons_obj = map()->constructor();
-  if (!cons_obj->IsJSFunction())
-    return true;
-  JSFunction* fun = JSFunction::cast(cons_obj);
-  if (!fun->shared()->IsApiFunction())
-    return true;
-  // If the object is fully fast case and has the same map it was
-  // created with then no changes can have been made to it.
-  return map() != fun->initial_map()
-      || !HasFastObjectElements()
-      || !HasFastProperties();
-}
-
-
 MaybeHandle<Object> Object::GetElementWithReceiver(Isolate* isolate,
                                                    Handle<Object> object,
                                                    Handle<Object> receiver,
index ee03112..0dc5e3a 100644 (file)
@@ -1853,10 +1853,6 @@ class JSObject: public JSReceiver {
       Handle<Object> receiver,
       Handle<Name> name);
 
-  // Returns true if this is an instance of an api function and has
-  // been modified since it was created.  May give false positives.
-  bool IsDirty();
-
   // Accessors for hidden properties object.
   //
   // Hidden properties are not own properties of the object itself.