* fix for Mantis #38145: allow overloading of assignment operators that return ShortStrings with a specific size
+ added tests
The following rules for using these operator overloads as *implicit* overloads apply (Delphi compatible):
- if a found assignment operator returns a default ShortString then that is used
- if only one assignment operator to a String[x] is found then that is used
- otherwise the assignment is not possible
The explicit assignment checks for an exact match (and falls back for an implicit assignment). This is not entirely Delphi compatible as Delphi seems to favor the first found symbol in that case, but sometimes also not... :/
........
* with the recent ShortString changes this test is no longer needed as it was added exactly to check the condition I removed, so disable it for 3.2.1 and newer (as I want to merge these changes back to fixes)
........
git-svn-id: branches/fixes_3_2@49055 -
U compiler/blockutl.pas
U compiler/jvm/njvmutil.pas
U compiler/jvm/pjvm.pas
U compiler/ncal.pas
U compiler/ninl.pas
U compiler/pdecl.pas
U compiler/pdecsub.pas
U compiler/pdecvar.pas
U compiler/pexpr.pas
U compiler/pgenutil.pas
U compiler/pmodules.pas
U compiler/pparautl.pas
U compiler/pstatmnt.pas
U compiler/psub.pas
U compiler/psystem.pas
U compiler/ptype.pas
U compiler/symcreat.pas
U compiler/symdef.pas
U compiler/symsym.pas
U compiler/symutil.pas
--- Recording mergeinfo for merge of r42998 into '.':
U .
--- Merging r43116 into '.':
G compiler/symsym.pas
A tests/webtbf/tw36114.pp
--- Recording mergeinfo for merge of r43116 into '.':
G .
# revisions: 42998,43116
git-svn-id: branches/fixes_3_2@43442 -
------------------------------------------------------------------------
r41425 | pierre | 2019-02-23 23:03:29 +0000 (Sat, 23 Feb 2019) | 11 lines
+ compiler/symdef.pas: Add missing call to tderef.reset methods in all tdef constructors.
+ compiler/sysmsym.pas: Do the same for for all tsym constructors.
+ compiler/symtype.pas: Generate internalerror in tcompilerppufile.putderef
if a deref field has index -1, as this means that buildderef was not called
while it should have been called.
+ compiler/symtable.pas: Fix bug report itself by adding an extra local variable
CHANGED to add extra cycles in tstoredsymtable.buildderef_referenced method.
New tests for this bug report: tests/webtbs/tw35139.pp and tests/webtbs/tw35139a.pp
------------------------------------------------------------------------
--- Merging r41425 into '.':
U compiler/symtype.pas
U compiler/symdef.pas
U compiler/symsym.pas
U compiler/symtable.pas
A tests/webtbs/tw35139.pp
A tests/webtbs/tw35139a.pp
--- Recording mergeinfo for merge of r41425 into '.':
U .
git-svn-id: branches/fixes_3_2@41620 -
------------------------------------------------------------------------
r40142 | jonas | 2018-11-01 13:19:33 +0000 (Thu, 01 Nov 2018) | 2 lines
* ttryfinallynode now inherits from tbinarynode instead of tloopnode, as its
t1 field was always set to tnothingnode
------------------------------------------------------------------------
--- Merging r40142 into '.':
U compiler/i386/n386flw.pas
U compiler/nflw.pas
U compiler/x86_64/nx64flw.pas
U compiler/nutils.pas
U compiler/ppu.pas
U compiler/ncgflw.pas
U compiler/psub.pas
--- Recording mergeinfo for merge of r40142 into '.':
U .
------------------------------------------------------------------------
r40189 | jonas | 2018-11-02 21:12:18 +0000 (Fri, 02 Nov 2018) | 2 lines
* fixed overzealous removal of an assigned(t1) check in r40142 (it was for a
ttryexceptnode instead of for a ttryfinally node)
------------------------------------------------------------------------
--- Merging r40189 into '.':
G compiler/x86_64/nx64flw.pas
--- Recording mergeinfo for merge of r40189 into '.':
G .
------------------------------------------------------------------------
r40347 | pierre | 2018-11-18 10:32:13 +0000 (Sun, 18 Nov 2018) | 3 lines
* Use getasizeint/putasizeint for tfieldvarsym.fieldoffset
* Change CurrentPPUVersion
------------------------------------------------------------------------
--- Merging r40347 into '.':
G compiler/ppu.pas
U compiler/utils/ppuutils/ppudump.pp
U compiler/symsym.pas
--- Recording mergeinfo for merge of r40347 into '.':
G .
git-svn-id: branches/fixes_3_2@40717 -
* 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 -
always be different from the old location, since we just allocated
the registers for the new one above. Should the old registers ever
be needed again for tai_varloc: rr.old/rr.oldhi contains it
git-svn-id: trunk@34086 -
o avoid having to save and restore the original info
o avoids problems in case determining the regable state depends on variables
that may not have been initialised yet at that point (such as
voidpointertype/voidcodepointertype in case the size of procvardefs needs
to be calculated by the regable-determining code)
git-svn-id: trunk@33179 -
Extract functionality that is shared between the metadata files for units (PPU) and for packages (PCP) into a parent class called tentryfile
+ add new unit entfile which contains the new tentryfile class and related types and constants
* ppu.pas:
- remove methods, fields, types and constants which were moved to entfile.pas
* replace the parts of tppuheader shared with tentryheader by a field of type tentryheader
fppu.pas, pmodules.pas, utils/ppumove.pp, utils/ppuutils/ppudump.pp:
+ add entfile to uses
* adjust access to common header fields
node.pas, symdef.pas, symsym.pas, symtable.pas, wpoinfo.pas, utils/ppufiles.pp:
+ add entfile to uses
........
git-svn-id: trunk@32976 -
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 -
don't need a separate field for this
o changed the order in which symid and realname are stored to/loaded from
the ppufile (because tsym.create now initialised tsym.symid, and it's
called from ppuload) -> increased ppu version
git-svn-id: trunk@32031 -
* for now all typesyms are created as registered
Note: an additional parameter instead of an overload is used for ttypesym.create as otherwise both constructors would need to be overridden in potential descendant CPU-specific classes...
git-svn-id: trunk@31591 -
+ add an overload of check_hints() that allows to specify the current file position
* have the previous check_hints() procedure be an inline procedure as it simply calls the new overload
git-svn-id: trunk@31513 -
llvm
* instead, add LLVM-specific name mangling based on the asmsymbol's bind
and typ whenever we write out its name
git-svn-id: branches/hlcgllvm@28166 -
o only create an accessor wrapping the inherited accessor at a
potentially lower visibility level if the overriding property
itself does not specify a different accessor to use
o simplified code
o tests
git-svn-id: trunk@27954 -