Jonas Maebe
427b05e97c
* converted TVMTWriter.intf_write_table() to the high level typed constant
...
builder
o removed variant record part in the RTL to force a specific size/alignment,
since we now import the record into the compiler and hence it will always
be handled correctly
git-svn-id: branches/hlcgllvm@28777 -
2014-10-06 20:54:23 +00:00
Jonas Maebe
634d2931e2
* use ttai_typedconstbuilder.emit_ord_const() when emitting ordinal constants
...
git-svn-id: branches/hlcgllvm@28776 -
2014-10-06 20:54:20 +00:00
Jonas Maebe
a0decd4a79
+ ttai_typedconstbuilder.emit_ord_const() helper
...
git-svn-id: branches/hlcgllvm@28775 -
2014-10-06 20:54:17 +00:00
Jonas Maebe
8af5ef911b
* converted TVMTWriter.writeinterfaceids() to the typed constant builder
...
git-svn-id: branches/hlcgllvm@28774 -
2014-10-06 20:54:15 +00:00
Jonas Maebe
e07933212b
* factored out emitting a guid const
...
git-svn-id: branches/hlcgllvm@28773 -
2014-10-06 20:54:12 +00:00
Jonas Maebe
8fa4c69f1f
* converted generation of class and fields table to the typed constant builder
...
git-svn-id: branches/hlcgllvm@28772 -
2014-10-06 20:54:10 +00:00
Jonas Maebe
984491e435
* factored out emitting a shortstring constant via the typed constant builder
...
git-svn-id: branches/hlcgllvm@28771 -
2014-10-06 20:54:07 +00:00
Jonas Maebe
f8cda69446
* converted generting published method tables to the typed constant builder
...
git-svn-id: branches/hlcgllvm@28770 -
2014-10-06 20:54:04 +00:00
Jonas Maebe
5ecb2faf93
* converted generting method message integer dispatch tables to the typed
...
constant builder
git-svn-id: branches/hlcgllvm@28769 -
2014-10-06 20:54:02 +00:00
Jonas Maebe
67647d4ee0
* converted emitting method message string tables to the typed constant
...
builder
git-svn-id: branches/hlcgllvm@28768 -
2014-10-06 20:53:59 +00:00
Jonas Maebe
f8d4d20f5a
* converted emitting the class name to the typed constant builder class
...
git-svn-id: branches/hlcgllvm@28767 -
2014-10-06 20:53:57 +00:00
Jonas Maebe
2ed100666d
* pack ansi/wide/unicodestring "records" at 1 byte so that we don't "pad"
...
the string to a multiple of sizeof(pint) (the string record itself is still
aligned to a multiple of that)
git-svn-id: branches/hlcgllvm@28766 -
2014-10-06 20:53:54 +00:00
Jonas Maebe
76e0ee7a41
* fixed adding padding bytes before anonymous records: the alignment of such
...
records is only known once we have completely parsed all of their data
(the alignment of a record depends on the alignment requirements of its
field with the largest alignment) -> only insert the padding bytes after
completely parsing them
git-svn-id: branches/hlcgllvm@28765 -
2014-10-06 20:53:51 +00:00
Jonas Maebe
5a9b931e5c
* renamed ttai_lowleveltypedconstbuilder to ttai_typedconstbuilder
...
git-svn-id: branches/hlcgllvm@28764 -
2014-10-06 20:53:49 +00:00
Jonas Maebe
d2b55b6f07
* moved the recording of aggregate type information during typed constant
...
parsing from nllvmtcon to aasmcnst
o added automatic insertion of padding bytes when fields need to be aligned,
so that once ncgvmt (and hopefully ncgrtti) are converted to the typed
constant builder class, we can get rid of all the explicit alignment
directives (only supported for non-bitpacked records for now)
git-svn-id: branches/hlcgllvm@28763 -
2014-10-06 20:53:46 +00:00
Jonas Maebe
95b95497d4
* mark the typesyms generated in trecorddef.create_global_internal() as used
...
so that they don't cause hints about unused types
git-svn-id: branches/hlcgllvm@28762 -
2014-10-06 20:53:43 +00:00
Jonas Maebe
12836db931
* put the symtable(s) of the current unit back on the symtablestack before
...
generating the resource strings, so that the defs generated by the typed
constant builder get added to the correct unit
git-svn-id: branches/hlcgllvm@28761 -
2014-10-06 20:53:41 +00:00
Jonas Maebe
854fe2230a
* store the vmt field rather than only its offset in tobjectdef, so we can
...
easily find it again later (since it's hidden and doesn't have a fixed
name, it's hard otherwise). Needed for the typed constant builder.
git-svn-id: branches/hlcgllvm@28760 -
2014-10-06 20:53:38 +00:00
Jonas Maebe
489594f02f
* fixed copy/paste error in r28322
...
git-svn-id: branches/hlcgllvm@28759 -
2014-10-06 20:53:36 +00:00
Jonas Maebe
bdfb6d81e5
* don't emit padding bytes if there was an error parsing a typed constant
...
record
git-svn-id: branches/hlcgllvm@28758 -
2014-10-06 20:53:33 +00:00
Jonas Maebe
0def3629cc
* factored out adding a single field to a record based on a def
...
git-svn-id: branches/hlcgllvm@28757 -
2014-10-06 20:53:30 +00:00
Jonas Maebe
bdb22772d9
* fixed whitespace
...
git-svn-id: branches/hlcgllvm@28756 -
2014-10-06 20:53:28 +00:00
Jonas Maebe
6560b1dbd6
* emit alignment directive in the typed constant builder when starting a new
...
constant without putting it in a separate section
git-svn-id: branches/hlcgllvm@28755 -
2014-10-06 20:53:25 +00:00
Jonas Maebe
9d9e0a578b
* return the next field from tabstractrecordsymtable.findfieldbyoffset() if
...
there is no field at that exact offset, so we can also use it to find the
next field in case there is alignment padding
git-svn-id: branches/hlcgllvm@28754 -
2014-10-06 20:53:22 +00:00
Jonas Maebe
210b532832
* split up specifying the type of the section of a typed constant and whether
...
it should be put in a new section
git-svn-id: branches/hlcgllvm@28753 -
2014-10-06 20:53:20 +00:00
Jonas Maebe
6677e698cd
* record the alignment in taillvmdecl, as it can be different from the
...
default
git-svn-id: branches/hlcgllvm@28752 -
2014-10-06 20:53:17 +00:00
Jonas Maebe
37009c917b
* pass alignment to tnodeutils.insertbsssym()
...
git-svn-id: branches/hlcgllvm@28751 -
2014-10-06 20:53:14 +00:00
Jonas Maebe
864b36fbe5
* create the recorddef at the start when building an anonymous recorddef,
...
so that we can already refer to its def while we are sill parsing
individual elements
git-svn-id: branches/hlcgllvm@28750 -
2014-10-06 20:53:12 +00:00
Jonas Maebe
6cc74cd115
+ added missing begin_anonymous_record() for widestring constants (undetected
...
before because it only matters for the llvm target, and fpc+llvm+windows is
not yet supported/tested)
git-svn-id: branches/hlcgllvm@28749 -
2014-10-06 20:53:09 +00:00
Jonas Maebe
b18ba8e85b
* syncrhonised with trunk up till r28471
...
git-svn-id: branches/hlcgllvm@28495 -
2014-08-19 20:23:11 +00:00
Jonas Maebe
b710220a5e
* fixed calldef specified in case of calling a varargs C function
...
git-svn-id: branches/hlcgllvm@28494 -
2014-08-19 20:22:59 +00:00
Jonas Maebe
d09243c8c1
* correctly handle make_simple_ref() for voidpointers
...
git-svn-id: branches/hlcgllvm@28493 -
2014-08-19 20:22:56 +00:00
Jonas Maebe
b745dcc64c
* moved g_external_wrapper() to the hlcg, and also g_intf_wrapper() because
...
for some platforms it depends on that routine
git-svn-id: branches/hlcgllvm@28492 -
2014-08-19 20:22:54 +00:00
Jonas Maebe
33c277b3a7
+ temp_to_ref() implementation for llvm
...
git-svn-id: branches/hlcgllvm@28491 -
2014-08-19 20:22:50 +00:00
Jonas Maebe
0fbaa9e924
* record the alignment of temps, and set it when creating a reference based
...
on a temp instead of assuming it's always aligned to a multiple of
the stackpointer size
git-svn-id: branches/hlcgllvm@28490 -
2014-08-19 20:22:48 +00:00
Jonas Maebe
9880b53242
* changed all alignment parameters in the temp manager to shortint
...
git-svn-id: branches/hlcgllvm@28489 -
2014-08-19 20:22:45 +00:00
Jonas Maebe
dd733bd5b5
* changed all size parameters in the temp manager from longint to asizeint
...
git-svn-id: branches/hlcgllvm@28488 -
2014-08-19 20:22:42 +00:00
Jonas Maebe
830952cc3b
* moved creating a reference based on a ttemprecord to a new virtual method
...
called temp_to_ref()
git-svn-id: branches/hlcgllvm@28487 -
2014-08-19 20:22:40 +00:00
Jonas Maebe
0a87133e00
* spelling fix
...
git-svn-id: branches/hlcgllvm@28486 -
2014-08-19 20:22:37 +00:00
Jonas Maebe
344acef9b5
* separate tracking the def of a temp and whether or not it needs to be
...
finalised (for llvm, we always keep track of the def)
git-svn-id: branches/hlcgllvm@28485 -
2014-08-19 20:22:34 +00:00
Jonas Maebe
3b7f43ad77
* renamed (hl)gettemptyped() to (hl)gettempmanaged() to better indicate the
...
meaning
git-svn-id: branches/hlcgllvm@28484 -
2014-08-19 20:22:32 +00:00
Jonas Maebe
979a3d7e1d
* channged gettemptyped() into gethltemp() call, as gettemptyped() is only
...
intended/required for managed types
git-svn-id: branches/hlcgllvm@28483 -
2014-08-19 20:22:29 +00:00
Jonas Maebe
8064adec38
* converted tcgtryexceptnode.pass_generate_code() and
...
tcgtryfinallynode.pass_generate_code() to thlcg
git-svn-id: branches/hlcgllvm@28482 -
2014-08-19 20:22:27 +00:00
Jonas Maebe
a637fbe596
* moved all g_exception_*() methods to hlcgobj and cleaned them up (no more
...
hardcoded registers for the most part)
+ added extra g_exception_discard_reason() that can be called when we only
want to get rid of the currently pushed exception reason, and don't have
to load it (so it can do nothing on platforms that don't use push/pop)
git-svn-id: branches/hlcgllvm@28481 -
2014-08-19 20:22:24 +00:00
Jonas Maebe
9d118567cd
+ support for a_call_reg() on the llvm target (can call simple procvars now)
...
git-svn-id: branches/hlcgllvm@28480 -
2014-08-19 20:22:21 +00:00
Jonas Maebe
3a78f4f580
* use the correct destination def for loading a simple proc2procvar
...
git-svn-id: branches/hlcgllvm@28479 -
2014-08-19 20:22:19 +00:00
Jonas Maebe
bd3f0b3ada
* factored out the common calling code from a_call_name (to reuse in
...
a_call_reg()
git-svn-id: branches/hlcgllvm@28478 -
2014-08-19 20:22:16 +00:00
Jonas Maebe
b6fc2f1542
* don't emit the */pointer suffix for procdefs in llvmaddencodedtype_intern(),
...
so that if a_loadaddr_ref_reg() is used to load the address of a procdef
into a register, the getpointerdef(procdef) won't (wrongly) result in two
*'s
o the previous behaviour was necessary for the tck_simple_procvar2proc
special case that was removed in the previous commit
git-svn-id: branches/hlcgllvm@28477 -
2014-08-19 20:22:13 +00:00
Jonas Maebe
cc4482d6f8
- removed tck_simple_procvar2proc, instead use
...
procdef.getcopyas(procvardef,pc_address_only) as the def if we want to
specify that we're interested in the address of a procedure/procvar of
object
git-svn-id: branches/hlcgllvm@28476 -
2014-08-19 20:22:11 +00:00
Jonas Maebe
904a033ba2
* factored out the code for loading a procvar address, and fixed all used
...
defs
git-svn-id: branches/hlcgllvm@28475 -
2014-08-19 20:22:08 +00:00