o use this to handle non-power-of-two-sized parameters for llvm
o no general support in the parser/code generator, so don't expose
git-svn-id: trunk@40398 -
An uninitialized function Result of a managed type needs special handling.
When passing it as a var parameter a warning need to be emitted, since a user
may expect Result to be empty (nil) by default as it happens with local vars
of a managed type. But this is not true for Result and may lead to serious issues.
The only exception is SetLength(Result, ?) for a string Result. A user always
expects undefined contents of the string after calling SetLength(). In such
case a hint need to be emitted.
+ Tests for this.
git-svn-id: trunk@40216 -
(mantis #32179)
- removed code to handle conversion to formaldef parameters that are not by
reference (so the default conversion preference is kept)
git-svn-id: trunk@40012 -
* 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 -
only used in combination with subscriptn/vecn to determine whether the
target is assignable (and we return true immediately if you subscript
or index an implicit pointer type -- also for classrefdef now)
o disallow assigning something to fields of records returned by functions
(that would be assigned to a temp and get lost anyway)
git-svn-id: trunk@35313 -
where it used to be set to true (dereferencing a pointer always means
that regardless of what the pointer was, the resut is assignable)
(mantis #22979)
o also removed gotpointer, since it was only used in combination with
gotderef
git-svn-id: trunk@35308 -
the scope penalty relative to the nearest symtable that contains one of
the applicable overloads, rather than relative to the nearest symtable
that simply contains a method with this name (based on patch by
Maciej Izak, mantis #25607)
git-svn-id: trunk@35089 -
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 -
htypechk.pas, tcallcandidates:
* create_candidate_list: check the correct tableoptions for sto_has_overload flag
+ added test
git-svn-id: trunk@33211 -
htypechk.pas, tcallcandidates:
* create_candidate_list: don't check whether the pd is a specialization if the owner is valid; happens if a generic method is used more than once (which should happen here and then :P )
+ added test
git-svn-id: trunk@33037 -
* 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 -
dynamic arrays and fixed-length static arrays when looking for
overloads of array constructors, while these are not valid in
such cases (and it also gave an error afterwards when trying to
actually use them). This caused a lot of spurious "can't select
which overloaded routine to call" errors when using many JVM
routines
git-svn-id: trunk@29393 -
htypechk.pas, tcallcandidates:
* collect_overloads_in_struct: we need to check the deftyp of the extended def for record- or objectdef, not the deftyp of the helper which will always be objectdef anyway.
+ added test
git-svn-id: trunk@28572 -
defcmp.pas:
+ add new function "def_is_related" which combines the "is_related" overloads of "tobjectdef", "trecorddef" and "tstringdef" (it returns "false" for other def types which is what "tdef.is_related" did)
* compare_defs_ext & compatible_childmethod_resultdef: change call from "x.is_related" to "def_is_related(x,...)"
symtype.pas, tdef:
- remove "is_related" method
symdef.pas:
- remove "is_related" in "tobjectdef", "trecorddef" and "tstringdef"
* tobjectdef.needs_inittable: for checking whether a Corba interface somehow inherits from a IInterface don't use "is_related" anymore (we want to avoid the dependency after all), but mimic the necessary functionality of "def_is_related"
htypechk.pas, nadd.pas, ncal.pas, ncnv.pas, ngtcon.pas, nld.pas, optvirt.pas, pdecobj.pas, pdecvar.pas, pexpr.pas, pgenutil.pas:
* change call from "x.is_related" to "def_is_related(x,...)"
symtable.pas
+ use unit defcmp
* change call from "x.is_related" to "def_is_related(x,...)"
jvm/njvmcnv.pas, jvm/njvmflw.pas:
* change call from "x.is_related" to "def_is_related(x,...)"
git-svn-id: trunk@25847 -
symconst.pas:
+ add "sto_has_operator" to "tsymtableoption"
pdecsub.pas:
+ include the flag "sto_has_operator" for all operator declarations and their owning symtables
htypechk.pas, tcallcandidates:
* create_candidate_list: only check for operator overloads if the record does indeed declare some
* collect_overloads_in_units: only check for operator overloads if the unit does indeed declare some
utils/ppudump.pp:
+ respect the new "sto_has_operator" flag
git-svn-id: trunk@23688 -