1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 17:56:21 +00:00
Commit Graph

385 Commits

Author SHA1 Message Date
uz
1917591b94 Renamed variables for better readability.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5181 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 12:08:43 +00:00
uz
7323035a89 Do also write the im-/export flags to the symbol flags in an object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5179 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-16 11:37:19 +00:00
uz
b097b49a4a Fixed even more problems with the range check.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5171 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:23:44 +00:00
uz
cd50385b72 Fixed a problem with the range check.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5170 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 17:19:05 +00:00
uz
d758b39dfc Line number is now an unsigned.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5168 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-15 16:08:50 +00:00
uz
6e32190cae A few measures to create slightly smaller object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5165 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-14 20:06:14 +00:00
uz
b8549f0af8 Complete redesign of line info generation. Uses spans instead of a fragment
list as before.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5162 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-14 19:23:16 +00:00
uz
27964254dc Adjust to recent changes in the hash modules.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5160 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-12 16:22:28 +00:00
uz
762d4d9ea2 Grow the Span collection before adding spans for the segments. This means that
in most cases the colection will have the optimal size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5157 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-12 16:10:34 +00:00
uz
54ffc25a53 Removed an unused function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5153 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-11 21:23:37 +00:00
uz
472c21d7ff Some improvements for spans.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5134 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 20:01:40 +00:00
uz
af8fbf8d62 Fox scopes that have a label (= .PROC), write the label to the debug
information.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5130 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-07 18:46:56 +00:00
uz
9f02a29dfa Use a collection to manage the segments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5124 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-05 13:45:33 +00:00
uz
31d2fff060 Rename SegRange to span. Write out the size instead of the end offset so we
can save some bytes in the object file.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5113 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-04 12:49:59 +00:00
uz
ca0877adb6 Fixed an error in the special purpose allocator in expr.c.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5109 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-02 16:46:47 +00:00
uz
1df46aed11 Fixed a memory leak.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5108 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-08-02 16:16:37 +00:00
uz
97cb025964 Remove SCOPE_PROC. It's a .SCOPE with an owner symbol.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5098 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 17:10:33 +00:00
uz
72a13e1a21 Write scopes in id order, so we don't need to write out the id itself. Add the
size of the scope to the output file and a flag bit that tells us if the scope
has a size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5097 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 15:37:51 +00:00
uz
4191eb7718 Move scope type definitions to common/
git-svn-id: svn://svn.cc65.org/cc65/trunk@5095 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 14:01:11 +00:00
uz
dd3a841b1a Add the parent scope/symbol to the debug symbol attributes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5094 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 13:28:54 +00:00
uz
359e119a6b Write scope information to the object file.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5091 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-31 12:25:02 +00:00
uz
bf6b0b9eb7 Check for macros within .STRUCT/.ENUM.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5076 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-08 09:55:17 +00:00
uz
241afdc738 Don't search twice for a macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5075 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-08 09:22:26 +00:00
uz
d18fd210aa The line counter got confused for lines with more than 256 chars. Removed the
restriction alltogether, so lines with arbitrary length should be handled
correctly. Not that it is of much use for an assembler, but this has really
been a somewhat ancient limitation.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5072 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-07 20:07:29 +00:00
uz
3f2f3baa27 Removed an unused function.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5066 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-17 19:58:53 +00:00
uz
795d9e1a1c Mark the symbol that is the name of a scope with the size of that scope
(previously only the scope itself had that size).
Pass the size of symbols through the object file to the linker. Bump the
object file version and adjust object file reading tools (od65, ar65) to this
change.
Read the size in the linker and output it in the debug info.
Bump the minor version number of the debug info. Read the size and allow to
access it via the API. Do better version checking for the debug info and try
to be smarter when encountering unknown keywords to improve support for newer
minor versions.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5057 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-13 18:43:50 +00:00
uz
00f57bbc87 Fix/workaround for a problem with nested macros.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5053 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-13 10:03:26 +00:00
uz
4709e8251e Fixed the same problem as in the last change for the final token of .define
style macros.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5052 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-13 08:55:48 +00:00
uz
ff9841d7b5 Fix wrong line info sometimes output for macros: When macro parameters were
expanded, the line info came from the parameter replacement list, but was
marked as coming from the macro. Now parameter replacement lists don't change
the line info.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5051 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-13 08:53:41 +00:00
uz
d1426aaa43 Finished implemenation of commands to delete macros. Added the new commands to
the docs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5050 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-12 21:29:07 +00:00
uz
eaa45269e7 First implementation of .UNDEF for deleting a macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5049 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-11 22:18:48 +00:00
uz
ce0d51d55a Fixed an error: An .ELSE without an .IF caused a null pointer dereference.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5047 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-09 11:27:33 +00:00
uz
acb1699017 Improve the performance of the routine that determines the overall .IF
condition.
            


git-svn-id: svn://svn.cc65.org/cc65/trunk@5046 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-09 11:23:37 +00:00
uz
15fc094c7a Add recursive scanning for .define style macros: Replacement using .define is
done not only when the macro is parsed, but also when it is expanded.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5045 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-08 21:09:40 +00:00
uz
8cb4788e13 Fix a compile problem with the Watcom compiler.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5040 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-08 06:51:05 +00:00
uz
5db7604eff Don't allow too many nested macro expansions. Until now, it was possible to
send the assembler in an endless loop by a recursive macro without end
condition or a set of macros that called each other.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5038 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-07 21:17:35 +00:00
uz
f8089b98c1 Limit the number of additional line infos printed in case of an error or
warning.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5037 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-07 21:15:16 +00:00
uz
7db7f34d91 Fix an error with .ELSEIF: The condition must only be evaluated if the .ELSEIF
is inside an .IF which had a TRUE condition.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5036 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-07 17:16:18 +00:00
uz
f0a6653bd1 Added a comment about the fix explaining why the given order of calls is necessary.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5035 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-05 14:47:28 +00:00
uz
46f1285208 Fixed an error in macro expansion: If the first token after the macro name was
a .define style macro, the assembler run into an internal error, because the
expansion of the second macro was started before the first one


git-svn-id: svn://svn.cc65.org/cc65/trunk@5034 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-05 14:45:37 +00:00
uz
6a48359d23 Fix a problem with conditional assembly: The scanner has to be switched into
raw token mode when skipping a section of input because otherwise pseudo
functions may trigger errors.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5033 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-05 14:28:56 +00:00
uz
6a56201046 Remove declarations for stuff that has never been there.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5032 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-06-05 14:24:51 +00:00
uz
9c53f8879c Fixed a problem in GetSymParentScope, where an error in the assembler input
somewhere before could lead to an invalid memory access.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5031 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-31 14:51:21 +00:00
uz
9c267dab89 The terminating zero was missing in several places where a string buffer was
copied to CurTok.SVal.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5030 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-30 21:56:27 +00:00
uz
f2517269ad Fix problem with output of sprintf when %s format spec is used.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5029 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-05-30 21:37:34 +00:00
uz
a6389e6406 The assembler options -l and --listing will now take the name of the listing
file as an argument.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4967 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-02-06 20:10:19 +00:00
uz
299a0ed4cd Pass type of line info through the object files.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4957 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 22:16:03 +00:00
uz
88e6b86427 Changed text of notification.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4952 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 20:30:38 +00:00
uz
f0a0095c25 Create separate line infos for macros and .repeat statements and other token
lists. These are also output as diagnostic in case of an error.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4951 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 20:24:44 +00:00
uz
1072edb0d8 Use line infos to output more verbose error and warning messages whenever
possible.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4950 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-01-29 18:43:36 +00:00