Browse Source

+ support dup for symbols in prepare_stack_for_ref

git-svn-id: branches/wasm@47178 -
nickysn 4 years ago
parent
commit
c46f308749
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/wasm32/hlcgcpu.pas

+ 5 - 0
compiler/wasm32/hlcgcpu.pas

@@ -1053,6 +1053,11 @@ implementation
         begin
           list.Concat(taicpu.op_const(a_i32_const,0));
           incstack(list,1);
+          if dup then
+            begin
+              list.Concat(taicpu.op_const(a_i32_const,0));
+              incstack(list,1);
+            end;
           result:=1;
         end
       else if ref.index <> NR_NO then // array access