浏览代码

LibWasm: Grow table type in `table.grow`

Diego Frias 10 月之前
父节点
当前提交
ed153a1720
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h

+ 3 - 0
Userland/Libraries/LibWasm/AbstractMachine/AbstractMachine.h

@@ -408,6 +408,9 @@ public:
             return false;
         for (size_t i = previous_size; i < m_elements.size(); ++i)
             m_elements[i] = fill_value;
+
+        m_type = TableType { m_type.element_type(), Limits(m_type.limits().min() + size_to_grow, m_type.limits().max()) };
+
         return true;
     }