o always create exceptvarsym entry for on-nodes (on all targets) to remove
some special cases when an unnamed exception was caught
o the JVM tryfinally node generates the finally code twice: once for the
case where no exception occurs, and once when it does occur. The reason
is that the JVM's static bytecode verification otherwise cannot prove
that we will only reraise the caught exception when we caught one in
the first place (the old "jsr" opcode to de-duplicate finally code
is no longer used in JDK 1.6 because it suffered from the same problem,
see Sun Java bug
http://webcache.googleusercontent.com/search?q=cache:ZJFtvxuyhfMJ:bugs.sun.com/bugdatabase/view_bug.do%3Fbug_id%3D6491544 )
git-svn-id: branches/jvmbackend@18387 -
nutils.pas into virtual class methods of a new tnodeutils class defined
in ngenutil (global factory: cnodeutils), so they can be overridden by
architecture-specific implementations (required by the JVM backend)
git-svn-id: branches/jvmbackend@18364 -
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 -
- rename tprocdef._class to tprocdef.struct and change the type from tobjectdef to tabstractrecorddef because methods can belong not to classes only now but to records too
- replace in many places use of current_objectdef to current_structdef with typcast where is needed
- add an argument to comp_expr, expr, factor, sub_expr to notify that we are searching type only symbol to solve the problem with records,objects,classes which contains fields with the same name as previosly declared type (like:
HWND = type Handle;
rec = record
hWnd: HWND;
end;)
- disable check in factor_read_id which was made for object that only static fields can be accessed as TObjectType.FieldName outside the object because it makes SizeOf(TObjectType.FieldName) imposible and since the same method was extended to handle records it also breaks a52 package compilation
- rename tcallcandidates.collect_overloads_in_class to tcallcandidates.collect_overloads_in_struct and addapt the code to handle overloads in records too
- fix searchsym_type to search also in object ancestors if we found an object symtable
- add pd_record, pd_notrecord flags to mark procedure modifies which can or can't be used with records. Disallow the next modifiers for records: abstract, dynamic, export, external, far, far16, final, forward, internconst, internproc, interrupt, message, near, override, public, reintroduce, virtual, weakexternal,
Allow the next modifiers for records: static
git-svn-id: branches/paul/extended_records@16526 -
they are constants (instead of only on 32 bit systems), and always use the
actual upper/lower bound of the loop variable instead of hardcoding the
bounds of longint (mantis #17646)
git-svn-id: trunk@16213 -
to the parser, so that it only looks at what the programmer wrote rather
than at all statements that the compiler may generate internally
(mantis #11619)
+ several tests for {$x-} mode
* modified tenumerators1 so it compiles without extended syntax enabled
(to check for..in with {$x-})
git-svn-id: trunk@15075 -
because the associated simplifications can turn invalid statements
into valid statements (based on patch by Aleksa Todorovic, mantis
#15594)
git-svn-id: trunk@14998 -
rtl: add enumerators to the basic classes
tests: add enumerators test which compiles and work both by fpc and dcc
compiler:
+ start for-in loop implementation: implement for-in loop for types (enumerations and ranges), strings, arrays and sets. todo: perform type checking, optimize array and string loops - use temp for expression, implement for-in loop for classes
test:
+ add a simple test for the 'for-in' loop
compiler: fix string for-in loop. now it uses a temp variable to store string expression result
complier: fix for-in array loop. use a temp variable for the loop expression only if loop is not an open array loop
complier: continue enumerator implementation:
+ add operator enumerator which give an ability to add enumerator for an existent type (for example to override builtin string enumerator)
+ add class enumerator support via delphi compatible GetEnumerator method + enumerator class/object template (function MoveNext: Boolean; property Current)
+ tests
compiler: fix for-in loop for arrays. delphi does not copy arrays to a temp variable and it is possible to change array during loop. + test
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: add reference for the enumerator operator when it is used + another test for operator enumerator for a class
compiler: enumerator directive support:
+ allow to mark methods and properties by 'enumerator MoveNext' and 'enumerator Current' modifiers. Parser checks return types and duplicates.
+ prefer *marked* by enumerator directive methods and properties than GetEnumerator and Current builtin symbols
+ increase ppu version
+ test
rtl: add IEnumerator and IEnumerable interfaces declarations
tests: for-in loop tests:
+ add small comment at the top of test program
compiler: allow 'enumerator MoveNext' for the interface function declaration + test
compiler: move all for-in loop helpers to the nflw unit
compiler: don't allow the compiler to choose the non-valid enumerator operator for the for-in loop
git-svn-id: trunk@14008 -
U ide/fpusrscr.pas
U rtl/unix/video.pp
U rtl/i386/i386.inc
U rtl/win/wininc/defines.inc
U rtl/win/systhrd.inc
U rtl/linux/m68k/dllprt0.as
U rtl/linux/i386/syscall.inc
U rtl/linux/i386/dllprt0.as
U rtl/linux/i386/si_c.inc
U rtl/linux/i386/si_prc.inc
U rtl/linux/i386/si_c21.inc
U rtl/linux/i386/si_g.inc
U rtl/linux/i386/si_c21g.inc
U rtl/linux/i386/si_uc.inc
U rtl/linux/i386/si_dll.inc
U rtl/linux/x86_64/dllprt0.as
A tests/test/packages/hash/sha1test.pp
U tests/webtbs/tw12038.pp
U compiler/cclasses.pas
U compiler/symdef.pas
U compiler/ncon.pas
U compiler/ncgrtti.pas
U compiler/cgbase.pas
U compiler/pstatmnt.pas
U compiler/systems/t_linux.pas
U compiler/pass_1.pas
U compiler/x86/cgx86.pas
U compiler/x86/agx86att.pas
U compiler/x86/aasmcpu.pas
U compiler/aasmbase.pas
A packages/fcl-xml/tests/extras.pp
A packages/fcl-xml/tests/extras2.pp
--- Merging r13696 through r13760 into 'packages/fcl-xml/tests/README_DOM.txt':
U packages/fcl-xml/tests/README_DOM.txt
--- Merging r13696 through r13760 into '.':
U packages/fcl-xml/tests/domunit.pp
U packages/fcl-xml/src/xpath.pp
U packages/Makefile
U packages/gmp/src/gmp.pas
U packages/gmp/readme
U packages/fcl-db/src/base/db.pas
U packages/fcl-db/src/base/database.inc
U packages/sqlite/src/sqlite3.inc
U packages/fcl-web/src/custweb.pp
U packages/hash/fpmake.pp
U packages/hash/Makefile.fpc
A packages/hash/src/sha1.pp
U packages/hash/Makefile
U packages/hash/examples/Makefile.fpc
A packages/hash/examples/sha1test.pp
U packages/hash/examples/Makefile
U packages/Makefile.fpc
U packages/fcl-base/src/ascii85.pp
U packages/fcl-base/src/custapp.pp
U packages/chm/src/chmwriter.pas
U packages/chm/src/paslzx.pas
U packages/chm/src/chmreader.pas
--- Merging r13761 into '.':
U compiler/powerpc/agppcvasm.pas
U compiler/ppcgen/agppcgas.pas
git-svn-id: branches/objc@13762 -
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 -
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 -
http://svn.freepascal.org/svn/fpc/branches/avr
........
r5891 | florian | 2007-01-11 17:30:12 +0100 (Do, 11 Jan 2007) | 2 lines
+ some initial work
........
r10170 | florian | 2008-02-03 11:02:04 +0100 (So, 03 Feb 2008) | 2 lines
* continued to work on avr port
........
r10180 | florian | 2008-02-03 15:29:30 +0100 (So, 03 Feb 2008) | 2 lines
+ a lot of skeleton code for avr added
........
git-svn-id: trunk@10186 -
high(int64+1)..high(qword) if written in decimal notation) + test
* fixed range checking of qword constants parsed by the compiler
(they always gave a range error if > high(int64), because the compiler
internally stores them as int64)
* turn off range checking flag of rdconstnodes created by the parser
from _INTCONST, because those are already range checked by the
way they are parsed using val()
git-svn-id: trunk@6814 -