From 57bb8c9238b4da2a30874d1b718f0c8f100dfaf3 Mon Sep 17 00:00:00 2001
From: Cheng Shao <terrorjack@type.dance>
Date: Mon, 16 Oct 2023 06:50:14 +0000
Subject: [PATCH] deriveConstants: add needed constants for wasm backend

This commit adds needed constants to deriveConstants. They are used by
RTS code in the wasm backend to support the JSFFI logic.
---
 utils/deriveConstants/Main.hs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/deriveConstants/Main.hs b/utils/deriveConstants/Main.hs
index 9743aa5ef8c..eff583d860f 100644
--- a/utils/deriveConstants/Main.hs
+++ b/utils/deriveConstants/Main.hs
@@ -401,6 +401,7 @@ wanteds os = concat
           ,structField C    "Capability" "total_allocated"
           ,structField C    "Capability" "weak_ptr_list_hd"
           ,structField C    "Capability" "weak_ptr_list_tl"
+          ,structField C    "Capability" "n_run_queue"
 
           ,structField Both "bdescr" "start"
           ,structField Both "bdescr" "free"
@@ -468,6 +469,7 @@ wanteds os = concat
           ,closureField  C    "StgTSO"      "dirty"
           ,closureField  C    "StgTSO"      "bq"
           ,closureField  C    "StgTSO"      "label"
+          ,closureField  C    "StgTSO"      "bound"
           ,closureField  Both "StgTSO"      "alloc_limit"
           ,closureField_ Both "StgTSO_cccs" "StgTSO" "prof.cccs"
           ,closureField  Both "StgTSO"      "stackobj"
-- 
GitLab