mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-26 01:09:24 +02:00
* no rangecheck for openarrays with cdecl
This commit is contained in:
parent
420fb26f38
commit
9666a05942
@ -74,7 +74,7 @@ interface
|
||||
private
|
||||
procedure rangecheck_array;
|
||||
protected
|
||||
function get_mul_size : aword;
|
||||
function get_mul_size : longint;
|
||||
{# This routine is used to calculate the address of the reference.
|
||||
On entry reg contains the index in the array,
|
||||
and l contains the size of each element in the array.
|
||||
@ -505,7 +505,7 @@ implementation
|
||||
TCGVECNODE
|
||||
*****************************************************************************}
|
||||
|
||||
function tcgvecnode.get_mul_size : aword;
|
||||
function tcgvecnode.get_mul_size : longint;
|
||||
begin
|
||||
if nf_memindex in flags then
|
||||
get_mul_size:=1
|
||||
@ -556,18 +556,22 @@ implementation
|
||||
var
|
||||
freereg : boolean;
|
||||
hightree : tnode;
|
||||
srsym : tsym;
|
||||
poslabel,
|
||||
neglabel : tasmlabel;
|
||||
hreg : tregister;
|
||||
href : treference;
|
||||
pushed : tpushedsaved;
|
||||
begin
|
||||
if is_open_array(left.resulttype.def) or
|
||||
is_array_of_const(left.resulttype.def) then
|
||||
begin
|
||||
{ cdecl functions don't have high() so we can not check the range }
|
||||
if not(aktprocdef.proccalloption in [pocall_cdecl,pocall_cppdecl]) then
|
||||
begin
|
||||
{ Get high value }
|
||||
hightree:=load_high_value(tvarsym(tloadnode(left).symtableentry));
|
||||
{ it must be available }
|
||||
if not assigned(hightree) then
|
||||
internalerror(200212201);
|
||||
firstpass(hightree);
|
||||
secondpass(hightree);
|
||||
{ generate compares }
|
||||
@ -592,6 +596,7 @@ implementation
|
||||
{ release hightree }
|
||||
location_release(exprasmlist,hightree.location);
|
||||
hightree.free;
|
||||
end;
|
||||
end
|
||||
else
|
||||
if is_dynamic_array(left.resulttype.def) then
|
||||
@ -919,7 +924,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.38 2002-12-17 22:19:33 peter
|
||||
Revision 1.39 2002-12-20 18:13:19 peter
|
||||
* no rangecheck for openarrays with cdecl
|
||||
|
||||
Revision 1.38 2002/12/17 22:19:33 peter
|
||||
* fixed pushing of records>8 bytes with stdcall
|
||||
* simplified hightree loading
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user