* eliminate warnings in compiler (i386 & i368->x86_64) and minor refactorings
- comment out unused vars and types
- comment out unneeded comparisons (Longword <=> 0)
- suppress some "comparison always true|false" warnings
- tweak visiblity sections
git-svn-id: trunk@19385 -
that was set during the typecheck pass because typeconversion nodes
may have been optimised away previously and sometimes the resultdef is
important (e.g. for the value of callparanodes) (mantis #17458)
git-svn-id: trunk@16101 -
to objc_msgSend* into the callnode. This allows reusing the current
call node rather than having to create a new one, and is in particular
necessary because even though the objc_msgSend* functions are declared
as varargs, you're supposed to typecast them to the function type
describing the method before calling them (so they should *not* use
varargs calling conventions!)
* for the above, a field called fobjcforcedprocname has been added to the
callnode, which can be set to a string that will be used as the (mangled)
name of the function to call instead of the mangled name of the procsym
-> fixes calling obj-c methods with floating point arguments on ppc
git-svn-id: branches/objc@13783 -
associated with an Objective-C protocol. Code generator part will
always generate an internalerror currently, because it cannot yet
be implemented (needs support for generating RTTI for Objective-C
classes)
git-svn-id: branches/objc@13461 -
instantiated (for wpo)
* also replace vmt-entries for classes for which we don't have any
information at all with FPC_ABSTRACTERROR (since that means they
certainly are not instantiated), except for their published and
virtual class methods
* fixed check for published methods in wpo
git-svn-id: trunk@13219 -
o support for declaring external Objective-C classes (see
rtl/inc/objcbase.pas), including derived classes
o support for converting methods of objcclasses into selectors
(see tests/test/tobjc1.pp)
o support for loading from/storing to fields of objcclasses
o support for calling Objective-C methods using regular
Object Pascal syntax (see tests/test/tobjc1.pp)
o some things that are known to be not yet working:
o automatic conversion from ID to objcclasses and back
o declaring and implementing new objcclasses/methods in Pascal code
o debug information (objcclasses are currently plain pointers
as far as the debugger knows)
git-svn-id: branches/objc@13162 -
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
can be used cumulatively with every syntax mode. Note that a {$mode xxx}
statement resets all mode switches as well, so you cannot use the
-Mobjectivec1 variant if you have such a statement in a unit. This
modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
as the backend support is not yet implemented for other platforms.
+ implemented selector() statement that can be used to create an Objective-C
selector for the message with the specified *constant* name (in the future,
it will also work for Objective-C method identifiers)
+ added SEL type to the system unit (the selector() statement returns it)
+ added all Objective-C segments to the assembler writers
+ (currently mostly dummy) objc1 unit that is automatically included if the
{$modeswitch objectivec1} statement is used
+ some tests for the selector() statement
git-svn-id: trunk@12870 -
* store a node's verbosity in the node so that e.g. disabling warnings
also disables warnings for this node in pass_1
(the above together fix mantis #12076)
* save/restore verbosity with {$push}/{$pop} (mantis #12075)
* if warnings/notes/hints are turned off, also do not count encountered
ones for the totals (otherwise -Sew cannot be used properly in
combination with {$warnings off}, because disabled warnings will still
trigger a compiler error) -- this required adding -vw/-vn/-vh to all
tests using -Sew/-Sen/-Seh
- removed some superfluous state saving/restoring from firstpass()
git-svn-id: trunk@12025 -
* replace derefnode with resolveppuidx method that only needs to be
implemented for nodes referencing other nodes
* fix IE when a label is not defined in inline function
git-svn-id: trunk@11697 -
of u32bit values on 32 bit platforms (after the int64 values have
already been used for overload selection etc, i.e., semantically
nothing changes)
+ test which checks that not too many typecasts are optimized away
git-svn-id: trunk@9664 -
o it's a by-reference parameter, but ignore that since it's
guaranteed to be safe because of the escape analysis
o it's wrapped in an absolute type conversion -> added
actualtargetnode method to tnode which digs through that
git-svn-id: trunk@9412 -
* small cleanups of unused variables in firstpass
* node_resources_fpu() created to get an approximation of the
required fpu registers
* for the moment use node_complexity in the CG until the
node_resource_int() is created
git-svn-id: trunk@8655 -
* symtables based on TFPHashObjectList and TFPObjectList
* rename torddef.typ to torddef.ordtype
* rename tfloatdef.typ to tfloatdef.floattype
* rename tdef.deftype to tdef.typ
* remove obsolete browser code, browcol is kept so the ide
can still be compiled
git-svn-id: trunk@5192 -
allow runtime optimization if the destination is the
same as a source parameter
* tassignmentnode now sets aktassignmentnode global that can be used
to use the left node as a destination parameter and
skip the assignment
* disabled all cpu specific shortstr concat/append
git-svn-id: trunk@4770 -
tarrayconstructornode.inset_typeconvs() and fixed them:
* integers < 32 bit are converted to 32 bit (this was previously
done in the code generator for some targets, and not for others)
* currency is also converted to double for targets where currency = int64
* single is converted to double, except for x86_64 (is at least
necessary on darwin/ppc, darwin/i386 and linux/i386)
* enums are converted to 32 bit ints
* procvars are converted to pointers
* proper errors are given for various unsupported types
NOTE: in C, floating point constants are by default double, while in
FPC they are of type extended. On platforms where extended <> double,
such constants when passed to C varargs are automatically converted
to double by default (gives warning). If you want to pass them as
single or extended or get rid of the warning, use an explicit typecast
* increased ppu version because of introduction of new node flag
(nf_cvarargs for tarrayconstructornode)
* fixed tests/test/cg/tprintf
* changed tests/test/cg/cdecl/taoc5 to use explicit typecasts for
floating point constants passed to C varargs functions.
git-svn-id: trunk@2949 -