From 643350c5d27488cd18478e734906a060f3236a8d Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Wed, 12 Jun 2013 14:05:56 +0000 Subject: [PATCH] Deprecate obsolete JSFunction::unchecked_shared accessor. R=hpayer@chromium.org BUG=v8:1490 Review URL: https://codereview.chromium.org/16813005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mark-compact.cc | 2 +- src/objects-inl.h | 6 ------ src/objects-visiting-inl.h | 4 ++-- src/objects.h | 2 -- 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/mark-compact.cc b/src/mark-compact.cc index a48d6ea04..0a7d92bde 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); diff --git a/src/objects-inl.h b/src/objects-inl.h index 581935f9d..52a4bd106 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -4969,12 +4969,6 @@ Object* JSFunction::unchecked_context() { } -SharedFunctionInfo* JSFunction::unchecked_shared() { - return reinterpret_cast( - READ_FIELD(this, kSharedFunctionInfoOffset)); -} - - void JSFunction::set_context(Object* value) { ASSERT(value->IsUndefined() || value->IsContext()); WRITE_FIELD(this, kContextOffset, value); diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h index 829eab809..3347cffff 100644 --- a/src/objects-visiting-inl.h +++ b/src/objects-visiting-inl.h @@ -414,7 +414,7 @@ void StaticMarkingVisitor::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 bool StaticMarkingVisitor::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. diff --git a/src/objects.h b/src/objects.h index f483a27c3..fadd3cd84 100644 --- a/src/objects.h +++ b/src/objects.h @@ -6581,8 +6581,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(); -- 2.34.1