summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-24 14:40:07 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2021-04-24 14:40:07 +0000
commit15b5f77fe00f94a1215a4b2891644df339178b5f (patch)
treea0c4615a7affb08c3c6e096ffd03f3f9d140cd8e
parentbdac2b1796398f2fa19a23d12880929ad820b6e3 (diff)
downloadfpc-15b5f77fe00f94a1215a4b2891644df339178b5f.tar.gz
* 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: https://svn.freepascal.org/svn/fpc/trunk@49259 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/wasm32/nwasmflw.pas9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/wasm32/nwasmflw.pas b/compiler/wasm32/nwasmflw.pas
index 41e66b1ce3..84a230dc1b 100644
--- a/compiler/wasm32/nwasmflw.pas
+++ b/compiler/wasm32/nwasmflw.pas
@@ -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