+ added test
* adjusted test tw9673 which should have never worked as is (what if TList would have been "of T" instead of "of byte"?)
git-svn-id: trunk@36468 -
* 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 -
Since overloading compilerprocs does not work each procedure got its own unique name, but they are using the new compilerproc extension to map them to the Insert and Delete symbol so that error messages can be shown with the respective name for the procedure declarations instead of fpc_shortstr_delete for example.
git-svn-id: trunk@33895 -
pexpr.pas:
* handle_factor_typenode: rework code for records and objects so that Delphi style specializations are handled as well
* sub_expr.generate_inline_specialization: also do a typecheck pass on pload to be sure that we have a resultdef
+ added tests
git-svn-id: trunk@33876 -
pexpr.pas, sub_expr.generate_inline_specialization:
* do_member_read() needs to happen independently of whether we're calling a method of the same object (was incorrectly copypasted code... :/ )
+ added test
git-svn-id: trunk@33875 -
The result type of the intrinsic is determined by the Then-expression to provide a bit of control. There might however be some situations in which this fails, for this exceptions need to be added (e.g. a constant string needs to be converted to a normal string).
compinnr.inc:
+ add new constant in_ifthen_x_y_z for the IfThen() intrinsic
psystem.pas:
+ create_intern_symbols: add symbol for IfThen() intrinsic
pexpr.pas:
* statement_syssym: parse parameters of IfThen() intrinsic and return corresponding inline node
ninl.pas, tinlinenode:
+ new method handle_ifthen() which converts the inline node to an if-node which assigns the expressions to a temp node that is returned
* pass_typecheck: handle in_ifthen_x_y_z using handle_ifthen()
* pass_1: in_ifthen_x_y_z does not need a first pass as it's already converted after the typecheck pass
+ added tests
git-svn-id: trunk@33036 -
support for nested types when generating an access to a static fied;
we also always do that when generating the mangled name of a static
field declaration in symcreat.make_field_static() (mantis #29030)
git-svn-id: trunk@32517 -
+ new constant inline_specialization_block_types to easily keep track of block types in which inline specialization is allowed
pexpr.pas:
* use new inline_specializatio_block_types instead of a inline constant set
git-svn-id: trunk@32388 -
pexpr.pas, factor.factor_read_id:
* instead of using generate_specialization() use generate_specialization_phase1() and (for non-procdefs) generate_specialization_phase2
* pass generated specialization context for procdef on to the generated call nodes which do the second part of the specialization then
git-svn-id: trunk@32384 -
pexpr.pas:
+ new enum texprflag and corresponding set texprflags
* comp_expr: replace accept_equal and typeonly with texprflags parameter
* factor: replace typeonly and hadspecialize with texprflags parameter
* sub_expr: replace accept_equal and typeonly with texprflags parameter
* adjust calls to comp_expr(), factor() and sub_expr()
other units:
* adjust calls to comp_expr(), factor() and sub_expr()
git-svn-id: trunk@32269 -
the defs and syms (recursively) referred by inline routines and by the WPO
info
o defs and syms are no longer added immediately to the module's deflist/
symlist, even if they are created as "registered". Instead,
"doregister=true" simply means "add it to the symbol table at the
top of the symtable stack"
o normally only when a sym/def is deref'ed, it gets added to the module
symlist/deflist and defid/symid gets a (unique) value
o in cases where we use(d) the defid to construct unique names within the
current module, you now have to call call the tdef.new unique_id_str()
method. If the def was not yet registered, we will reserve room for it
in the deflist (to get a unique id), but the defid gets set to a
negative value computed from its position in the deflist. Should it
have to be written to the ppu file later on, the defid will be
modified to the actual position in the deflist. For both values,
new unique_id_str() will return the same result so that references
to this def before and after actual registrations are the same (needed
for the JVM backend, but also a good principle in general)
Overall: don't directly use symid/defid anymore to get unique identifiers,
but use tdef.new unique_id_str() instead (if necessary, a similar routine
for tsym can be added)
The result is the ppu file size gets reduced significantly after its big
increase as a result of the high level typed constant builder (which creates
a lot of defs). The result is even more efficient than before, as other
unneeded defs/syms from the localsymtables don't get saved/restored anymore
either.
git-svn-id: trunk@32153 -
pexpr.pas:
* initialize srsym in the classrefdef case; it should not have let to problems, because it's only used if erroroutp1 is false which is only the case if the symbol is assigned, but better save then sorry...
git-svn-id: trunk@31887 -