* for in loops can generate temp. refs as loop counter, so when checking of the address of the for counter is taken, we have to check for a load node
git-svn-id: trunk@38692 -
* compinnr.inc include file converted to a unit
* inline number field size stored in ppu increased from byte to longint
* inlines in the parse tree (when written with the -vp option) now printed with
their enum name, instead of number
git-svn-id: trunk@36174 -
f(..) before using x directly as function result for f(..) (instead of a
temp) in case the function result of temp is passed via a hiddel
call-by-reference parameter. After all, if the result is returned by
value, then any changes to the function result inside the callee code
won't affect whatever we will assign the result to until the callee
has returned. However, this is not true in case of inlining: then
the replaced function result node will be substituted directly in the
inlined code -> also check for aliasing in that case.
o fixes test/toperator5.pp on x86-64
git-svn-id: trunk@34893 -
in ncnv
* handle the fact that we overwrite the open array resultdef of a parameters'
left node with the original resultdef (i.e., also for dynamic arrays) with
regards to LLVM type rules
o use the parameter's formal type (open array) instead of the value's type
(dynamic array) when loading/using its value, since that's the type the
value has been converted to
o this change is not really nice since it adds several independent checks in
different places, but I can't find a way to nicely unify the code to work
around this (nor one to get rid of that hack in the first place)
git-svn-id: trunk@34515 -
also the by-reference function result of a call node, now that this is
properly checked in the general case (these parameters/function results
are temp nodes in case of inlined calls)
git-svn-id: trunk@34446 -
and getters for the ttemp*node classes instead
o this will allow descendants to prevent certain flags from being added
or removed. E.g. for LLVM, certain temps must never be put in registers
because it cannot typecast a value in a register from a non-record/array
type to an array type without forcing it to memory (so if that is done
on an lvalue, the result will be written to the memory temp instead of
to the register)
git-svn-id: trunk@34358 -
parameters into temps in case it's required for correctness (so we
can easily "early exit" on failure from the latter) (still no
functional changes)
git-svn-id: trunk@34284 -
symbol is defined
o removed all places where AB_INDIRECT symbols were explicitly generated
o only generate AB_INDIRECT symbols for AT_DATA on systems_indirect_var_imports
o for some symbols an indirect symbol is always required (because they are
dereferenced by code in RTL units) -> use new AT_DATA_FORCEINDIRECT type
git-svn-id: trunk@34165 -
tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
pgenutil.pas:
+ new function maybe_add_pending_specialization() to add a pending specialization if it belongs to the current unit
* generate_specialization_phase2: don't set up the owner as this leads to problems when using overloaded generic routines and don't add it to the pending list if it's a procdef
ncal.pas, tcallnode:
* pass_typecheck: if we have a specialization then add it to the pending specializations once we know that we use it
git-svn-id: trunk@33843 -
the funcretnode field keeps a reference to this temp even after we
assign it to the call-by-reference return parameter if it is deleted
by changing it into a normal temp (after which it will be freed when
the result of the call node is used), because in that case getcopy
for the callnode must copy this reference after copying the
tempdeletenode in order to reset tempinfo^.hookoncopy (mantis #29891)
git-svn-id: trunk@33569 -
typecheckpass, because if it's for a nested routine on a platform
that uses ncgnstmm/ncgnstld, all parentfpstructs (which are
generated by the typecheckpass of the loadparentfpnode) must be
generated before pass_1 starts
git-svn-id: trunk@32559 -
* extend tcallnode with the ability to pass a tspecializationcontext so that tcallcandidates can do a final specialization
* the final procdef is registered at the end of tcallnode.pass_typecheck
git-svn-id: trunk@31763 -