2010-03-15 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Tue, 16 Mar 2010 01:26:15 +0000 (01:26 +0000)
committerDoug Kwan <dougkwan@google.com>
Tue, 16 Mar 2010 01:26:15 +0000 (01:26 +0000)
commit1aa37384696ad1fcec310e8d3c7955b0266f61d5
treea1ac5f2059d8b607e64bf0f3796228043f50c687
parentac0cd78b43c40ce8311a9381da2e42bb40eaaea9
2010-03-15  Doug Kwan  <dougkwan@google.com>

* stringpool.cc (Stringpool_template::Stringpool_template): Initialize
offset_.
(Stringpool_template::new_key_offset): New method.
(Stringpool_template::add_string): Assign offsets when adding new
strings.
(Stringpool_template::set_string_offsets): Do not set string offsets
when not optimizing.
* stringpool.h (Chunked_vector::Chunked_vector): Initialize data
member size_.
    (Chunked_vector::clear): Clear size_.
    (Chunked_vector::reserve): Call reserve method of all Element_vectors.
    (Chunked_vector::size): Return size_.
    (Chunked_vector::push_back): Use size_ to find insert position.
(Chunked_vector::size_): New data member.
(Stringpool_template::set_no_zero_null): Assert string set is empty.
(Stringpool_template::new_key_offset): New method declaration.
(Stringpool_template::offset_): New data member.
gold/ChangeLog
gold/stringpool.cc
gold/stringpool.h