+ dummy implementation of the code generator for the try..except node for WebAssembly

git-svn-id: branches/wasm@48216 -
This commit is contained in:
nickysn 2021-01-19 19:28:27 +00:00
parent f99e74866d
commit 7a15157387

View File

@ -49,6 +49,13 @@ interface
procedure pass_generate_code;override;
end;
{ twasmtryexceptnode }
twasmtryexceptnode = class(tcgtryexceptnode)
public
procedure pass_generate_code;override;
end;
{ twasmtryfinallynode }
twasmtryfinallynode = class(tcgtryfinallynode)
@ -196,6 +203,23 @@ implementation
flowcontrol := oldflowcontrol + (flowcontrol - [fc_inflowcontrol]);
end;
{*****************************************************************************
twasmtryexceptnode
*****************************************************************************}
procedure twasmtryexceptnode.pass_generate_code;
begin
location_reset(location,LOC_VOID,OS_NO);
current_asmdata.CurrAsmList.concat(tai_comment.Create(strpnew('TODO: try..except, try')));
secondpass(left);
//if codegenerror then
// goto errorexit;
current_asmdata.CurrAsmList.concat(tai_comment.Create(strpnew('TODO: try..except, end')));
end;
{*****************************************************************************
twasmtryfinallynode
*****************************************************************************}
@ -234,5 +258,6 @@ implementation
initialization
cifnode:=twasmifnode;
cwhilerepeatnode:=twasmwhilerepeatnode;
ctryexceptnode:=twasmtryexceptnode;
ctryfinallynode:=twasmtryfinallynode;
end.