mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:39:36 +02:00
- get rid of treference.islocal. Instead, use checks whether treference.base
is equal to NR_LOCAL_STACK_POINTER_REG git-svn-id: branches/wasm@47779 -
This commit is contained in:
parent
47ff701db7
commit
bfb13fb848
@ -106,9 +106,6 @@ unit cgutils;
|
|||||||
indexoffset: aint;
|
indexoffset: aint;
|
||||||
checkcast: boolean;
|
checkcast: boolean;
|
||||||
{$endif jvm}
|
{$endif jvm}
|
||||||
{$ifdef wasm}
|
|
||||||
islocal: boolean; // true (local variable), false (memory offset)
|
|
||||||
{$endif wasm}
|
|
||||||
volatility: tvolatilityset;
|
volatility: tvolatilityset;
|
||||||
alignment : byte;
|
alignment : byte;
|
||||||
end;
|
end;
|
||||||
|
@ -243,8 +243,6 @@ uses
|
|||||||
procedure concatcopy_record(list: TAsmList; size: tdef; const source, dest: treference);
|
procedure concatcopy_record(list: TAsmList; size: tdef; const source, dest: treference);
|
||||||
procedure concatcopy_set(list: TAsmList; size: tdef; const source, dest: treference);
|
procedure concatcopy_set(list: TAsmList; size: tdef; const source, dest: treference);
|
||||||
procedure concatcopy_shortstring(list: TAsmList; size: tdef; const source, dest: treference);
|
procedure concatcopy_shortstring(list: TAsmList; size: tdef; const source, dest: treference);
|
||||||
|
|
||||||
procedure paravarsym_set_initialloc_to_paraloc(vs: tparavarsym); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -1017,7 +1015,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
result:=0;
|
result:=0;
|
||||||
{ fake location that indicates the value is already on the stack? }
|
{ fake location that indicates the value is already on the stack? }
|
||||||
if (ref.base=NR_EVAL_STACK_BASE) or (ref.islocal) then
|
if (ref.base=NR_EVAL_STACK_BASE) or (ref.base=NR_LOCAL_STACK_POINTER_REG) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
// setting up memory offset
|
// setting up memory offset
|
||||||
@ -1582,14 +1580,6 @@ implementation
|
|||||||
decstack(list,2);
|
decstack(list,2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure thlcgwasm.paravarsym_set_initialloc_to_paraloc(vs: tparavarsym);
|
|
||||||
begin
|
|
||||||
// mark all callee side parameters AS local!
|
|
||||||
inherited paravarsym_set_initialloc_to_paraloc(vs);
|
|
||||||
if (vs.initialloc.loc = LOC_REFERENCE) then
|
|
||||||
vs.initialloc.reference.islocal := true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure thlcgwasm.g_concatcopy(list: TAsmList; size: tdef; const source, dest: treference);
|
procedure thlcgwasm.g_concatcopy(list: TAsmList; size: tdef; const source, dest: treference);
|
||||||
var
|
var
|
||||||
handled: boolean;
|
handled: boolean;
|
||||||
@ -2187,7 +2177,7 @@ implementation
|
|||||||
getputmemf32 : array [boolean] of TAsmOp = (a_f32_store, a_f32_load);
|
getputmemf32 : array [boolean] of TAsmOp = (a_f32_store, a_f32_load);
|
||||||
getputmemf64 : array [boolean] of TAsmOp = (a_f64_store, a_f64_load);
|
getputmemf64 : array [boolean] of TAsmOp = (a_f64_store, a_f64_load);
|
||||||
begin
|
begin
|
||||||
if (not ref.islocal) or assigned(ref.symbol) then
|
if (ref.base<>NR_LOCAL_STACK_POINTER_REG) or assigned(ref.symbol) then
|
||||||
begin
|
begin
|
||||||
{ -> either a global (static) field, or a regular field. If a regular
|
{ -> either a global (static) field, or a regular field. If a regular
|
||||||
field, then ref.base contains the self pointer, otherwise
|
field, then ref.base contains the self pointer, otherwise
|
||||||
|
@ -398,7 +398,6 @@ unit tgcpu;
|
|||||||
procedure ttgwasm.localVarToRef(idx: integer; size: integer; out ref: treference);
|
procedure ttgwasm.localVarToRef(idx: integer; size: integer; out ref: treference);
|
||||||
begin
|
begin
|
||||||
reference_reset_base(ref,NR_LOCAL_STACK_POINTER_REG,idx,ctempposinvalid,size,[]);
|
reference_reset_base(ref,NR_LOCAL_STACK_POINTER_REG,idx,ctempposinvalid,size,[]);
|
||||||
ref.islocal := true;
|
|
||||||
updateFirstTemp;
|
updateFirstTemp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user