From 37b7dde54de1d2130f070aa5faedb737c4655c4b Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Tue, 21 Oct 2014 11:21:54 +0000 Subject: [PATCH] Remove unused IsDirty 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 | 9 --------- src/api.cc | 5 ----- src/objects.cc | 15 --------------- src/objects.h | 4 ---- 4 files changed, 33 deletions(-) diff --git a/include/v8.h b/include/v8.h index 750adf8..74d0354 100644 --- a/include/v8.h +++ b/include/v8.h @@ -2507,15 +2507,6 @@ class V8_EXPORT Object : public Value { bool DeleteHiddenValue(Handle 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. */ diff --git a/src/api.cc b/src/api.cc index ae6ab1a..b6c7176 100644 --- a/src/api.cc +++ b/src/api.cc @@ -3774,11 +3774,6 @@ void v8::Object::TurnOnAccessCheck() { } -bool v8::Object::IsDirty() { - return Utils::OpenHandle(this)->IsDirty(); -} - - Local v8::Object::Clone() { i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); ON_BAILOUT(isolate, "v8::Object::Clone()", return Local()); diff --git a/src/objects.cc b/src/objects.cc index 811ad74..47a61f6 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -731,21 +731,6 @@ Handle JSObject::DeleteNormalizedProperty(Handle 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::GetElementWithReceiver(Isolate* isolate, Handle object, Handle receiver, diff --git a/src/objects.h b/src/objects.h index ee03112..0dc5e3a 100644 --- a/src/objects.h +++ b/src/objects.h @@ -1853,10 +1853,6 @@ class JSObject: public JSReceiver { Handle receiver, Handle 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. -- 2.7.4