A tests/webtbs/tw29321.pp
U compiler/pexpr.pas
--- Recording mergeinfo for merge of r32845 into '.':
U .
# revisions: 32845
git-svn-id: branches/fixes_3_0@33862 -
U .
--- Merging r32990 into '.':
A tests/webtbs/tw29372.pp
U compiler/ncgcal.pas
--- Recording mergeinfo for merge of r32990 into '.':
U .
--- Merging r33054 into '.':
U compiler/symdef.pas
--- Recording mergeinfo for merge of r33054 into '.':
G .
--- Merging r33110 into '.':
A tests/webtbs/tw29609.pp
U compiler/pexpr.pas
--- Recording mergeinfo for merge of r33110 into '.':
G .
--- Merging r33211 into '.':
U compiler/htypechk.pas
A tests/webtbs/tw29792.pp
--- Recording mergeinfo for merge of r33211 into '.':
G .
--- Merging r33214 into '.':
A tests/webtbs/tw29745.pp
G compiler/symdef.pas
--- Recording mergeinfo for merge of r33214 into '.':
G .
# revisions: 31987,32990,33054,33110,33211,33214
git-svn-id: branches/fixes_3_0@33416 -
A tests/webtbs/tw28475.pp
U compiler/ncnv.pas
--- Merging r31193 into '.':
U compiler/optcse.pas
A tests/webtbs/tw27210.pp
--- Merging r31263 into '.':
U compiler/options.pas
--- Merging r31335 into '.':
U compiler/dbgdwarf.pas
--- Merging r31466 into '.':
U compiler/arm/narmset.pas
--- Merging r31488 into '.':
U rtl/inc/astrings.inc
--- Merging r31572 into '.':
U compiler/arm/aasmcpu.pas
--- Merging r31608 into '.':
U compiler/x86/nx86cal.pas
--- Merging r31680 into '.':
U packages/chm/src/chmcmd.lpr
--- Merging r31851 into '.':
U rtl/jvm/math.inc
--- Merging r31956 into '.':
U tests/tbs/tb0320.pp
--- Merging r31976 into '.':
U rtl/linux/x86_64/cprt0.as
--- Merging r31980 into '.':
U compiler/systems/t_linux.pas
--- Merging r32043 into '.':
U compiler/cclasses.pas
--- Merging r32066 into '.':
G rtl/inc/astrings.inc
A tests/webtbs/tw28850.pp
--- Merging r32168 into '.':
U rtl/unix/cthreads.pp
--- Merging r32244 into '.':
U packages/fpmkunit/src/fpmkunit.pp
--- Merging r32259 into '.':
U compiler/x86/agx86int.pas
--- Merging r32338 into '.':
G compiler/ncnv.pas
--- Merging r32342 into '.':
G compiler/ncnv.pas
--- Merging r32368 into '.':
A tests/webtbs/tw29040.pp
U compiler/x86/rax86int.pas
--- Merging r32399 into '.':
U packages/fcl-res/src/machodefaulttarget.inc
--- Merging r32410 into '.':
U compiler/ncgset.pas
--- Merging r32454 into '.':
U compiler/jvm/pjvm.pas
U tests/test/jvm/testall.bat
A tests/test/jvm/tprocvaranon.pp
U tests/test/jvm/testall.sh
--- Merging r32517 into '.':
U compiler/nutils.pas
U compiler/pexpr.pas
A tests/webtbs/tw29030.pp
--- Merging r32527 into '.':
U rtl/linux/powerpc64/gprt0.as
U rtl/linux/powerpc64/cprt0.as
--- Merging r32528 into '.':
U rtl/linux/powerpc64/prt0.as
--- Merging r32549 into '.':
U compiler/jvm/njvmcon.pas
U compiler/jvm/njvmcnv.pascd ..
--- Merging r32584 into '.':
U compiler/utils/ppuutils/ppudump.pp
--- Merging r32599 into '.':
U compiler/paramgr.pas
git-svn-id: branches/fixes_3_0@32671 -
U compiler/ncgvmt.pas
--- Merging r30217 into '.':
U compiler/comprsrc.pas
--- Merging r30261 into '.':
A tests/webtbs/tw27691.pp
U compiler/pmodules.pas
--- Merging r30265 into '.':
U compiler/fmodule.pas
G compiler/pmodules.pas
--- Merging r30272 into '.':
A tests/webtbs/tw27517.pp
U compiler/pexpr.pas
--- Merging r30427 into '.':
U compiler/x86/cpubase.pas
--- Merging r30465 into '.':
U compiler/utils/ppuutils/ppudump.pp
--- Merging r30487 into '.':
U rtl/inc/cgenstr.inc
--- Merging r30502 into '.':
U compiler/x86/nx86inl.pas
U compiler/arm/narminl.pas
U compiler/ppcgen/ngppcinl.pas
A tests/webtbs/tw27811.pp
--- Merging r30656 into '.':
U compiler/psub.pas
--- Merging r30765 into '.':
U compiler/arm/narmcnv.pas
U compiler/sparc/ncpucnv.pas
U compiler/m68k/n68kcnv.pas
U compiler/mips/ncpucnv.pas
U compiler/ppcgen/ngppccnv.pas
C compiler/aarch64/ncpucnv.pas
A tests/webtbs/tw28007.pp
git-svn-id: branches/fixes_3_0@32665 -
U compiler/powerpc/cgcpu.pas
U compiler/powerpc/cpubase.pas
U compiler/powerpc64/cgcpu.pas
U compiler/ncgutil.pas
U compiler/ppcgen/hlcgppc.pas
A tests/webtbs/tw27634.pp
--- Merging r30169 into '.':
U compiler/pdecobj.pas
A tests/test/tobjc43.pp
--- Merging r30177 into '.':
U compiler/pexpr.pas
A tests/test/tmacfunret2.pp
--- Merging r30178 into '.':
U compiler/options.pas
--- Merging r30204 into '.':
U compiler/i8086/cpupara.pas
--- Merging r30208 into '.':
U compiler/powerpc64/cpubase.pas
U compiler/powerpc64/itcpugas.pas
--- Merging r30209 into '.':
U rtl/linux/si_intf.inc
--- Merging r30219 into '.':
U compiler/powerpc64/cpupara.pas
# revisions: 30164,30169,30177,30178,30204,30208,30209,30219
git-svn-id: branches/fixes_3_0@30252 -
Please note that this warning won't be triggered if an instance of that class is created using a class variable of that class type as the compiler can not know the type contained in the variable at compile time (see also the added test).
+ msg/errore.msg: added disabled message which informs about the instantiation of an abstract class
* pexpr.pas, do_member_read: generate the message if we have a constructor call for an abstract class using a loadvmtaddrnode (thus the type name is used and not a class variable)
* msg{idx,txt}.inc: updated
+ added test
git-svn-id: trunk@28127 -
the result of a objtype.method2 call, ensure that we call method2 with
objtype as methdpointer rather than the self node of the current routine
(mantis #24844)
git-svn-id: trunk@27977 -
pbase.pas:
+ add an overload for identifier_not_found for which the file position can be supplied
pexpr.pas, factor_read_id:
* store the file position before reading the identiifer token
* use the new identiifer_not_found overload to explicitely set the file position
* set the file position of the created node
git-svn-id: trunk@27947 -
* ptype.pas, id_type:
generate the "identifier not found" message only if the identifier was really not found and not when the identifier is a non-type
* pexpr.pas, statement_syssym:
don't generate the "type id expected" error message for Default() anymore; this is already handled by single_type
+ added test (though this again will not help much as output is not parsed...)
git-svn-id: trunk@27464 -
o made all (non-abstract) tdef and tsym constructors virtual
o added c*def/c*sym classref types for every (non-abstract) t*def/t*sym
class
o added cpusym unit for every architecture that derives a tcpu*def/tcpu*sym
class from the base classes, and initialises the c*def/c*sym classes with
them. This is done so that the llvm target will be able to derive from
the tcpu*def/sym classes without umpteen ifdefs, and it also means that
the WPO can devirtualise everything because the c* variables are only
initialised with one class type
o replaced all t*def/t*sym constructor calls with c*def/c*sym constructor
calls
git-svn-id: trunk@27361 -
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 -
pgenutil.pas:
+ add new function could_be_generic which checks whether a given symbol name could be a generic (which is determined using the genericdummysyms list for the current module)
pexpr.pas:
* factor: only do a typecheck pass (postfixoperators does one as well) if the found node can not be a generic type
* sub_expr: do a typecheck pass if it isn't a specialization
+ added test
git-svn-id: trunk@25579 -
symtable.pas:
+ add new tsymbol_search_flag type which can be passed to various searchsym* routines
+ add support to not call "addsymref"
+ add new searchsym_with_flags function that calls searchsym_maybe_with_symoption
* adjust searchsym_maybe_with_symoption, searchsym_in_class & searchsym_in_helper to use new flag type instead of Boolean arguments
* adjust searchsym & searchsym_with_symoption which call the modified functions
nutils.pas, handle_staticfield_access:
* adjust searchsym_in_class call
pexpr.pas, handle_factor_typenode, postfixoperators, factor:
* adjust searchsym_in_helper and searchsym_in_class calls
pinline.pas, new_function:
* adjust searchsym_in_class call
scanner.pas, try_consume_nestedsym:
* adjust searchsym_in_class call
fmodule.pas, tmodule:
+ add genericdummysyms field which is a TFPHashObjectList that contains TFPObjectList instances per generic dummy that in turn contains tgenericdummysyms instances
pgenutil.pas:
+ add function split_generic_name to split a generic name into non-generic name and count value of type parameters
+ add function resolve_generic_dummysym which tries to use the new genericdummysyms field to find the real symbol of a dummy sym
* generate_specialization: adjust searchsym_in_class call
* specialization_init/specialization_done: save/restore genericdummysyms of module
symdef.pas, tdefawaresymtablestack:
+ add new intermediate method pushcommon which is used by both push and pushafter
+ add new intermediate method remove_helpers_and_generics (which calls remove_generics and remove_helpers if necessary)
* rename removehelpers to remove_helpers
* rename addhelpers to add_helpers_and_generics and extend it to correctly fill current_module.genericdummysyms
* call remove_helpers_and_generics from pop instead of remove_helpers
ptype.pas, single_type, read_named_type.expr_type, read_named_type:
* try to resolve symbols with sp_generic_dummy with resolve_generic_dummysym
+ added test
git-svn-id: trunk@25519 -
- move operator_levels to topens.pas - it is used from 2 units now
- implement pexpr like sub_expr for preprocessor expressions
- implement +,-,*,/ expressions for the moment
* move OR, AND, IN implemenetation to the new logic
git-svn-id: trunk@25465 -
type with a non-default code page
TODO: ensure that string constants typecasted to ansistring become
ansistrings rather than typeless string constants
git-svn-id: trunk@25207 -
symconst.pas:
+ extend "thelpertype" by "ht_type" which tells the code in "pdecobj.parse_extended_type" that a type helper declaration has been parsed
node.pas:
+ add a constant which identifies all constant node types
ptype.pas:
+ read_named_type: add a parameter "hadtypetoken" to tell the code whether a "type" token had been parsed before
+ read_named_type: if an identifier "helper" is parsed we need to check whether "hadtypetoken" is true and the modeswitch "m_class" is set, but the "m_delphi" one is not; in that case we have a "type helper" declaration
pgenutil.pas, generate_specialization:
* adjust call to read_named_type
pdecl.pas, types_dec:
* adjust call to read_named_type
pdecobj.pas:
* parse_extended_type: extend for correct handling of primitive types (includes Delphi compatible handling as well) and reject types that are explicitly not allowed
* method_dec: require "static" for class methods in type helpers
* method_doc: allow constructors for type helpers as well
paramgr.pas, tparamanager:
* set_common_funcretloc_info: handle type helper constructors like record constructors
* handle_common_ret_in_param: the "self" value of a type helper constructor is also returned in a parameter
pexpr.pas:
+ add a function to postfixoperators which tries to find and apply a type helper for a given type
* postfixoperators: try to apply type helpers for ordinal constants
* postfixoperators: use the correct string type for string constants
* postfixoperators: try to apply type helpers for enum constants
* postfixoperators: try to apply type helpers for arrays
* postfixoperators: try to apply type helpers for Variant
* postfixoperators: try to apply type helpers for pointer types
* postfixoperators: try to apply type helpers for other types
* factor: check postfixoperators after _REALNUMBER, _CCHAR, _CWCHAR, _TRUE and _FALSE
* factor: also check postfixoperators if a _POINT follows a _NIL
symdef.pas, tdefawaresymtablestack.addhelpers:
* use "generate_objectpascal_helper_key" to generate the key
symtable.pas:
+ add function to generate the key value for the map of extended types using the extended def
* adjust "search_last_objectpascal_helper" and "search_objectpascal_helper" to handle primitive types as well
* use the new "generate_objectpascal_helper_key" function to generate the key
pparautl.pas:
* insert_self_and_vmt_para: don't insert the $vmt symbol for record or type helpers (ToDo: check whether class helpers really need the symbol as well)
* insert_self_and_vmt_para: pass "self" as var parameter for type helpers as well
psub.pas, generate_bodyentry_block:
* also allow type helpers for constructor methods
ncal.pas, tcallnode.gen_self_tree:
* also use a temp variable for type helper constructors
ncgcal.pas, tcgcallnode.secondcallparan:
* allow Pointers to be passed as address param if it is the Self value of a type helper extending a pointer type
* correctly handle the location in case of type helper constructors
+ add tests
git-svn-id: trunk@23580 -
Note: the error messages for incorrect "misstyled" floating point numbers (e.g. "2e10foo") have changed because of this.
scanner.pas, tscannerfile.readtoken:
instead of tokenizing "2.", "2.e10", "2.e+10" and "2.e-10" as "_REALNUMBER" tokenize them as "_INTCONST _POINT", "_INTCONST _POINT _ID", "_INTCONST _POINT _ID _PLUS _INTCONST" "_INTCONST _POINT _ID _PLUS _INTCONST"; tokenizing of normal floating constants is not changed
pexpr.pas:
factor:
* extract the code for creating a new constant floating point from "factor" into a new function "real_const_node_from_pattern"
+ allow the parsing of postfixoperators for integer constants if a "." is encountered
+ postfixoperators: check for a "misstyled" floating point number if an ordinal const (not an enum and not a boolean) is encountered (the code is already partially prepared for type helper support)
+ Added tests
git-svn-id: trunk@23356 -
symconst.pas:
+ extend "tdefoptions" by a "df_genconstraint" which will be used to mark dummy defs that should mainly satisfy the compiler's type checking without to much changes
symsym.pas:
+ add a class "tgenericconstraintdata" which will hold information about the constraints associated with a specific generic type parameter (designed for future extensions)
+ extend "ttypesym" by a reference to a "tgenericconstraintdata" which is written to the ppu only if needed
symtype.pas:
+ add a pointer to "tderef" as this is needed for the ppu reading/writing code for the "tgenericconstraintdata"
pdecl.pas, types_dec:
+ call "parse_generic_parameters" so that constraints are allowed
pgenutil.pas:
+ extend "generate_specialization" by a "parsedpos" to give in the file position of the first parsed parameter (needed for correct error locations when checking the constraints)
+ add an overloaded call of "generate_specialization" to differentiate between the use cases "first parameter parsed by generate_specialization" and "first parameter parsed by other code"; this also allows to write the "fillchar" for the "parampos" parameter only once ( => otherwise a warning is triggered => error in compilation)
+ extend the "parse_generic_specialization_types" by a "poslist" parameter which will contain the positions of all parsed type parameters (can only be used in the case that all parameters are parsed)
* move the original code of "parse_generic_specialization_types" to a new procedure "parse_generic_specialization_types_internal" which take an additional "parsedpos" parameter which will be added to the "poslist" before all others; "parse_generic_specialization_types" calls this new procedure with a dummy argument (which won't be used)
+ extend "parse_generic_parameters" by the parsing of generic constraints which constructs correct defs for the parameters and fills in the new "tgenericconstraintdata" object for each parameter (note: the "constructor" constraint is only parsed for Delphi compatibility and basically means the same as a "class" constraint... (it's a relict of Delphi.NET))
* adjust "insert_generic_parameter_types" as specializations and generics can no longer be differed by whether the type parameters are of type "undefineddef"
pdecsub.pas, parse_proc_head, consume_generic_interface:
* adjust call to "generate_specialization"
+ add a new function "check_generic_constraints" which is used from within "generate_specialization" to ensure that the given specialization parameters are compatible with the constraints of the generic parameters
ptype.pas:
* single_type: adjust call to "generate_specialization"
* read_named_type, expr_type: adjust call to "generate_specialization"
+ write_persistent_type_info: don't write typeinfo for constraints
pexpr.pas, sub_expr:
* adjust call to "generate_specialization"
* adjusted ppudump, because of added "tdefoptions.df_genconstraint" value
+ added tests for generic constraints
* modified test for class helper inside a generic which extends a class type parameter
+ added test for record helper inside a generic which extends a record type parameter
git-svn-id: trunk@23158 -
methods of tpropertysym (refactoring)
* turned code to copy the contents of a property into another one
into a method of tpropertysym (refactoring)
git-svn-id: trunk@22955 -