+ added -Se in Makefile cvstest target

+ lexlevel cleanup
    normal_function_level main_program_level and unit_init_level defined
  * tins_cache grown to A_EMMS (gave range check error in asm readers)
    (test added in code !)
  * -Un option was wrong
  * _FAIL and _SELF only keyword inside
    constructors and methods respectively
This commit is contained in:
pierre 1998-11-13 15:40:12 +00:00
parent f1e7a93398
commit 274bce92b8
12 changed files with 163 additions and 28 deletions

View File

@ -265,7 +265,7 @@ cycledep:
make cycle USEDEPEND=1
cvstest:
make cycle 'LOCALOPT=-n' 'RTLOPTS=-n'
make cycle 'LOCALOPT=-n -Se' 'RTLOPTS=-n -Se'
#####################################################################
# Installation
@ -337,7 +337,17 @@ $(M68KEXENAME): $(PASFILES) $(INCFILES)
#
# $Log$
# Revision 1.14 1998-11-10 17:56:48 peter
# Revision 1.15 1998-11-13 15:40:12 pierre
# + added -Se in Makefile cvstest target
# + lexlevel cleanup
# normal_function_level main_program_level and unit_init_level defined
# * tins_cache grown to A_EMMS (gave range check error in asm readers)
# (test added in code !)
# * -Un option was wrong
# * _FAIL and _SELF only keyword inside
# constructors and methods respectively
#
# Revision 1.14 1998/11/10 17:56:48 peter
# * fixes to build correct again
#
# Revision 1.13 1998/10/22 23:55:24 peter

View File

