Bill Currie
|
535dfad305
|
Emit defs for far data.
They will break when the offsets exceed 64k, but they are needed for
debugging.
|
2011-03-05 15:59:14 +09:00 |
|
Bill Currie
|
97b1ceceb0
|
Fix line number info.
line number info is now 1 based rather than 0 based (to better detect when
a function does not have line number info).
|
2011-03-05 15:40:08 +09:00 |
|
Bill Currie
|
1dea86a3e4
|
Update debug info loading when dumping qfo files.
|
2011-03-05 14:53:41 +09:00 |
|
Bill Currie
|
cfefd79e07
|
Fix the source of bogus string relocs.
Nested aggregate initializers were corrupting themselves.
|
2011-03-05 09:21:12 +09:00 |
|
Bill Currie
|
7c95913c61
|
Avoid segfaulting with bad string relocs.
|
2011-03-05 09:07:16 +09:00 |
|
Bill Currie
|
8eb5fd653a
|
Perform the relocations!!!
line numbers seem to be broken, but the code itself looks good.
|
2011-03-05 08:41:14 +09:00 |
|
Bill Currie
|
fe7be543f8
|
Correctly update the offset of code relocs.
|
2011-03-05 08:39:47 +09:00 |
|
Bill Currie
|
7fd839a5ed
|
Handle chains of alias defs so relocs will be emitted.
|
2011-03-05 08:39:16 +09:00 |
|
Bill Currie
|
bbedbf5c9c
|
Add the .return etc symbols to the symbol table.
This puts their defs into the object file.
|
2011-03-05 08:37:51 +09:00 |
|
Bill Currie
|
c3f1c186f8
|
Resolve types of .return etc.
|
2011-03-05 08:36:55 +09:00 |
|
Bill Currie
|
af7bc81e16
|
Chain the types for the linker.
|
2011-03-05 08:35:56 +09:00 |
|
Bill Currie
|
0bd0f783b2
|
Update def offsets with their final locations.
|
2011-03-04 23:37:46 +09:00 |
|
Bill Currie
|
6d02555ca9
|
Reorganize the offset calculations.
keep the offset calculations separate from the data transfers for better
clarity in what is happening.
|
2011-03-04 23:31:09 +09:00 |
|
Bill Currie
|
e62163e569
|
Nuke any invalidated relocs.
|
2011-03-04 21:46:19 +09:00 |
|
Bill Currie
|
2565e0db32
|
Update reloc targets when linking.
|
2011-03-04 21:29:47 +09:00 |
|
Bill Currie
|
bc78b84869
|
Set the target of string relocs to the string index.
|
2011-03-04 21:29:10 +09:00 |
|
Bill Currie
|
7fb22bd1e4
|
Make D_STRING() more useful and add D_GETSTR()
|
2011-03-04 21:28:12 +09:00 |
|
Bill Currie
|
e04f6266b1
|
Nuke def_list from defref_t.
It didn't work :/.
|
2011-03-04 20:40:01 +09:00 |
|
Bill Currie
|
5a552d8841
|
Add the null function.
|
2011-03-04 20:29:40 +09:00 |
|
Bill Currie
|
368a3826be
|
Redo the offset and size calculations for qfo_to_progs().
|
2011-03-04 20:14:02 +09:00 |
|
Bill Currie
|
cd12a78f93
|
Replace some accidentally deleted code.
Forgot to commit it the first time round, then rebase messed me up and I
didn't notice until after pushing. *sigh*
|
2011-03-04 19:02:47 +09:00 |
|
Bill Currie
|
72fae608e5
|
Write the function start address to the progs file.
Oops:P
|
2011-03-04 18:46:28 +09:00 |
|
Bill Currie
|
2211a807d4
|
Do not relocate builtin functions.
|
2011-03-04 18:46:25 +09:00 |
|
Bill Currie
|
d6d8b5b49d
|
Generate the debug symbol file.
|
2011-03-04 18:46:05 +09:00 |
|
Bill Currie
|
9a96febdf5
|
Fix the hordes of bogus defs.
They were caused by unused external defs, so not processing unused externs
in the first place is the simplest solution.
|
2011-03-04 14:51:09 +09:00 |
|
Bill Currie
|
7b7f4c70e0
|
Correct non-external def processing.
|
2011-03-04 14:33:03 +09:00 |
|
Bill Currie
|
c5dac6d1d1
|
Transfer the type encoding.
oops
|
2011-03-04 14:29:22 +09:00 |
|
Bill Currie
|
d0b4546383
|
qfprogs isn't yet fully functional...
|
2011-03-04 13:54:29 +09:00 |
|
Bill Currie
|
2992d66f87
|
Simplify the tag used for anonymous structs etc.
Hopefully two files with the same file name won't have anonymous stucts on
the same line.
|
2011-03-04 13:52:32 +09:00 |
|
Bill Currie
|
e525727a24
|
Add a null type descriptor to the linker output.
|
2011-03-04 11:38:33 +09:00 |
|
Bill Currie
|
3a828ca5c2
|
Ensure work spaces are always connected to their data.
|
2011-03-04 11:18:56 +09:00 |
|
Bill Currie
|
45c3dd67a8
|
Some test updates.
|
2011-03-04 08:27:26 +09:00 |
|
Bill Currie
|
4192ef835c
|
Delay initialization of obj_module_t as long as possible.
This keeps the type descriptor out of progs that never use any
Objective-QC features.
|
2011-03-04 08:25:50 +09:00 |
|
Bill Currie
|
c99f3aba0e
|
Add the new header files for make dist.
|
2011-03-04 00:11:13 +09:00 |
|
Bill Currie
|
fd24524e13
|
More tests.
I really need to sort out some test automation.
|
2011-03-03 22:32:22 +09:00 |
|
Bill Currie
|
ee9045c377
|
Emit code for jump tables.
With this, the entirety of the ruamoko tree builds (though the progs will
be broken in various ways: mostly unrelocated references).
|
2011-03-03 19:09:00 +09:00 |
|
Bill Currie
|
a281033920
|
Alais the jump table's array to an integer.
As per the previous commit, I'm not sure this is the right thing to do, but
it works for now.
|
2011-03-03 19:07:37 +09:00 |
|
Bill Currie
|
4324486ae6
|
Give - unary expressions special treatment.
The progs engine has no neg instruction, so need to implement -val as
nil - val
|
2011-03-03 18:13:30 +09:00 |
|
Bill Currie
|
f9e177efd6
|
Obtain the label to be removed from the correct place.
This fixes the undetected dead block after "if return else return".
|
2011-03-03 17:50:46 +09:00 |
|
Bill Currie
|
ed901bd48f
|
Drop unused labels rather than adding them to the statement block.
However, even unused labels create a new statement block if necessary.
|
2011-03-03 17:35:06 +09:00 |
|
Bill Currie
|
b5e7e666e9
|
Fix some missed branch/goto expression changes.
|
2011-03-03 17:33:53 +09:00 |
|
Bill Currie
|
c5ecc170b6
|
Give labels a usage count to detect unused labels.
|
2011-03-03 15:28:49 +09:00 |
|
Bill Currie
|
90640614ef
|
Compare symbols using the right method.
That fixme was right :)
|
2011-03-03 15:02:26 +09:00 |
|
Bill Currie
|
610d775bd1
|
Treat void values as the largest type.
This fixes passing nil through a structure return value.
|
2011-03-03 14:56:21 +09:00 |
|
Bill Currie
|
bad5fddec4
|
Fix overloaded function resolution.
Update the expression symbol pointer, not just the symbol name.
|
2011-03-03 14:44:48 +09:00 |
|
Bill Currie
|
fff4fc693e
|
Fix value hashing and comparison in switch expressions.
|
2011-03-03 14:02:18 +09:00 |
|
Bill Currie
|
74e6b13aee
|
Use alias expressions where possible when testing an expression.
|
2011-03-03 13:47:28 +09:00 |
|
Bill Currie
|
d937172243
|
Create and use alias operands for alias expressions.
This avoids the alias expression modifying the operand used in other
expressions.
|
2011-03-03 13:46:07 +09:00 |
|
Bill Currie
|
022fde666f
|
Implement unary expression statements.
|
2011-03-03 13:10:07 +09:00 |
|
Bill Currie
|
45de7327dc
|
Implement alias expressions (finally).
Alias expressions are like cast expressions, but never do any conversions.
|
2011-03-03 11:06:10 +09:00 |
|