* last fixes before the release:

- veryyyy slow firstcall fixed
This commit is contained in:
florian 1998-04-22 21:06:49 +00:00
parent e8d49ccb86
commit 6095b9d5b1
3 changed files with 84 additions and 16 deletions

View File

@ -3749,6 +3749,8 @@ implementation
var var
r : preference; r : preference;
l : longint; l : longint;
ispushed : boolean;
hregister : tregister;
begin begin
case p^.inlinenumber of case p^.inlinenumber of
@ -4005,17 +4007,46 @@ implementation
del_reference(p^.left^.left^.location.reference); del_reference(p^.left^.left^.location.reference);
end end
else else
{ LOC_CREGISTER }
exprasmlist^.concat(new(pai386,op_const_reg(asmop,S_L, exprasmlist^.concat(new(pai386,op_const_reg(asmop,S_L,
l,p^.left^.left^.location.register))); l,p^.left^.left^.location.register)));
end end
else else
begin
{ generate code for the element to set }
ispushed:=maybe_push(p^.left^.right^.left^.registers32,p^.left^.left);
secondpass(p^.left^.right^.left);
if ispushed then
restore(p^.left^.left);
{ determine asm operator }
if p^.inlinenumber=in_include_x_y then
asmop:=A_BTS
else
asmop:=A_BTR;
if psetdef(p^.left^.resulttype)^.settype=smallset then if psetdef(p^.left^.resulttype)^.settype=smallset then
begin begin
if p^.left^.right^.left^.location.loc in
[LOC_CREGISTER,LOC_REGISTER] then
hregister:=p^.left^.right^.left^.location.register
else
begin
hregister:=R_EDI;
exprasmlist^.concat(new(pai386,op_ref_reg(A_MOV,S_L,
newreference(p^.left^.right^.left^.location.reference),
R_EDI)));
end;
if (p^.left^.left^.location.loc=LOC_REFERENCE) then
exprasmlist^.concat(new(pai386,op_reg_ref(asmop,S_L,R_EDI,
newreference(p^.left^.right^.left^.location.reference))))
else
exprasmlist^.concat(new(pai386,op_reg_reg(asmop,S_L,R_EDI,
p^.left^.right^.left^.location.register)));
end end
else else
begin begin
end; end;
end; end;
end;
else internalerror(9); else internalerror(9);
end; end;
end; end;
@ -5844,7 +5875,11 @@ do_jmp:
end. end.
{ {
$Log$ $Log$
Revision 1.14 1998-04-21 10:16:47 peter Revision 1.15 1998-04-22 21:06:49 florian
* last fixes before the release:
- veryyyy slow firstcall fixed
Revision 1.14 1998/04/21 10:16:47 peter
* patches from strasbourg * patches from strasbourg
* objects is not used anymore in the fpc compiled version * objects is not used anymore in the fpc compiled version

View File

@ -2440,7 +2440,10 @@ unit pass_1;
end; end;
if defcoll=nil then if defcoll=nil then
begin begin
firstpass(p^.left); if not(assigned(p^.resulttype)) then
firstpass(p^.left)
else
exit;
if codegenerror then if codegenerror then
begin begin
@ -2991,7 +2994,8 @@ unit pass_1;
p^.methodpointer:=nil; p^.methodpointer:=nil;
end; end;
{$endif CHAINPROCSYMS} {$endif CHAINPROCSYMS}
end; { end of procedure to call determination } end;{ end of procedure to call determination }
{ work trough all parameters to insert the type conversions } { work trough all parameters to insert the type conversions }
if assigned(p^.left) then if assigned(p^.left) then
begin begin
@ -3000,7 +3004,6 @@ unit pass_1;
firstcallparan(p^.left,p^.procdefinition^.para1); firstcallparan(p^.left,p^.procdefinition^.para1);
count_ref:=old_count_ref; count_ref:=old_count_ref;
end; end;
{ handle predefined procedures } { handle predefined procedures }
if (p^.procdefinition^.options and pointernproc)<>0 then if (p^.procdefinition^.options and pointernproc)<>0 then
begin begin
@ -3045,7 +3048,7 @@ unit pass_1;
inc(reg_pushes[regi],t_times*2); inc(reg_pushes[regi],t_times*2);
end; end;
{$endif} {$endif}
end; { not assigned(p^.procdefinition) } end;
{ ensure that the result type is set } { ensure that the result type is set }
p^.resulttype:=p^.procdefinition^.retdef; p^.resulttype:=p^.procdefinition^.retdef;
{ get a register for the return value } { get a register for the return value }
@ -4597,7 +4600,11 @@ unit pass_1;
end. end.
{ {
$Log$ $Log$
Revision 1.11 1998-04-21 10:16:48 peter Revision 1.12 1998-04-22 21:06:50 florian
* last fixes before the release:
- veryyyy slow firstcall fixed
Revision 1.11 1998/04/21 10:16:48 peter
* patches from strasbourg * patches from strasbourg
* objects is not used anymore in the fpc compiled version * objects is not used anymore in the fpc compiled version

View File

@ -44,9 +44,10 @@ unit scanner;
'struct','switch','typedef','union','unsigned','void','volatile', 'struct','switch','typedef','union','unsigned','void','volatile',
'while'); 'while');
{$else} {$else}
anz_keywords = 71; max_keywords = 71;
anz_keywords : longint = max_keywords;
keyword : array[1..anz_keywords] of ident = ( keyword : array[1..max_keywords] of ident = (
{ 'ABSOLUTE',} { 'ABSOLUTE',}
'AND', 'AND',
'ARRAY','AS','ASM', 'ARRAY','AS','ASM',
@ -83,7 +84,7 @@ unit scanner;
'WHILE','WITH','XOR'); 'WHILE','WITH','XOR');
{***} {***}
keyword_token : array[1..anz_keywords] of ttoken = ( keyword_token : array[1..max_keywords] of ttoken = (
{ _ABSOLUTE,} { _ABSOLUTE,}
_AND, _AND,
_ARRAY,_AS,_ASM, _ARRAY,_AS,_ASM,
@ -181,6 +182,27 @@ for the last instruction of an include file !}
uses uses
pbase; pbase;
procedure remove_keyword(const s : string);
var
i,j : longint;
begin
for i:=1 to anz_keywords do
begin
if keyword[i]=s then
begin
for j:=i to anz_keywords-1 do
begin
keyword[j]:=keyword[j+1];
keyword_token[j]:=keyword_token[j+1];
end;
dec(anz_keywords);
break;
end;
end;
end;
const const
newline = #10; newline = #10;
@ -2104,7 +2126,11 @@ for the last instruction of an include file !}
end. end.
{ {
$Log$ $Log$
Revision 1.9 1998-04-16 12:14:58 peter Revision 1.10 1998-04-22 21:06:50 florian
* last fixes before the release:
- veryyyy slow firstcall fixed
Revision 1.9 1998/04/16 12:14:58 peter
* quick hack for ^[ in strings * quick hack for ^[ in strings
Revision 1.8 1998/04/16 12:07:55 peter Revision 1.8 1998/04/16 12:07:55 peter