- commented out thlcgwasm.g_copyvalueparas

git-svn-id: branches/wasm@47950 -
This commit is contained in:
nickysn 2021-01-02 07:22:01 +00:00
parent 91ed9f12ac
commit 64a02834ff

View File

@ -210,7 +210,7 @@ uses
procedure allocate_implicit_struct_with_base_ref(list: TAsmList; vs: tabstractvarsym; ref: treference); procedure allocate_implicit_struct_with_base_ref(list: TAsmList; vs: tabstractvarsym; ref: treference);
procedure gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara); override; procedure gen_load_uninitialized_function_result(list: TAsmList; pd: tprocdef; resdef: tdef; const resloc: tcgpara); override;
procedure g_copyvalueparas(p: TObject; arg: pointer); override; //procedure g_copyvalueparas(p: TObject; arg: pointer); override;
procedure inittempvariables(list:TAsmList);override; procedure inittempvariables(list:TAsmList);override;
@ -963,36 +963,36 @@ implementation
end; end;
procedure thlcgwasm.g_copyvalueparas(p: TObject; arg: pointer); //procedure thlcgwasm.g_copyvalueparas(p: TObject; arg: pointer);
var // var
list: tasmlist; // list: tasmlist;
tmpref: treference; // tmpref: treference;
begin // begin
{ zero-extend < 32 bit primitive types (FPC can zero-extend when calling, // { zero-extend < 32 bit primitive types (FPC can zero-extend when calling,
but that doesn't help when we're called from Java code or indirectly // but that doesn't help when we're called from Java code or indirectly
as a procvar -- exceptions: widechar (Java-specific type) and ordinal // as a procvar -- exceptions: widechar (Java-specific type) and ordinal
types whose upper bound does not set the sign bit } // types whose upper bound does not set the sign bit }
if (tsym(p).typ=paravarsym) and // if (tsym(p).typ=paravarsym) and
(tparavarsym(p).varspez in [vs_value,vs_const]) and // (tparavarsym(p).varspez in [vs_value,vs_const]) and
(tparavarsym(p).vardef.typ=orddef) and // (tparavarsym(p).vardef.typ=orddef) and
not is_pasbool(tparavarsym(p).vardef) and // not is_pasbool(tparavarsym(p).vardef) and
not is_widechar(tparavarsym(p).vardef) and // not is_widechar(tparavarsym(p).vardef) and
(tparavarsym(p).vardef.size<4) and // (tparavarsym(p).vardef.size<4) and
not is_signed(tparavarsym(p).vardef) and // not is_signed(tparavarsym(p).vardef) and
(torddef(tparavarsym(p).vardef).high>=(1 shl (tparavarsym(p).vardef.size*8-1))) then // (torddef(tparavarsym(p).vardef).high>=(1 shl (tparavarsym(p).vardef.size*8-1))) then
begin // begin
list:=TAsmList(arg); // list:=TAsmList(arg);
{ store value in new location to keep Android verifier happy } // { store value in new location to keep Android verifier happy }
tg.gethltemp(list,tparavarsym(p).vardef,tparavarsym(p).vardef.size,tt_persistent,tmpref); // tg.gethltemp(list,tparavarsym(p).vardef,tparavarsym(p).vardef.size,tt_persistent,tmpref);
a_load_loc_stack(list,tparavarsym(p).vardef,tparavarsym(p).initialloc); // a_load_loc_stack(list,tparavarsym(p).vardef,tparavarsym(p).initialloc);
a_op_const_stack(list,OP_AND,tparavarsym(p).vardef,(1 shl (tparavarsym(p).vardef.size*8))-1); // a_op_const_stack(list,OP_AND,tparavarsym(p).vardef,(1 shl (tparavarsym(p).vardef.size*8))-1);
a_load_stack_ref(list,tparavarsym(p).vardef,tmpref,prepare_stack_for_ref(list,tmpref,false)); // a_load_stack_ref(list,tparavarsym(p).vardef,tmpref,prepare_stack_for_ref(list,tmpref,false));
location_reset_ref(tparavarsym(p).localloc,LOC_REFERENCE,def_cgsize(tparavarsym(p).vardef),4,tmpref.volatility); // location_reset_ref(tparavarsym(p).localloc,LOC_REFERENCE,def_cgsize(tparavarsym(p).vardef),4,tmpref.volatility);
tparavarsym(p).localloc.reference:=tmpref; // tparavarsym(p).localloc.reference:=tmpref;
end; // end;
//
inherited g_copyvalueparas(p, arg); // inherited g_copyvalueparas(p, arg);
end; // end;
procedure thlcgwasm.inittempvariables(list: TAsmList); procedure thlcgwasm.inittempvariables(list: TAsmList);