"class" keyword like for regular Object Pascal classes, not using the
"objcclass" keyword. E.g.: NSObjectClass = class of NSObject;
* modified tobjc18 to test this functionality
git-svn-id: branches/objc@13701 -
type definitions (was at the position of the invalid x type in
"class of x", rather than at the position of the "class of x" definition
itself)
git-svn-id: trunk@13555 -
starting with a previous 2.3.1 or compiler built from the objc branch
+ added basic objcprotocol support (only for external protocols
currently)
o use in type declaration: "type xp = objcprotocol ... end;"
o when defining a root class that implements it:
"type yc = objcclass(xp) ... end" (note: no support yet
for something like "objcclass(id,xp)" or so)
o when defining a non-root class that implements a protocol:
"type zc = objcclass(nsobject,xp) ... end"
o includes support for "required" and "optional" sections
o no support yet for the objcprotocol(<protocol>) expression
that enables getting a class instance representing the
protocol (e.g., for use with "conformsToProtocol:")
o message names have to specified in protocol declarations,
but if an objcclass implements a protocol, the message names do
not have to be repeated (but if they are, they have to match;
the same goes when overriding inherited methods)
+ allow specifying the external name of Objective-C classes and
protocols, since classes and protocols can have the same name
(and you cannot use the same Pascal identifier in such caseq)
+ added NSObject protocol, and make the NSObject class use it
+ added missing NSObject class methods that have the same name
as instance methods (added "class" name prefix to avoid clashes)
* fixed several cases where the compiler did not treat Objective-C
classes/protocols the same as Object Pascal classes/interfaces
(a.o., forward declarations, alignment, regvars, several type
conversions, ...)
* allow "override" directive in objcclass declarations, and print
a hint if it's forgotten in an external declaration (because it
doesn't really matter there, and may make automated header
conversion harder than necessary) and an error if will be used in
a non-external declaration (because it is not possible to start
a new vmt entry-tree in Objective-C, you can only override parent
methods)
* reject objcclasses/protocols as parameters to typeof()
* don't try to test VMT validity of objcclasses/protocols
git-svn-id: branches/objc@13375 -
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 -
for programs. this allows speciailizations to be done in the interface
part of the unit
* support tobject.typemember.typemember nesting for generics
* fix generic parameter checking when a typemember was created with the
type of a parameter
* known issue is nested specializations don't work yet because the token
replay can't handled nested replays yet
git-svn-id: trunk@11404 -
a) cpu64bitaddr, which means that we are generating a compiler which
will generate code for targets with a 64 bit address space/abi
b) cpu64bitalu, which means that we are generating a compiler which
will generate code for a cpu with support for 64 bit integer
operations (possibly running in a 32 bit address space, depending
on the cpu64bitaddr define)
All cpus which had cpu64bit set now have both the above defines set,
and none of the 32 bit cpus have cpu64bitalu set (and none will
compile with it currently)
+ pint and puint types, similar to aint/aword (not pword because that
that conflicts with pword=^word)
* several changes from aint/aword to pint/pword
* some changes of tcgsize2size[OS_INT] to sizeof(pint)
git-svn-id: trunk@10320 -
for qwordbool) + test:
o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
o these types are now all signed
o converting an integer type to a byte/word/long/qwordbool using an
explicit type cast keeps the integer's original value stored in the
bool, instead of forcing it to ord(true)/ord(false)
(mantis #10233 and #10613, implemented for all architectures, testsuite
tested for ppc32, sparc and x86)
* fixed some places where the rtl depended on longbool(true) having the
value 1
* extended several boolean tests (and adapted some to no longer assume
that byte/word/long/qwordbool(true)=1)
+ support for converting to qwordbool in second_int_to_bool for x86, ppc
and sparc
git-svn-id: trunk@9898 -
is <> 0 (Delphi compatible now, + various tests)
+ support for enums and sets in is_in_limit()
* fixed converting smallset expressions to varsets
* improved choosing an appropriate common set type when mixing
set types in an expression
- removed no longer used normalset code from nadd.pas
- disabled large set (>256 elements) support for now, because
they are not yet supported entirely throughout the compiler
and this causes errors at run time in several situations
git-svn-id: trunk@8515 -
* fix rtti generation
* rtti is now written at the end of a module when all info is available,
this prevents some duplicate rtti entries cause by inheritance
git-svn-id: trunk@5363 -
* 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 -
Not sure how it ever worked, nor how exactly symtable ppu entries
work -- but it's now stored with the recorddef (which also means
that bitpacking is disabled currently for objects and classes,
since they are based on tabstractrecorddef rather than trecorddef)
git-svn-id: trunk@4679 -
+ use {$bitpacking on/+} to change the meaning of "packed"
into "bitpacked" for arrays. This is the default for MacPas.
You can also define individual arrays as "bitpacked", but
this is not encouraged since this keyword is not known by
other compilers and therefore makes your code unportable.
+ pack(unpackedarray,index,packedarray) to pack
length(packedarray) elements starting at
unpackedarray[index] into packedarray.
+ unpack(packedarray,unpackedarray,index) to unpack
packedarray into unpackedarray, with the first
element being stored at unpackedarray[index]
* todo:
* "open packed arrays" and rtti for packed arrays are not
yet supported
* gdb does not properly support bitpacked arrays
git-svn-id: trunk@4449 -