From 1fcc352cbb05b39232a68b4de02f74d8ea92a482 Mon Sep 17 00:00:00 2001 From: Mindaugas Kavaliauskas Date: Mon, 19 Nov 2007 17:04:06 +0000 Subject: [PATCH] 2007-11-19 19:03 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/source/compiler/hbopt.c ! fixed HB_P_MACROFUNC optimization --- harbour/ChangeLog | 4 ++++ harbour/source/compiler/hbopt.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index acefa30e28..7a79376002 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,10 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-19 19:03 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/source/compiler/hbopt.c + ! fixed HB_P_MACROFUNC optimization + 2007-11-19 15:25 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + contrib/examples/dbu + contrib/examples/dbu/readme.txt diff --git a/harbour/source/compiler/hbopt.c b/harbour/source/compiler/hbopt.c index 57e8efdbe8..897b0d79cb 100644 --- a/harbour/source/compiler/hbopt.c +++ b/harbour/source/compiler/hbopt.c @@ -680,13 +680,13 @@ static HB_OPT_FUNC( hb_p_functionshort ) static HB_OPT_FUNC( hb_p_macrofunc ) { - if( pFunc->pCode[ lPCodePos + 1 ] == HB_P_RETVALUE && - ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 1 ) ) + if( pFunc->pCode[ lPCodePos + 3 ] == HB_P_RETVALUE && + ! hb_compIsJump( cargo->HB_COMP_PARAM, pFunc, lPCodePos + 3 ) ) { pFunc->pCode[ lPCodePos ] = HB_P_MACRODO; - hb_compNOOPfill( pFunc, lPCodePos + 1, 1, FALSE, FALSE ); + hb_compNOOPfill( pFunc, lPCodePos + 3, 1, FALSE, FALSE ); } - return 1; + return 3; } static HB_OPT_FUNC( hb_p_endblock )