2014-09-09 10:52:07 +00:00
|
|
|
pkginclude_HEADERS = \
|
Add --drop/--keep options to bidiff
* include/abg-sptr-utils.h: New file.
* include/Makefile.am: Add abg-sptr-utils. to the build system.
* include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
these typedefs as there are now in abg-sptr-utils.
(build_sptr): Likewise for this template and its specializations
declarations.
* src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
definition of the specializations for xmlTextReader and xmlChar
into the sptr_utils namespace.
* include/abg-corpus.h
(corpus::{get_regex_patterns_of_fns_to_suppress,
get_regex_patterns_of_vars_to_suppress,
get_regex_patterns_of_fns_to_keep,
get_regex_patterns_of_vars_to_keep}): Declare new member
functions.
* src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
functor.
(build_sptr) Define new specialization for regex_t.
(struct array_deleter): Remove unused functor.
(corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
members.
(symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
Likewise.
(symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
Likewise.
(symtab_build_visitor_type::symtab_build_visitor_type): Update the
signature of this constructor to take regex patterns for functions
and variables to suppress and to keep. Also, initialize the data
members from these new parameters.
(symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
member functions.
(symtab_build_visitor_type::{add_fn_to_wip_fns,
add_var_to_wip_vars}): Likewise.
(symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
add_var_to_wip_vars depending on the overload of the visit()
member.
(corpus::priv::build_symbol_table): Update for the change of the
symtab_build_visitor_type constructor signature.
(corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
Define new member functions.
* tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
New data member.
(display_usage): Add help strings for --drop, --drop-fn,
--drop-var, --keep, --keep-fn, --keep-var
(parse_command_line): Parse the command lines above.
(set_corpus_keep_drop_regex_patterns): Define new static function.
(main): Use the new set_corpus_keep_drop_regex_patterns.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-02-28 16:26:18 +00:00
|
|
|
abg-sptr-utils.h \
|
Implement string interning for Libabigail
This patch implements string interning optimization. One can read
about the principles of this optimization at
https://en.wikipedia.org/wiki/String_interning.
The patch introduces an abigail::interned_string type, as well as an
abigail::interned_string_pool type. Each environment type owns a
string pool and strings are interned in that pool for all types and
decls of that environments. The interned_string has methods to
interact seemingly with std::string including a hashing function. Of
course hashing and comparing interned_string is faster than for
std::string.
To enable ABI artifacts to intern strings, each constructor of ABI
artifacts now takes the environment it's constructed in as parameter.
From the environment, it can thus use the interned string pool.
The patch then changes declaration names to be of type
interned_string, and performs the necessary adjustments. The hash
maps that hash strings coming from those declaration names are
adjusted to hash interned_string.
* include/Makefile.am: Add the new abg-interned-str.h file to
source distribution.
* include/abg-corpus.h (corpus::corpus): Re-arrange the order of
* src/abg-corpus.cc
(corpus::exported_decls_builder::priv::get_id): Return
interned_string rather than std::string.
(corpus::corpus): Re-arrange the order of parameters: take an
environment as first parameter. parameters: take an environment
as first parameter.
* include/abg-dwarf-reader.h (lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf): Likewise.
* src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
(lookup_symbol_from_gnu_hash_tab)
(lookup_symbol_from_elf_hash_tab, lookup_symbol_from_symtab)
(lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
(lookup_public_variable_symbol_from_elf, lookup_symbol_from_elf)
(lookup_public_function_symbol_from_elf): Take an environment as
first parameter and adjust.
(build_translation_unit_and_add_to_ir)
(build_namespace_decl_and_add_to_ir, build_type_decl)
(build_enum_type, finish_member_function_reading)
(build_class_type_and_add_to_ir, build_function_type)
(read_debug_info_into_corpus, read_corpus_from_elf): Adjust.
* include/abg-fwd.h: Include abg-interned-str.h
(get_type_name, get_function_type_name, get_method_type_name):
Return a interned_string, rather than a std::string.
* include/abg-interned-str.h: New declarations for interned strings
and their pool.
* include/abg-ir.h (environment::intern): Declare new method.
(elf_symbol::{g,s}et_environment): Likewise.
(type_or_decl_base::type_or_decl_base): Make the default
constructor private.
({translation, type_or_decl_base}::set_environment)
(set_environment_for_artifact): Take a const environment*.
(elf_symbol::elf_symbol)
(elf_symbol::create)
(type_or_decl_base::type_or_decl_base)
(translation::translation, decl_base::decl_base)
(scope_decl::scope_decl, type_base::type_base)
(type_decl::type_decl, scope_type_decl::scope_type_decl)
(namespace_decl::namespace_decl)
(enum_type_decl::enumerator::enumerator)
(function_type::function_type, method_type::method_type)
(template_decl::template_decl, function_tdecl::function_tdecl)
(class_tdecl::class_tdecl, class_decl::class_decl): Take an
environment.
(type_or_decl_base::operator=)
(enum_type_decl::enumerator::get_environment): Declare new method.
(decl_base::{peek_qualified_name, peek_temporary_qualified_name,
get_qualified_name, get_name, get_qualified_parent_name,
get_linkage_name}, qualified_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(enum_type_decl::enumerator::{get_name, get_qualified_name})
({var,function}_decl::get_id)
(function_decl::parameter::{get_type_name, get_name_id}): Return
an interned_string, rather than a std::string.
(decl_base::{set_qualified_name, set_temporary_qualified_name,
get_qualified_name, set_linkage_name})
(qualified_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(function_decl::parameter::get_qualified_name): Take an
interned_string, rather than a std::string.
(class_decl::member_{class,function}_template::member_{class,function}_template):
Adjust.
* src/abg-ir.cc (environment_setter::env_): Make this be a pointer
to const environment.
(environment_setter::visit_begin): Adjust.
(interned_string_pool::priv): Define new type.
(interned_string_pool::*): Define the method declared in
abg-interned-str. h.
(operator==, operator!=, operator+): Define operator for interned_string and
std::string
(operator<<): Define for interned_string.
(translation_unit::priv::env_): Make this be a pointer to const
environment.
(translation_unit::priv::priv): Take a pointer to const
environment.
(elf_symbol::priv::env_): New data member.
(elf_symbol::priv::priv): Adjust. Make an overoad take an
environment.
(translation_unit::{g,s}et_environment): Adjust.
(interned_string_bool_map_type): New typedef.
(environment::priv::classes_being_compared_): Make this hastable
of string be a hashtable of interned_string.
(environment::priv::string_pool_): New data member.
(environment::{get_void_type_decl,
get_variadic_parameter_type_decl}): Adjust.
(type_or_decl_base::priv::env_): Make this be a pointer to const
environment.
(type_or_decl::base::priv::priv): Adjust.
(type_or_decl_base::set_environment)
(set_environment_for_artifact): Take a pointer to const
environment.
(elf_symbol::{g,s}et_environment, environment::intern)
(type_or_decl_base::operator=): Define new methods.
(decl_base::priv::{name_, qualified_parent_name_,
temporary_qualified_name_, qualified_name_, linkage_name_}): Make
these data member be of tpe interned_string.
(decl_base::priv::priv): Make this take an environment. Adjust.
(decl_base::{peek_qualified_name, peek_temporary_qualified_name,
get_linkage_name, get_qualified_parent_name, get_name,
get_qualified_name}, get_type_name, get_function_type_name)
(get_method_type_name, get_node_name)
(qualified_type_def::get_qualified_name)
(pointer_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(enum_type_decl::enumerator::get_qualified_name)
(var_decl::get_id, function_decl::get_id)
(function_decl::parameter::get_{name_id, type_name}): Return an
interned_string.
(decl_base::{set_qualified_name, set_temporary_qualified_name})
(qualified_type_def::get_qualified_name)
(pointer_type_def::get_qualified_name)
(reference_type_def::get_qualified_name)
(array_type_def::get_qualified_name)
(function_decl::parameter::get_qualified_name): Take an
interned_string.
(decl_base::{set_name, set_linkage_name}): Intern the std::string
passed in parameter.
(equals): In the overload for decl_base, adjust for a little speed
optimization that is justified by profiling.
(pointer_type_def::priv::{internal_qualified_name_,
temp_internal_qualified_name_}): Make these data member be
interned_string.
(enum_type_decl::enumerator::priv::env_): New data member.
(enum_type_decl::enumerator::priv::{name_, qualified_name}): Make
these data member be of type interned_string.
(enum_type_decl::enumerator::get_environment): New method.
(enum_type_decl::enumerator::priv::priv) Adjust.
(typedef_decl::operator==): Implement a little speed optimization.
(var_decl::priv::nake_type_): New data member.
(var_decl::priv::id_): Make this data member be of type
interned_string.
(equals): In the overload for var_decl, function_type,
function_decl, adjust for the use of interned_string.
(function_decl::priv::id_): Make this be of type interned_string.
(scope_decl::{add_member_decl, insert_member_decl})
(lookup_function_type_in_translation_unit)
(synthesize_type_from_translation_unit, lookup_node_in_scope)
(lookup_type_in_scope, scope_decl::scope_decl)
(qualified_type_def::qualified_type_def)
(qualified_type_def::get_qualified_name)
(pointer_type_def::pointer_type_def)
(reference_type_def::reference_type_def)
(array_type_def::array_type_def, array_type_def::append_subrange)
(array_type_def::get_qualified_name)
(enum_type_decl::enum_type_decl)
(enum_type_decl::enumerator::get_qualified_name)
(enum_type_decl::enumerator::set_name)
(typedef_decl::typedef_decl, var_decl::var_decl)
(function_type::function_type, method_type::method_type)
(function_decl::function_decl)
(function_decl::parameter::parameter)
(class_decl::priv::comparison_started)
(class_decl::add_base_specifier)
(class_decl::base_spec::base_spec)
(class_decl::method_decl::method_decl)
(type_tparameter::type_tparameter)
(non_type_tparameter::non_type_tparameter)
(template_tparameter::template_tparameter)
(type_composition::type_composition)
(function_tdecl::function_tdecl, class_tdecl::class_tdecl)
(qualified_name_setter::do_update): Adjust.
(translation_unit::translation_unit, elf_symbol::elf_symbol)
(elf_symbol::create, type_or_decl_base::type_or_decl_base)
(decl_base::decl_base, type_base::type_base)
(type_decl::type_decl, scope_type_decl::scope_type_decl)
(namespace_decl::namespace_decl)
(enum_type_decl::enumerator::enumerator, class_decl::class_decl)
(template_decl::template_decl, function_tdecl::function_tdecl)
(class_tdecl::class_tdecl): Take an environment.
* src/abg-comparison.cc
(function_suppression::suppresses_function): Adjust.
* src/abg-reader.cc (read_translation_unit)
(read_corpus_from_input, build_namespace_decl, build_elf_symbol)
(build_function_parameter, build_function_decl, build_type_decl)
(build_function_type, build_enum_type_decl, build_enum_type_decl)
(build_class_decl, build_function_tdecl, build_class_tdecl)
(read_corpus_from_native_xml): Likewise.
* src/abg-writer.cc (id_manager::m_cur_id): Make this mutable.
(id_manager::m_env): New data member.
(id_manager::id_manager): Adjust.
(id_manager::get_environment): New method.
(id_manager::{get_id, get_id_with_prefix}): Return an
interned_string.
(type_ptr_map): Make this be a hash map of type_base* ->
interned_string, rather a type_base* -> string.
(write_context::m_env): New data member.
(write_context::m_type_id_map): Make this data member be mutable.
(write_context::m_emitted_type_id_map): Make this be a hash map of
interned_string -> bool, rather than string -> bool.
(write_context::write_context): Take an environment and adjust.
(write_context::get_environment): New method.
(write_context::get_id_manager): New const overload.
(write_context::get_id_for_type): Return an interned_string; adjust.
(write_context::{record_type_id_as_emitted,
record_type_as_referenced}): Adjust.
(write_context::type_id_is_emitted): Take an interned_string.
(write_context::{type_is_emitted,
record_decl_only_type_as_emitted}): Adjust.
(write_translation_unit, write_corpus_to_native_xml, dump):
Adjust.
* tools/abisym.cc (main): Adjust.
* tests/data/test-read-write/test22.xml: Adjust.
* tests/data/test-read-write/test23.xml: Adjust.
* tests/data/test-read-write/test26.xml: Adjust.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-24 06:44:29 +00:00
|
|
|
abg-interned-str.h \
|
2013-08-01 23:07:26 +00:00
|
|
|
abg-ir.h \
|
|
|
|
abg-corpus.h \
|
Prepare serialization API for multiple backends
* include/abg-reader.h: New file with abigail::xml_reader APIs.
* include/abg-writer.h: New file with abigail::xml_writer APIs.
* include/Makefile.am: Add the new files above to the source
distribution.
* src/abg-reader.cc: Update top-file comments.
(namespace xml_reader): Rename namespace
reader into this.
(read_to_translation_unit, read_corpus_from_archive): New static
functions.
(read_translation_unit_from_file)
(read_translation_unit_from_file, read_corpus_from_file): New
entry points.
(struct array_deleter): New functor.
(translation_unit::read): Remove this.
* src/abg-writer.cc: Update top file comments.
(namespace xml_writer): Rename namespace
writer into this.
(struct archive_write_ctxt): New internal type.
(create_archive_write_context, write_translation_unit_to_archive)
(write_translation_unit, write_corpus_to_archive): New low level
static functions overloads.
(write_corpus_to_archive, write_translation_unit): Public higher
level overloads.
(translation_unit::write): Remove.
(dump): Update for new xml_writer namespace.
* include/abg-ir.h (translation_unit::{read, write}): Remove these
serialization methods.
* include/abg-corpus.h (corpus_sptr): New convenience typedef.
(corpus::{read, write}): Remove these methods.
* src/abg-corpus.cc (corpus::{read, write})
(corpus::impl::{serialized_tus, archive}): Remove these members.
(corpus::impl::{get_archive, close_archive, write_tu_to_archive,
read_to_translation_unit}): Remove these methods.
* tests/test-bidiff.cc (main): Update for usage of the new
xml_reader API.
* tests/test-read-write.cc (main): Likewise. Update for the usage
of the new xml_writer API, too.
* tests/test-walker.cc (main): Update for the usage of the new
xml_reader API.
* tests/test-write-read-archive.cc (main): Likewise. And for the
xml_writer API, too.
* tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
* tools/bidiff.cc (main): Likewise, for xml_reader APIs.
* tools/bilint.cc (main): Likewise, for xml_writer APIs, too.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-12-04 08:44:20 +00:00
|
|
|
abg-reader.h \
|
2013-12-07 07:07:54 +00:00
|
|
|
abg-dwarf-reader.h \
|
Prepare serialization API for multiple backends
* include/abg-reader.h: New file with abigail::xml_reader APIs.
* include/abg-writer.h: New file with abigail::xml_writer APIs.
* include/Makefile.am: Add the new files above to the source
distribution.
* src/abg-reader.cc: Update top-file comments.
(namespace xml_reader): Rename namespace
reader into this.
(read_to_translation_unit, read_corpus_from_archive): New static
functions.
(read_translation_unit_from_file)
(read_translation_unit_from_file, read_corpus_from_file): New
entry points.
(struct array_deleter): New functor.
(translation_unit::read): Remove this.
* src/abg-writer.cc: Update top file comments.
(namespace xml_writer): Rename namespace
writer into this.
(struct archive_write_ctxt): New internal type.
(create_archive_write_context, write_translation_unit_to_archive)
(write_translation_unit, write_corpus_to_archive): New low level
static functions overloads.
(write_corpus_to_archive, write_translation_unit): Public higher
level overloads.
(translation_unit::write): Remove.
(dump): Update for new xml_writer namespace.
* include/abg-ir.h (translation_unit::{read, write}): Remove these
serialization methods.
* include/abg-corpus.h (corpus_sptr): New convenience typedef.
(corpus::{read, write}): Remove these methods.
* src/abg-corpus.cc (corpus::{read, write})
(corpus::impl::{serialized_tus, archive}): Remove these members.
(corpus::impl::{get_archive, close_archive, write_tu_to_archive,
read_to_translation_unit}): Remove these methods.
* tests/test-bidiff.cc (main): Update for usage of the new
xml_reader API.
* tests/test-read-write.cc (main): Likewise. Update for the usage
of the new xml_writer API, too.
* tests/test-walker.cc (main): Update for the usage of the new
xml_reader API.
* tests/test-write-read-archive.cc (main): Likewise. And for the
xml_writer API, too.
* tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
* tools/bidiff.cc (main): Likewise, for xml_reader APIs.
* tools/bilint.cc (main): Likewise, for xml_writer APIs, too.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2013-12-04 08:44:20 +00:00
|
|
|
abg-writer.h \
|
2013-09-28 12:39:57 +00:00
|
|
|
abg-comparison.h \
|
Initial implementation of diff tree node filtering
* include/abg-comp-filter.h: New file.
* include/Makefile.am: Add the new include/abg-comp-filter.h to
the source distribution.
* include/abg-comparison.h (enum visiting_kind, diff_category): New enums.
(operator|): Declare new operator declaration for the new
visiting_kind enum.
(operator{|,^,&,~}): Declare new operator decl for the new
diff_category enum.
(diff_context::{get_allowed_category, set_allowed_category,
switch_categories_on, switch_categories_off, diff_filters,
add_diff_filter, maybe_apply_filters}): Declare new member functions.
(diff::{parent_, category_}): New members.
(diff::diff): Adjust.
(diff::{get_parent, set_parent, get_category, add_to_category,
is_filtered_out, to_be_reported}): New members.
(diff_node_visitor::{get_visiting_kind, set_visiting_kind}): New
members.
(diff_node_visitor::visit): Add a new flag to saying if the
visitor is being called in post or pre children traversing mode.
* src/abg-comparison.cc (operator|): Declare new operator
declaration for the new visiting_kind enum.
(operator{|,^,&,~}): Declare new operator decl for the new
diff_category enum.
(diff_context::priv::{allowed_category_, filters_}): New members.
(diff_context::diff_context): Add all known filters.
(diff_context::{get_allowed_category, set_allowed_category,
switch_categories_on, switch_categories_off, diff_filters,
add_diff_filter, maybe_apply_filters}): Define new member
functions.
(diff::{is_filtered_out, to_be_reported}): Define new members.
(*::report): Use the new diff::to_be_reported function.
(*::traverse): Adjust for pre/post visiting.
(var_diff::var_diff): Chain the type diff node to its parent.
({pointer_diff, reference_diff, qualified_type_diff,
typedef_diff}::underlying_type_diff): Chain the underlying type
diff node to its parent.
(enum_diff::enum_diff): Likewise.
(base_diff::underlying_class_diff): Likewise.
({class_diff, corpus_diff}::report): Do not report changed
(member) functions that have been filtered out. Rather report
that they have been filtered out.
({function_decl_diff, class_diff}::traverse): Chain underlying
type diff nodes to their parent.
(diff_node_visitor::visit): Add a new flag to saying if the
visitor is being called in post or pre children traversing mode.
Make sure to call the default diff::visit overload.
* src/abg-comp-filter.cc: New file.
* src/Makefile.am: Add the new abg-comp-filter.cc to the source
distribution.
* tools/bidiff.cc (options::show_harm{ful,less}_changes): New
members.
(display_usage): Add usage strings for --no-harmless and
--no-harmful options.
(parse_command_line): Parse --no-harmless and --no-harmful command
line options.
(set_diff_context_from_opts): Populate the diff context
accordingly.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-03-27 10:03:53 +00:00
|
|
|
abg-comp-filter.h \
|
2013-09-28 12:39:57 +00:00
|
|
|
abg-diff-utils.h \
|
2013-08-01 23:07:26 +00:00
|
|
|
abg-libxml-utils.h \
|
2013-08-27 13:18:59 +00:00
|
|
|
abg-libzip-utils.h \
|
2013-08-08 14:56:06 +00:00
|
|
|
abg-fwd.h \
|
2013-08-01 23:07:26 +00:00
|
|
|
abg-hash.h \
|
2015-01-08 10:34:03 +00:00
|
|
|
abg-tools-utils.h \
|
2013-08-01 23:07:26 +00:00
|
|
|
abg-config.h \
|
2014-09-05 14:29:18 +00:00
|
|
|
abg-ini.h \
|
2016-01-15 12:34:16 +00:00
|
|
|
abg-workers.h \
|
2013-08-08 14:56:06 +00:00
|
|
|
abg-traverse.h \
|
2013-08-01 23:07:26 +00:00
|
|
|
abg-version.h \
|
|
|
|
abg-viz-common.h \
|
|
|
|
abg-viz-dot.h \
|
|
|
|
abg-viz-svg.h
|
|
|
|
|
2013-08-22 15:07:07 +00:00
|
|
|
EXTRA_DIST = abg-version.h.in
|