Reviewers: Hannes Payer,

Description:
Deprecate obsolete JSFunction::unchecked_shared accessor.

[email protected]
BUG=v8:1490

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

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

Affected files:
  M src/mark-compact.cc
  M src/objects-inl.h
  M src/objects-visiting-inl.h
  M src/objects.h


Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index dc2db4b096b76ddb7c36532a51be7106c9b6838b..3fdb2a0c6372661fc36759542a4ceb2553506e72 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -2418,7 +2418,7 @@ void MarkCompactCollector::ClearNonLiveReferences() {
       // This map is used for inobject slack tracking and has been detached
       // from SharedFunctionInfo during the mark phase.
       // Since it survived the GC, reattach it now.
- map->unchecked_constructor()->unchecked_shared()->AttachInitialMap(map);
+      map->unchecked_constructor()->shared()->AttachInitialMap(map);
     }

     ClearNonLivePrototypeTransitions(map);
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e60f0f36f1890f6819bcafa50f3ca7a6bff887ab..a27dd225664ce00701dff199b080acab08149ae6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4960,12 +4960,6 @@ Object* JSFunction::unchecked_context() {
 }


-SharedFunctionInfo* JSFunction::unchecked_shared() {
-  return reinterpret_cast<SharedFunctionInfo*>(
-      READ_FIELD(this, kSharedFunctionInfoOffset));
-}
-
-
 void JSFunction::set_context(Object* value) {
   ASSERT(value->IsUndefined() || value->IsContext());
   WRITE_FIELD(this, kContextOffset, value);
Index: src/objects-visiting-inl.h
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
index 829eab809ffce26eefab95c94621a767711a6acc..3347cffffb9274de3613eaede73a5ce83c6b9e35 100644
--- a/src/objects-visiting-inl.h
+++ b/src/objects-visiting-inl.h
@@ -414,7 +414,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(
       // Visit shared function info immediately to avoid double checking
       // of its flushability later. This is just an optimization because
       // the shared function info would eventually be visited.
-      SharedFunctionInfo* shared = function->unchecked_shared();
+      SharedFunctionInfo* shared = function->shared();
       if (StaticVisitor::MarkObjectWithoutPush(heap, shared)) {
         StaticVisitor::MarkObject(heap, shared->map());
         VisitSharedFunctionInfoWeakCode(heap, shared);
@@ -595,7 +595,7 @@ inline static bool HasSourceCode(Heap* heap, SharedFunctionInfo* info) {
 template<typename StaticVisitor>
 bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
     Heap* heap, JSFunction* function) {
-  SharedFunctionInfo* shared_info = function->unchecked_shared();
+  SharedFunctionInfo* shared_info = function->shared();

   // Code is either on stack, in compilation cache or referenced
   // by optimized version of function.
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 1ee31b6dee9c58f8a9c41b36c6210577ebf75bca..b7df34adccabddf9f84e45245addedfbc85c297f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6565,8 +6565,6 @@ class JSFunction: public JSObject {
   // can be shared by instances.
   DECL_ACCESSORS(shared, SharedFunctionInfo)

-  inline SharedFunctionInfo* unchecked_shared();
-
   // [context]: The context for this function.
   inline Context* context();
   inline Object* unchecked_context();


--
--
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/groups/opt_out.


Reply via email to