]> sourceware.org Git - libabigail.git/commit
Do not use recursive type hashing when writing out function types
authorDodji Seketeli <dodji@redhat.com>
Fri, 2 Oct 2015 17:42:12 +0000 (19:42 +0200)
committerDodji Seketeli <dodji@redhat.com>
Sun, 4 Oct 2015 11:51:25 +0000 (13:51 +0200)
commit8b76f6c34e6f916ba6812a4a03b080c2009140de
treee28224ba05df2a95b935933dd8f561afaa7a6afb
parent501c514245526cb6a309f5e4eae82f0a6c8b4250
Do not use recursive type hashing when writing out function types

When the abixml writer emits function types, it puts function
types that are referenced by pointers or references into a map on the
side.  Unfortunately, that map hashes types by recursively calculating
a progressive hash value.  That is dog slow and we avoid that
throughout the code base.

This patch changes that to use the numerical values of the canonical
type pointer of the function type as a hash, making abixml fast again,
again on big library as libmozjs.so.

* src/abg-writer.cc (typedef fn_shared_ptr_map): Remove.
(write_context::m_referenced_fntypes_map): Change the type of this
into type_ptr_map.
(write_context::{record_fntype_as_referenced,
fntype_is_referenced}): Use the pointer value of the canonical
type of the referenced type as key for the map.

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