mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:29:26 +02:00
* fixed the stack tracking in twasmaddnode.second_addboolean
git-svn-id: branches/wasm@48044 -
This commit is contained in:
parent
bfe4d44aef
commit
2212bd5f3c
@ -263,6 +263,7 @@ interface
|
||||
secondpass(left);
|
||||
current_asmdata.CurrAsmList.Concat(taicpu.op_functype(a_if,TWasmFuncType.Create([],[wbt_i32])));
|
||||
thlcgwasm(hlcg).incblock;
|
||||
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||
|
||||
case nodetype of
|
||||
andn :
|
||||
@ -272,6 +273,7 @@ interface
|
||||
secondpass(right);
|
||||
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_else) );
|
||||
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||
|
||||
// inside of ELSE (the condition evaluated as false)
|
||||
// for "and" must end evaluation immediately
|
||||
@ -284,8 +286,10 @@ interface
|
||||
// inside of IF (the condition evaluated as true)
|
||||
// for "or" must end evalaution immediately - satified!
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_const(a_i32_const, 1) );
|
||||
thlcgwasm(hlcg).incstack(current_asmdata.CurrAsmList,1);
|
||||
|
||||
current_asmdata.CurrAsmList.Concat( taicpu.op_none(a_else) );
|
||||
thlcgwasm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||
// inside of ELSE (the condition evaluated as false)
|
||||
// for "or" must evaluate the right part
|
||||
secondpass(right);
|
||||
@ -297,9 +301,6 @@ interface
|
||||
else
|
||||
Internalerror(2019091902);
|
||||
end;
|
||||
// todo: need to reset location to the stack?
|
||||
|
||||
//Internalerror(2019091901);
|
||||
end else
|
||||
inherited;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user