瀏覽代碼

+ support dup for symbols in prepare_stack_for_ref

git-svn-id: branches/wasm@47178 -
nickysn 5 年之前
父節點
當前提交
c46f308749
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      compiler/wasm32/hlcgcpu.pas

+ 5 - 0
compiler/wasm32/hlcgcpu.pas

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