Revision: 12365
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=12365&view=rev
Author: druzus
Date: 2009-08-29 10:43:31 +0000 (Sat, 29 Aug 2009)
Log Message:
-----------
2009-08-29 12:43 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbcomp.h
* harbour/include/hbcompdf.h
* harbour/source/compiler/hbmain.c
* harbour/source/compiler/cmdcheck.c
* harbour/source/compiler/hbcomp.c
* harbour/source/compiler/genc.c
* harbour/source/compiler/harbour.yyc
* harbour/source/compiler/harbour.y
* harbour/source/compiler/hbdbginf.c
* harbour/source/compiler/genhrb.c
* harbour/source/compiler/gencobj.c
- removed old "AutoOpen" code used for @<name>.clp, SET PROCEDURE TO ...
and DO <func> [ WITH <args,...> ] statements
It was neither Clipper compatible not working correctly in some cases.
+ added new code for multi .prg module compilation into single unit
with support for multiple file wide declarations just like Cipper
does doe @.clp files and SET PROCEDURE TO / DO ... [ WITH ... ]
% cleaned redundant code used in harbour compiler to execute grammar
parser with different conditions. Now it's much shorter and simpler
and hb_compparse() is called only from one place.
! fixed possible multiple declarations in symbol table for ANNOUNCE
function
% rewritten C code generation to increase speed and make it independent
from some internal compiler structures. Now it's shorter and faster
but it strongly uses scope attributes in symbol table so they have
to be properly set during compilation and new code for .c file
generation should help in their validation.
% few other optimizations and cleanups
Now Harbour can compile code like:
/*** t01.prg ***/
static s_var := "main sVar"
proc main()
? procname(), "->", sVar
do t02
return
/*** t02.prg ***/
static s_var := "t02 sVar"
proc t02()
? procname(), "->", sVar
return
by simpe:
harbour -n -w -es2 t01
or using tst.clp:
t01
t02
and:
harbour -n -w -es2 @tst
in both cases it works just like Clipper. Please note that in the
second version generated file inherits (like in Clipper) name from
.clp file and is called "tst.c". The .clp file name is also used
as module handler signature.
TODO: add support for multiple static functions with the same name
but coming from different .prg modules compiled into single
unit using @.clp files or SET PROCEDURE TO / DO ... [ WITH ... ]
In above modifications I already implemented it partially but
I haven't made one very important extension which strongly
interacts with symbol table usage during compilation and can
be source of really bad problems if I made sth wrong so I plan
to finish when above changes will have been tested.
Modified Paths:
--------------
trunk/harbour/ChangeLog
trunk/harbour/include/hbcomp.h
trunk/harbour/include/hbcompdf.h
trunk/harbour/source/compiler/cmdcheck.c
trunk/harbour/source/compiler/genc.c
trunk/harbour/source/compiler/gencobj.c
trunk/harbour/source/compiler/genhrb.c
trunk/harbour/source/compiler/harbour.y
trunk/harbour/source/compiler/harbour.yyc
trunk/harbour/source/compiler/hbcomp.c
trunk/harbour/source/compiler/hbdbginf.c
trunk/harbour/source/compiler/hbmain.c
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour