*In normal procedure "var" and "out" RawByteString parameters does not accept other string types. Procedures with
"compilerproc" directive or the newly added "rtlproc" directive accept that. Please note that it is up to the
procedure coder to ensure the correctness of the code page in that case. The new directive is needed to handle
the RTL procedures/functions that are not marked as "compilerproc" such as "UniqueString", "Insert" and "Delete".
*Correct "fpc_ansistr_concat" to handle code page correctly.
*Default "ansitring" type is now created with code page set to "0" instead of "65535". Before that change it was
impossible to distinguish a "RawByteString" with the default "ansistring". At runtime "ansistring" variable'code
page is set to DefaultSystemCodePage
*UniqueString flavor of "SetLength" has been updated to release memory when shrinked to at least 50%, like ansitring
does.
git-svn-id: trunk@19118 -
is real before transforming a multiply into an sqr operation (fixes make
cycle after r18252, don't know where or even how it caused a wrong
optimization)
git-svn-id: trunk@18257 -
- allow pointermath for pchar, pwidechar, array[] of char and array[] of widechar without pointermath directive,
- don't check tpointerdef().has_pointer_math if this is not a tpointerdef
This fixes testsuite regression (tbs/tb0439.pp)
git-svn-id: trunk@16679 -
is_implicit_pointer_object_type() to better indicate the purpose of
that routine, and to avoid having to change its name every time
a new object type with this property is added
git-svn-id: trunk@16664 -
from the unit initialisation sections to the variable declaration sections
to prevent the base units from overriding derived classes (based on patch
by Hans-Peter Dietrich, mantis #17516)
git-svn-id: trunk@16118 -
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 -
properties/behaviour of the equivalent of Extended in C (i.e., to
"long double" on i386 and x86_64 platforms that support a 10 byte
long double, and to "double" elsewhere)
git-svn-id: trunk@14912 -
compares by avoiding unnecessary sign extensions (fixes bug reported in
http://lists.freepascal.org/lists/fpc-pascal/2010-January/023907.html )
* never throw away int2int type conversions on bitpacked loads, because
in these cases the proper bits still need to be selected
git-svn-id: trunk@14892 -
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 -
it doesn't have to duplicate any type checking code, and so constant
expressions get the same resultdefs as non-constant expressions
* properly fixed resultdef determination of "set + setelementn" (follows
same rules now as "set + set")
* also convert "longint or/xor cardinal" to int64 (needed for correct
results with negative numbers and Delphi-compatible) + test
* extended 64-to-32 type conversion simplification to also handle
or/xor nodes (so if the result is typecasted back to 32 bit, the
evaluation can still be done entirely in 32 bit). These changes also
enable that optimization in some extra cases (not just anymore for
expressions containing only uint32)
git-svn-id: trunk@10418 -
pass to pass 1 (where most optimizing transformations are located,
and because the way it's written it goes wrong if left and right are
a constant, and I'm working on moving the simplify code after the
typechecking code so the resulttype for constant and non-constant
expressions can be the same)
git-svn-id: trunk@10396 -