mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 18:30:32 +02:00
* workaround for the raise node generating invalid WebAssembly code for
obtaining the current address. Note that exception handling in WebAssembly doesn't work. This only fixes the raise node enough to generate valid (but not correct) WebAssembly code. This is a temporary fix to allow the SysUtils unit to be compiled. Eventually, exception handling for WebAssembly will need to be rewritten entirely, in order to make exceptions work properly. git-svn-id: trunk@49259 -
This commit is contained in:
parent
f81dd894aa
commit
bc42d64348
@ -217,7 +217,7 @@ implementation
|
||||
function twasmraisenode.pass_1 : tnode;
|
||||
var
|
||||
statements : tstatementnode;
|
||||
current_addr : tlabelnode;
|
||||
//current_addr : tlabelnode;
|
||||
raisenode : tcallnode;
|
||||
begin
|
||||
result:=internalstatements(statements);
|
||||
@ -240,9 +240,10 @@ implementation
|
||||
else
|
||||
begin
|
||||
third:=cinlinenode.create(in_get_frame,false,nil);
|
||||
current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
|
||||
addstatement(statements,current_addr);
|
||||
right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
|
||||
//current_addr:=clabelnode.create(cnothingnode.create,clabelsym.create('$raiseaddr'));
|
||||
//addstatement(statements,current_addr);
|
||||
//right:=caddrnode.create(cloadnode.create(current_addr.labsym,current_addr.labsym.owner));
|
||||
right:=cnilnode.create;
|
||||
|
||||
{ raise address off by one so we are for sure inside the action area for the raise }
|
||||
if tf_use_psabieh in target_info.flags then
|
||||
|
Loading…
Reference in New Issue
Block a user