]> sourceware.org Git - libabigail.git/commit
Make decl_base::get_context_rel() return a naked pointer
authorDodji Seketeli <dodji@redhat.com>
Tue, 10 Mar 2015 10:45:46 +0000 (11:45 +0100)
committerDodji Seketeli <dodji@redhat.com>
Tue, 10 Mar 2015 15:02:37 +0000 (16:02 +0100)
commitffeb36eeda9ce6546843ed7c129e4527bc19d30a
tree70b7210b5db38ee3d41d120b8d8e868f82a2a749
parentd79e9803f49a410d5813c9642aee76ba326984fa
Make decl_base::get_context_rel() return a naked pointer

Accessing the context relationship of declarations and setting some
member properties appear to be high in performance profiles due to
shared pointer handling.  This patch makes the context relationship
accessors return a naked pointer and also passes a bunch of shared
pointer as references around.

* include/abg-fwd.h (set_member_is_static): Add an overload that
takes the member as a reference to a smart pointer.
(set_member_function_{is_dtor, is_ctor, is_const, vtable_offset,
is_virtual}): Pass the member function as a reference.
(set_member_function_is_const, set_member_function_is_virtual):
Pass the member function as a non-const reference.
* include/abg-ir.h (decl_base::get_context_rel): Return a naked
pointer.
(set_member_is_static, set_member_function_is_virtual): Adjust
this friend declaration.
(set_member_access_specifier): Add an overload that takes a
reference to the member.  Pass a reference to smart pointer to the
other overload.
(set_member_function_is_{is_ctor,is_dtor,is_const,is_virtual,vtable_offset}):
Take a non-const reference to function_decl.
* src/abg-ir.cc (decl_base::get_context_rel): Likewise.
(equals(const decl_base&, const decl_base&, change_kind*)):
Adjust.
(equals(const var_decl&, const var_decl&, change_kind*)):
Likewise.
(get_member_access_specifier, get_member_is_static)
(set_data_member_offset, get_data_member_offset)
(set_data_member_is_laid_out, get_data_member_is_laid_out)
(get_member_function_is_ctor, set_member_function_is_ctor)
(get_member_function_is_dtor, set_member_function_is_dtor)
(get_member_function_is_const, set_member_function_is_const)
(get_member_function_vtable_offset)
(set_member_function_vtable_offset)
(get_member_function_is_virtual, set_member_function_is_virtual):
Likewise.
(set_member_access_specifier): Add an overload that takes a
reference to decl_base.
(set_member_is_static, set_member_function_{is_dtor, is_ctor,
is_const, vtable_offset, is_virtual}): Pass the member function as
a reference.): Add an overload that takes the member as a
reference, and write the older overload in terms of the new one.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-fwd.h
include/abg-ir.h
src/abg-ir.cc
This page took 0.038919 seconds and 5 git commands to generate.