1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-30 16:29:58 +00:00
Commit Graph

4773 Commits

Author SHA1 Message Date
uz
d0d550be66 Fix errors in tracking the number of items in the table. Added function
HT_GetCount to retrieve the number of items.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5248 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:56:40 +00:00
uz
ae98f4bcd8 Fix a problem with macro expansion count in line infos for macros.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5247 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:23:38 +00:00
uz
6cdac5eb4c Fixed a bug in SP_Add.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5246 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 16:08:52 +00:00
uz
7fe0958b91 The ...Entry functions from the hashtab module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5245 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:35:36 +00:00
uz
58ffb47250 The ..Entry functions from the hashtable module have been renamed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5244 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:33:06 +00:00
uz
96ce71ad5f Removed the functions that work on HashNodes since they are mostly useless
now.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5243 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:31:30 +00:00
uz
77110021ab Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5242 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:21:11 +00:00
uz
4461988fd1 Implementation of SP_GetCount has been missing.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5241 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:20:48 +00:00
uz
bf889a1928 Implementation of StringPool has changed.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5240 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:16:14 +00:00
uz
e1a861f0a5 Use the hashtab to implement the string pool hash table.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5239 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-21 13:15:52 +00:00
uz
f3b49b57bd Add a gentype.c module that contains GT_FromStrBuf.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5238 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 22:13:58 +00:00
uz
85584fb404 Small change for better hash table distribution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5237 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 21:53:22 +00:00
uz
ef412bc22c Added a new gentype module for generic (not language dependent) types.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5236 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-20 20:16:13 +00:00
uz
78551ba832 Read segment sizes as var, no longer as 32 bit values.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5235 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:58:14 +00:00
uz
6a01a3407a Read the segment size as var, not as 32 bit value.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5234 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:56:44 +00:00
uz
1e20489ee1 Renamed some stuff. Write out the segment size as var, not 32 bit.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5233 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 20:55:48 +00:00
uz
607aa871e6 Last fix was wrong. The problem wasn't in the struct code but in SymLeaveLevel
calling CloseSpans, which does not only close spans but might also add some,
in which case the scope became another size.
                                            


git-svn-id: svn://svn.cc65.org/cc65/trunk@5232 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:24:11 +00:00
uz
ce85b303c3 Fixed a bug: The size of a scope is now recorded for all scopes in
SymLeaveLevel. Doing so also in the code for .STRUCT/.UNION will try to enter
the .size symbol twice.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5231 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 15:06:51 +00:00
uz
7ee90fb21b Added cc65_line_byspan and cc65_scope_byspan.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5230 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:39:11 +00:00
uz
7fa197337b Add the number of attached lines and scopes to a span.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5229 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 14:31:03 +00:00
uz
bc0f3fd99b Removed some debug output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5228 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:30:31 +00:00
uz
61f3e1dce3 Allow more space for symbol names.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5227 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:22:36 +00:00
uz
aff6d02c43 Remove CollConstAt. Let CollAt and CollAtUnchecked take const pointers to
collections. Use const pointers in many places. Some other cleanups.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5226 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:21:22 +00:00
uz
88774521a3 Use CollTransfer where possible.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5225 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:06:52 +00:00
uz
189a9bfb38 New function CollTransfer. Change CollAt and CollAtUnchecked to take a const
Collection pointer instead of just a Collection pointer. This makes more
sense, since the functions do not change the collection.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5224 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 11:01:01 +00:00
uz
307b8d88c3 Reenable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5223 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:46:49 +00:00
uz
68db31c53b Changed data type used to store line numbers from unsigned long to unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5222 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:44:45 +00:00
uz
5f0e6dd7e9 Output all positions in a file for unresolved externals.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5221 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:40:11 +00:00
uz
c71d236da6 Enable optimizations.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5220 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-19 10:05:13 +00:00
uz
1527d26e91 Allow to display symbols and line infos for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5219 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:34:31 +00:00
uz
3a079ff332 Added cc65_line_bysymdef and cc65_line_bysymref.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5218 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 20:11:27 +00:00
uz
69ebab6064 Parse additional def and ref keywords for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5217 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:57:51 +00:00
uz
2a038ffef9 Output line info for symbol definition and references.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5216 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:55:53 +00:00
uz
1797235794 Read and manage additional line information for symbols.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5215 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:27:18 +00:00
uz
f8e5463278 Adapt to changed information in the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5214 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:26:44 +00:00
uz
c52916f461 Remember where each symbol was defined and where it was referenced. Write this
information to the object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5213 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 16:25:58 +00:00
uz
2f9e7d2ca0 Add reference counting to line infos. This allows better tracking of the ones
that are actually used.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5212 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:36:38 +00:00
uz
bd233ac916 Decrease the minimum size of a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5211 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 14:13:14 +00:00
uz
c9ddc44ebe Change HT_Walk so that it can optionally be used to delete nodes from the hash
table.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5210 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 13:05:21 +00:00
uz
862c0ba70e Don't use a separate Count field for the line info type.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5209 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 12:35:43 +00:00
uz
d3017665d2 Replace single linked list of sections in a segment by a collection.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5208 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:58:16 +00:00
uz
2abd77ffe5 Use correct syntax. The old did work but wasn't really right.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5207 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:57 +00:00
uz
11d46e93b2 Export NewSpan() - this will be needed later.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5206 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 11:57:17 +00:00
uz
4160505c59 Don't write out spans for line infos if no debug info is requested for the
object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5205 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:36:08 +00:00
uz
ec6acb8606 More changes to account for modules without debug info.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5204 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:26:13 +00:00
uz
0077e37182 If a symbol is an import, the corresponding export does only have a debug
symbol id if the module contains debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5203 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:13:11 +00:00
uz
b76fc52c1b Added an OBJ_HAS_DBGINFO macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5202 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:08:56 +00:00
uz
e53f4fa163 Mark imports with a special type tag instead of relying on the export pointer
being valid, because the export may not be available if the module was
compiled without debug information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5201 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 10:04:01 +00:00
uz
50adbf61f1 Mark imports using "type=imp".
git-svn-id: svn://svn.cc65.org/cc65/trunk@5200 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-18 09:56:53 +00:00
uz
ae0fcbf345 Track cheap local symbols. Reduce initial collection size to one. This causes
a small increase in allocations, but about 20% decrease in allocated memory.
Looks like many of the collections are rather small.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5199 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-17 21:34:26 +00:00