2000-11-21 08:55 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/pp/ppcomp.c
* source/compiler/harbour.c
* Corrected compiler warnings.
* source/compiler/harbour.slx
* Small optimization in handling of s_sLastBlock
* tests/tstblock.prg
+ Added complex early macro test.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2000-11-21 08:55 UTC+0800 Ron Pinkas <ron@profit-master.com>
|
||||
* source/pp/ppcomp.c
|
||||
* source/compiler/harbour.c
|
||||
* Corrected compiler warnings.
|
||||
|
||||
* source/compiler/harbour.slx
|
||||
* Small optimization in handling of s_sLastBlock
|
||||
|
||||
* tests/tstblock.prg
|
||||
+ Added complex early macro test.
|
||||
|
||||
2000-11-21 17:42 GMT+1 Maurilio Longo <maurilio.longo@libero.it>
|
||||
* source/rtl/teditor.prg
|
||||
+ added ::LoadText() method
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Harbour Project source code:
|
||||
* Compiler main file
|
||||
*
|
||||
* Copyright 1999 {list of individual authors and e-mail addresses}
|
||||
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,9 +24,6 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at http://www.gnu.org/).
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
@@ -34,6 +31,15 @@
|
||||
* hb_compPrepareOptimize()
|
||||
* hb_compOptimizeJumps()
|
||||
* hb_compOptimizeFrames()
|
||||
* hb_compAutoOpenAdd()
|
||||
* hb_compAutoOpenFind()
|
||||
* hb_compAutoOpen()
|
||||
* hb_compDeclaredParameterAdd()
|
||||
* hb_compClassAdd()
|
||||
* hb_compClassFind()
|
||||
* hb_compMethodAdd()
|
||||
* hb_compMethodFind()
|
||||
* hb_compDeclaredAdd()
|
||||
*
|
||||
* See doc/license.txt for licensing terms.
|
||||
*
|
||||
@@ -350,7 +356,10 @@ void hb_compDeclaredParameterAdd( char * szVarName, BYTE cValueType )
|
||||
{
|
||||
/* Nothing to do since no warnings requested.*/
|
||||
if ( hb_comp_iWarnings < 3 )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( szVarName );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Either a Declared Function Parameter or a Declared Method Parameter. */
|
||||
if( hb_comp_szDeclaredFun )
|
||||
|
||||
@@ -802,6 +802,7 @@ int hb_comp_SLX_CustomAction( int x, int aiHold[], int *ptr_iHold, BOOL *ptr_bIg
|
||||
{
|
||||
unsigned int iBrackets = 1;
|
||||
char cTmp;
|
||||
BOOL bMacro = FALSE;
|
||||
|
||||
pTmp++;
|
||||
while( *pTmp )
|
||||
@@ -818,16 +819,24 @@ int hb_comp_SLX_CustomAction( int x, int aiHold[], int *ptr_iHold, BOOL *ptr_bIg
|
||||
{
|
||||
iBrackets++;
|
||||
}
|
||||
else if( *pTmp == '&' )
|
||||
{
|
||||
bMacro = TRUE;
|
||||
}
|
||||
|
||||
pTmp++;
|
||||
}
|
||||
|
||||
pTmp++;
|
||||
cTmp = *pTmp;
|
||||
*pTmp = '\0';
|
||||
if( bMacro )
|
||||
{
|
||||
pTmp++;
|
||||
cTmp = *pTmp;
|
||||
*pTmp = '\0';
|
||||
|
||||
s_sLastBlock = hb_compIdentifierNew( s_szBuffer - 1, TRUE );
|
||||
s_sLastBlock = hb_compIdentifierNew( s_szBuffer - 1, TRUE );
|
||||
|
||||
*pTmp = cTmp;
|
||||
*pTmp = cTmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return '{' + DONT_REDUCE;
|
||||
@@ -997,7 +1006,9 @@ char * hb_comp_SLX_LastBlock( BOOL bReset )
|
||||
{
|
||||
if( bReset && s_sLastBlock )
|
||||
{
|
||||
//hb_xfree( s_sLastBlock );
|
||||
/*
|
||||
hb_xfree( s_sLastBlock );
|
||||
*/
|
||||
s_sLastBlock = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +219,6 @@ int hb_pp_ReadRules( void )
|
||||
char * ptr;
|
||||
int lContinue;
|
||||
int lens, rdlen;
|
||||
int lLine = 0;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_pp_ReadRules()"));
|
||||
|
||||
@@ -275,19 +274,13 @@ int hb_pp_ReadRules( void )
|
||||
else
|
||||
{
|
||||
CloseInclude();
|
||||
lLine = 1;
|
||||
hb_pp_LastOutLine = hb_comp_iLine;
|
||||
}
|
||||
|
||||
*s_szLine = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if( lLine )
|
||||
{
|
||||
if( hb_comp_files.iFiles == 1 )
|
||||
hb_pp_LastOutLine = hb_comp_iLine;
|
||||
}
|
||||
|
||||
return lens;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,19 @@ PROCEDURE Main()
|
||||
bBlock[i] := {|| &Macro }
|
||||
NEXT
|
||||
|
||||
? "Early:"
|
||||
? "Early (Simple):"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
? Eval( bBlock[i] )
|
||||
NEXT
|
||||
|
||||
FOR i = 1 TO 3
|
||||
M->Macro := "Var" + Str( i, 1 )
|
||||
bBlock[i] := {|| &Macro + "!" }
|
||||
NEXT
|
||||
|
||||
?
|
||||
? "Early (Complex):"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
? Eval( bBlock[i] )
|
||||
@@ -27,6 +39,7 @@ PROCEDURE Main()
|
||||
bBlock[i] := {|| &(Macro) }
|
||||
NEXT
|
||||
|
||||
?
|
||||
? "Late:"
|
||||
|
||||
FOR i = 1 TO 3
|
||||
|
||||
Reference in New Issue
Block a user