mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 07:29:29 +02:00
+ dummy implementation of the code generator for the try..except node for WebAssembly
git-svn-id: branches/wasm@48216 -
This commit is contained in:
parent
f99e74866d
commit
7a15157387
@ -49,6 +49,13 @@ interface
|
|||||||
procedure pass_generate_code;override;
|
procedure pass_generate_code;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ twasmtryexceptnode }
|
||||||
|
|
||||||
|
twasmtryexceptnode = class(tcgtryexceptnode)
|
||||||
|
public
|
||||||
|
procedure pass_generate_code;override;
|
||||||
|
end;
|
||||||
|
|
||||||
{ twasmtryfinallynode }
|
{ twasmtryfinallynode }
|
||||||
|
|
||||||
twasmtryfinallynode = class(tcgtryfinallynode)
|
twasmtryfinallynode = class(tcgtryfinallynode)
|
||||||
@ -196,6 +203,23 @@ implementation
|
|||||||
flowcontrol := oldflowcontrol + (flowcontrol - [fc_inflowcontrol]);
|
flowcontrol := oldflowcontrol + (flowcontrol - [fc_inflowcontrol]);
|
||||||
end;
|
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
|
twasmtryfinallynode
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
@ -234,5 +258,6 @@ implementation
|
|||||||
initialization
|
initialization
|
||||||
cifnode:=twasmifnode;
|
cifnode:=twasmifnode;
|
||||||
cwhilerepeatnode:=twasmwhilerepeatnode;
|
cwhilerepeatnode:=twasmwhilerepeatnode;
|
||||||
|
ctryexceptnode:=twasmtryexceptnode;
|
||||||
ctryfinallynode:=twasmtryfinallynode;
|
ctryfinallynode:=twasmtryfinallynode;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user