@ -1081,8 +1081,8 @@ implementation
end;
{ push base pointer ?}
if (lexlevel>1) and assigned(pprocdef(p^.procdefinition)^.parast) and
((p^.procdefinition^.parast^.symtablelevel)>2) then
if (lexlevel>=normal_function_level) and assigned(pprocdef(p^.procdefinition)^.parast) and
((p^.procdefinition^.parast^.symtablelevel)>normal_function_level) then
begin
{ if we call a nested function in a method, we must }
{ push also SELF! }
@ -1543,7 +1543,17 @@ implementation
end.
{
$Log$
Revision 1.41 1998-11-12 11:19:40 pierre
Revision 1.42 1998-11-13 15:40:13 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.41 1998/11/12 11:19:40 pierre
* fix for first line of function break
Revision 1.40 1998/11/10 10:09:08 peter

View File

@ -725,8 +725,8 @@ implementation
end;
{ push base pointer ?}
if (lexlevel>1) and assigned(pprocdef(p^.procdefinition)^.parast) and
((p^.procdefinition^.parast^.symtablelevel)>2) then
if (lexlevel>=normal_function_level) and assigned(pprocdef(p^.procdefinition)^.parast) and
((p^.procdefinition^.parast^.symtablelevel)>normal_function_level) then
begin
{ if we call a nested function in a method, we must }
{ push also SELF! }
@ -1062,7 +1062,17 @@ implementation
end.
{
$Log$
Revision 1.15 1998-11-12 11:19:41 pierre
Revision 1.16 1998-11-13 15:40:15 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.15 1998/11/12 11:19:41 pierre
* fix for first line of function break
Revision 1.14 1998/10/21 15:12:51 pierre

View File

@ -1140,7 +1140,7 @@ end;
begin
if assigned(procinfo._class) then
begin
if lexlevel>2 then
if lexlevel>normal_function_level then
begin
new(hp);
reset_reference(hp^);
@ -1351,7 +1351,17 @@ end;
end.
{
$Log$
Revision 1.28 1998-11-12 11:19:42 pierre
Revision 1.29 1998-11-13 15:40:16 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.28 1998/11/12 11:19:42 pierre
* fix for first line of function break
Revision 1.27 1998/11/12 09:46:17 pierre

View File

@ -437,7 +437,11 @@ unit i386;
o1,o2,o3 : longint;
end;
tins_cache = array[A_MOV..A_POPFD] of longint;
const
last_instruction_in_cache = A_EMMS;
type
tins_cache = array[A_MOV..last_instruction_in_cache] of longint;
var
ins_cache : tins_cache;
@ -1727,7 +1731,17 @@ unit i386;
end.
{
$Log$
Revision 1.16 1998-11-13 10:13:46 peter
Revision 1.17 1998-11-13 15:40:19 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.16 1998/11/13 10:13:46 peter
+ cpuid,emms support for asm readers
Revision 1.15 1998/11/05 23:48:20 peter

View File

@ -336,7 +336,8 @@ implementation
begin
if (aktprocsym^.definition^.options and
(poconstructor+podestructor{+poinline}+pointerrupt)=0) and
((procinfo.flags and pi_do_call)=0) and (lexlevel>1) then
((procinfo.flags and pi_do_call)=0) and
(lexlevel>=normal_function_level) then
begin
{ use ESP as frame pointer }
procinfo.framepointer:=stack_pointer;
@ -495,7 +496,17 @@ implementation
end.
{
$Log$
Revision 1.8 1998-10-29 15:42:49 florian
Revision 1.9 1998-11-13 15:40:21 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.8 1998/10/29 15:42:49 florian
+ partial disposing of temp. ansistrings
Revision 1.7 1998/10/26 22:58:19 florian

View File

@ -678,7 +678,9 @@ unit pdecl;
begin
consume(_CONSTRUCTOR);
{ must be at same level as in implementation }
inc(lexlevel);
parse_proc_head(poconstructor);
dec(lexlevel);
if (cs_constructor_name in aktglobalswitches) and (aktprocsym^.name<>'INIT') then
Message(parser_e_constructorname_must_be_init);
@ -1018,7 +1020,9 @@ unit pdecl;
procedure destructor_head;
begin
consume(_DESTRUCTOR);
inc(lexlevel);
parse_proc_head(podestructor);
dec(lexlevel);
if (cs_constructor_name in aktglobalswitches) and (aktprocsym^.name<>'DONE') then
Message(parser_e_destructorname_must_be_done);
aktclass^.options:=aktclass^.options or oo_hasdestructor;
@ -2090,7 +2094,17 @@ unit pdecl;
end.
{
$Log$
Revision 1.80 1998-11-13 10:18:09 peter
Revision 1.81 1998-11-13 15:40:22 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.80 1998/11/13 10:18:09 peter
+ nil constants
Revision 1.79 1998/11/05 12:02:51 peter

View File

@ -1126,7 +1126,7 @@ unit pstatmnt;
end;
{Unit initialization?.}
if (lexlevel=1) and (current_module^.is_unit) then
if (lexlevel=unit_init_level) and (current_module^.is_unit) then
if (token=_END) then
begin
consume(_END);
@ -1218,7 +1218,17 @@ unit pstatmnt;
end.
{
$Log$
Revision 1.49 1998-11-12 12:55:17 pierre
Revision 1.50 1998-11-13 15:40:25 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.49 1998/11/12 12:55:17 pierre
* fix for bug0176 and bug0177
Revision 1.48 1998/11/05 23:43:24 peter

View File

@ -3255,7 +3255,7 @@ const
else
if actasmpattern = '__OLDEBP' then
Begin
if lexlevel>2 then
if lexlevel>normal_function_level then
Begin
instr.operands[operandnum].operandtype := OPR_REFERENCE;
instr.operands[operandnum].ref.offset :=
@ -3880,6 +3880,9 @@ var
Begin
previous_was_id := FALSE;
{ you will get range problems here }
if lastop_in_table > last_instruction_in_cache then
Internalerror(2111);
line:=''; { Initialization of line variable.
No 255 char const string in version 0.9.1 MVC}
old_exit := exitproc;
@ -3888,7 +3891,17 @@ end.
{
$Log$
Revision 1.19 1998-11-13 10:12:16 peter
Revision 1.20 1998-11-13 15:40:27 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.19 1998/11/13 10:12:16 peter
* constant fixes
Revision 1.18 1998/11/05 23:48:26 peter

View File

@ -224,11 +224,11 @@ unit Ra386dir;
end
else if upper(hs)='__OLDEBP' then
begin
{ complicate to check there }
{ we do it: }
if lexlevel>2 then
{ complicate to check there }
{ we do it: }
if lexlevel>normal_function_level then
hs:=tostr(procinfo.framepointer_offset)
+'('+att_reg2str[procinfo.framepointer]+')'
+'('+att_reg2str[procinfo.framepointer]+')'
else
Message(assem_e_cannot_use___OLDEBP_outside_nested_procedure);
end;
@ -262,7 +262,17 @@ unit Ra386dir;
end.
{
$Log$
Revision 1.9 1998-10-20 08:06:57 pierre
Revision 1.10 1998-11-13 15:40:28 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.9 1998/10/20 08:06:57 pierre
* several memory corruptions due to double freemem solved
=> never use p^.loc.location:=p^.left^.loc.location;
+ finally I added now by default

View File

@ -3470,11 +3470,24 @@ end;
begin
old_exit:=exitproc;
{ you will get range problems here }
if lastop_in_table > last_instruction_in_cache then
Internalerror(2111);
exitproc:=@ra386int_exit;
end.
{
$Log$
Revision 1.11 1998-11-13 10:12:11 peter
Revision 1.12 1998-11-13 15:40:30 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.11 1998/11/13 10:12:11 peter
* constant fixes
Revision 1.10 1998/11/05 23:48:27 peter

View File

@ -261,13 +261,13 @@ const
(str:'CVAR' ;special:false;keyword:m_none),
(str:'ELSE' ;special:false;keyword:m_all),
(str:'EXIT' ;special:false;keyword:m_all),
(str:'FAIL' ;special:false;keyword:m_all),
(str:'FAIL' ;special:false;keyword:m_none), { only set within constructors PM }
(str:'FILE' ;special:false;keyword:m_all),
(str:'GOTO' ;special:false;keyword:m_all),
(str:'NAME' ;special:false;keyword:m_none),
(str:'NEAR' ;special:false;keyword:m_none),
(str:'READ' ;special:false;keyword:m_none),
(str:'SELF' ;special:false;keyword:m_all),
(str:'SELF' ;special:false;keyword:m_none), {set inside methods only PM }
(str:'THEN' ;special:false;keyword:m_all),
(str:'TRUE' ;special:false;keyword:m_all),
(str:'TYPE' ;special:false;keyword:m_all),
@ -334,7 +334,17 @@ const
{
$Log$
Revision 1.5 1998-11-10 10:09:19 peter
Revision 1.6 1998-11-13 15:40:33 pierre
+ added -Se in Makefile cvstest target
+ lexlevel cleanup
normal_function_level main_program_level and unit_init_level defined
* tins_cache grown to A_EMMS (gave range check error in asm readers)
(test added in code !)
* -Un option was wrong
* _FAIL and _SELF only keyword inside
constructors and methods respectively
Revision 1.5 1998/11/10 10:09:19 peter
* va_list -> array of const
Revision 1.4 1998/11/09 11:44:42 peter