From b4bdfebf7ced80b28f42df0774a6a4510befa2f4 Mon Sep 17 00:00:00 2001 From: Luigy Leon Date: Thu, 19 Jan 2023 12:37:04 -0500 Subject: [PATCH] Runs on device --- lodewallet.xcodeproj/project.pbxproj | 75 +- .../UserInterfaceState.xcuserstate | Bin 24570 -> 58404 bytes lodewallet/AppDelegate.h | 10 +- lodewallet/AppDelegate.m | 208 +++- lodewallet/Base.lproj/Main.storyboard | 24 - lodewallet/Info.plist | 14 - lodewallet/SceneDelegate.h | 15 - lodewallet/SceneDelegate.m | 57 -- lodewallet/ViewController.h | 13 +- lodewallet/ViewController.m | 36 +- lodewallet/include/Cmm.h | 903 ++++++++++++++++++ lodewallet/include/DerivedConstants.h | 555 +++++++++++ lodewallet/include/HsFFI.h | 141 +++ lodewallet/include/MachDeps.h | 121 +++ lodewallet/include/Rts.h | 341 +++++++ lodewallet/include/RtsAPI.h | 526 ++++++++++ lodewallet/include/Stg.h | 600 ++++++++++++ lodewallet/include/ghcautoconf.h | 611 ++++++++++++ lodewallet/include/ghcconfig.h | 4 + lodewallet/include/ghcplatform.h | 28 + lodewallet/include/ghcversion.h | 16 + lodewallet/include/rts/Adjustor.h | 22 + lodewallet/include/rts/BlockSignals.h | 34 + lodewallet/include/rts/Bytecodes.h | 106 ++ lodewallet/include/rts/Config.h | 52 + lodewallet/include/rts/Constants.h | 334 +++++++ lodewallet/include/rts/EventLogFormat.h | 237 +++++ lodewallet/include/rts/EventLogWriter.h | 66 ++ lodewallet/include/rts/FileLock.h | 19 + lodewallet/include/rts/Flags.h | 320 +++++++ lodewallet/include/rts/ForeignExports.h | 38 + lodewallet/include/rts/GetTime.h | 16 + lodewallet/include/rts/Globals.h | 36 + lodewallet/include/rts/Hpc.h | 34 + lodewallet/include/rts/IOManager.h | 43 + lodewallet/include/rts/Libdw.h | 97 ++ lodewallet/include/rts/LibdwPool.h | 19 + lodewallet/include/rts/Linker.h | 101 ++ lodewallet/include/rts/Main.h | 18 + lodewallet/include/rts/Messages.h | 104 ++ lodewallet/include/rts/NonMoving.h | 43 + lodewallet/include/rts/OSThreads.h | 259 +++++ lodewallet/include/rts/Parallel.h | 16 + lodewallet/include/rts/PrimFloat.h | 17 + lodewallet/include/rts/Profiling.h | 17 + lodewallet/include/rts/Signals.h | 23 + lodewallet/include/rts/SpinLock.h | 105 ++ lodewallet/include/rts/StableName.h | 32 + lodewallet/include/rts/StablePtr.h | 39 + lodewallet/include/rts/StaticPtrTable.h | 44 + lodewallet/include/rts/TSANUtils.h | 67 ++ lodewallet/include/rts/TTY.h | 17 + lodewallet/include/rts/Threads.h | 74 ++ lodewallet/include/rts/Ticky.h | 32 + lodewallet/include/rts/Time.h | 45 + lodewallet/include/rts/Timer.h | 18 + lodewallet/include/rts/Types.h | 31 + lodewallet/include/rts/Utils.h | 16 + lodewallet/include/rts/prof/CCS.h | 226 +++++ lodewallet/include/rts/prof/LDV.h | 44 + lodewallet/include/rts/storage/Block.h | 368 +++++++ .../include/rts/storage/ClosureMacros.h | 593 ++++++++++++ lodewallet/include/rts/storage/ClosureTypes.h | 86 ++ lodewallet/include/rts/storage/Closures.h | 483 ++++++++++ lodewallet/include/rts/storage/FunTypes.h | 54 ++ lodewallet/include/rts/storage/GC.h | 262 +++++ lodewallet/include/rts/storage/Heap.h | 18 + lodewallet/include/rts/storage/InfoTables.h | 405 ++++++++ lodewallet/include/rts/storage/MBlock.h | 32 + lodewallet/include/rts/storage/TSO.h | 317 ++++++ lodewallet/include/stg/DLL.h | 72 ++ lodewallet/include/stg/MachRegs.h | 774 +++++++++++++++ lodewallet/include/stg/MachRegsForHost.h | 76 ++ lodewallet/include/stg/MiscClosures.h | 554 +++++++++++ lodewallet/include/stg/Prim.h | 102 ++ lodewallet/include/stg/Regs.h | 528 ++++++++++ lodewallet/include/stg/SMP.h | 549 +++++++++++ lodewallet/include/stg/Ticky.h | 216 +++++ lodewallet/include/stg/Types.h | 201 ++++ lodewallet/main.m | 41 +- 80 files changed, 12711 insertions(+), 179 deletions(-) delete mode 100644 lodewallet/Base.lproj/Main.storyboard delete mode 100644 lodewallet/SceneDelegate.h delete mode 100644 lodewallet/SceneDelegate.m create mode 100644 lodewallet/include/Cmm.h create mode 100644 lodewallet/include/DerivedConstants.h create mode 100644 lodewallet/include/HsFFI.h create mode 100644 lodewallet/include/MachDeps.h create mode 100644 lodewallet/include/Rts.h create mode 100644 lodewallet/include/RtsAPI.h create mode 100644 lodewallet/include/Stg.h create mode 100644 lodewallet/include/ghcautoconf.h create mode 100644 lodewallet/include/ghcconfig.h create mode 100644 lodewallet/include/ghcplatform.h create mode 100644 lodewallet/include/ghcversion.h create mode 100644 lodewallet/include/rts/Adjustor.h create mode 100644 lodewallet/include/rts/BlockSignals.h create mode 100644 lodewallet/include/rts/Bytecodes.h create mode 100644 lodewallet/include/rts/Config.h create mode 100644 lodewallet/include/rts/Constants.h create mode 100644 lodewallet/include/rts/EventLogFormat.h create mode 100644 lodewallet/include/rts/EventLogWriter.h create mode 100644 lodewallet/include/rts/FileLock.h create mode 100644 lodewallet/include/rts/Flags.h create mode 100644 lodewallet/include/rts/ForeignExports.h create mode 100644 lodewallet/include/rts/GetTime.h create mode 100644 lodewallet/include/rts/Globals.h create mode 100644 lodewallet/include/rts/Hpc.h create mode 100644 lodewallet/include/rts/IOManager.h create mode 100644 lodewallet/include/rts/Libdw.h create mode 100644 lodewallet/include/rts/LibdwPool.h create mode 100644 lodewallet/include/rts/Linker.h create mode 100644 lodewallet/include/rts/Main.h create mode 100644 lodewallet/include/rts/Messages.h create mode 100644 lodewallet/include/rts/NonMoving.h create mode 100644 lodewallet/include/rts/OSThreads.h create mode 100644 lodewallet/include/rts/Parallel.h create mode 100644 lodewallet/include/rts/PrimFloat.h create mode 100644 lodewallet/include/rts/Profiling.h create mode 100644 lodewallet/include/rts/Signals.h create mode 100644 lodewallet/include/rts/SpinLock.h create mode 100644 lodewallet/include/rts/StableName.h create mode 100644 lodewallet/include/rts/StablePtr.h create mode 100644 lodewallet/include/rts/StaticPtrTable.h create mode 100644 lodewallet/include/rts/TSANUtils.h create mode 100644 lodewallet/include/rts/TTY.h create mode 100644 lodewallet/include/rts/Threads.h create mode 100644 lodewallet/include/rts/Ticky.h create mode 100644 lodewallet/include/rts/Time.h create mode 100644 lodewallet/include/rts/Timer.h create mode 100644 lodewallet/include/rts/Types.h create mode 100644 lodewallet/include/rts/Utils.h create mode 100644 lodewallet/include/rts/prof/CCS.h create mode 100644 lodewallet/include/rts/prof/LDV.h create mode 100644 lodewallet/include/rts/storage/Block.h create mode 100644 lodewallet/include/rts/storage/ClosureMacros.h create mode 100644 lodewallet/include/rts/storage/ClosureTypes.h create mode 100644 lodewallet/include/rts/storage/Closures.h create mode 100644 lodewallet/include/rts/storage/FunTypes.h create mode 100644 lodewallet/include/rts/storage/GC.h create mode 100644 lodewallet/include/rts/storage/Heap.h create mode 100644 lodewallet/include/rts/storage/InfoTables.h create mode 100644 lodewallet/include/rts/storage/MBlock.h create mode 100644 lodewallet/include/rts/storage/TSO.h create mode 100644 lodewallet/include/stg/DLL.h create mode 100644 lodewallet/include/stg/MachRegs.h create mode 100644 lodewallet/include/stg/MachRegsForHost.h create mode 100644 lodewallet/include/stg/MiscClosures.h create mode 100644 lodewallet/include/stg/Prim.h create mode 100644 lodewallet/include/stg/Regs.h create mode 100644 lodewallet/include/stg/SMP.h create mode 100644 lodewallet/include/stg/Ticky.h create mode 100644 lodewallet/include/stg/Types.h diff --git a/lodewallet.xcodeproj/project.pbxproj b/lodewallet.xcodeproj/project.pbxproj index 0a53d65..7ce1510 100644 --- a/lodewallet.xcodeproj/project.pbxproj +++ b/lodewallet.xcodeproj/project.pbxproj @@ -8,27 +8,25 @@ /* Begin PBXBuildFile section */ 2B0EF83C2960573400F8EF57 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B0EF83B2960573400F8EF57 /* AppDelegate.m */; }; - 2B0EF83F2960573400F8EF57 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B0EF83E2960573400F8EF57 /* SceneDelegate.m */; }; 2B0EF8422960573400F8EF57 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B0EF8412960573400F8EF57 /* ViewController.m */; }; - 2B0EF8452960573400F8EF57 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B0EF8432960573400F8EF57 /* Main.storyboard */; }; 2B0EF8472960573400F8EF57 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B0EF8462960573400F8EF57 /* Assets.xcassets */; }; 2B0EF84A2960573400F8EF57 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B0EF8482960573400F8EF57 /* LaunchScreen.storyboard */; }; - 2B0EF84D2960573400F8EF57 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B0EF84C2960573400F8EF57 /* main.m */; }; + 2B1E80212978D192006EC199 /* include in Resources */ = {isa = PBXBuildFile; fileRef = 2B1E80202978D192006EC199 /* include */; }; + 2B1E802629799276006EC199 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B1E802529799276006EC199 /* main.m */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 2B0EF8372960573400F8EF57 /* lodewallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = lodewallet.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2B0EF83A2960573400F8EF57 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 2B0EF83B2960573400F8EF57 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 2B0EF83D2960573400F8EF57 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; - 2B0EF83E2960573400F8EF57 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; 2B0EF8402960573400F8EF57 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 2B0EF8412960573400F8EF57 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 2B0EF8442960573400F8EF57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 2B0EF8462960573400F8EF57 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2B0EF8492960573400F8EF57 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 2B0EF84B2960573400F8EF57 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2B0EF84C2960573400F8EF57 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2B1E80202978D192006EC199 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; path = include; sourceTree = ""; }; + 2B1E80232978D410006EC199 /* frontend.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = frontend.a; path = ../../frontend.a; sourceTree = ""; }; + 2B1E802529799276006EC199 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -47,6 +45,7 @@ children = ( 2B0EF8392960573400F8EF57 /* lodewallet */, 2B0EF8382960573400F8EF57 /* Products */, + 2B1E80222978D410006EC199 /* Frameworks */, ); sourceTree = ""; }; @@ -61,28 +60,45 @@ 2B0EF8392960573400F8EF57 /* lodewallet */ = { isa = PBXGroup; children = ( + 2B1E80202978D192006EC199 /* include */, 2B0EF83A2960573400F8EF57 /* AppDelegate.h */, 2B0EF83B2960573400F8EF57 /* AppDelegate.m */, - 2B0EF83D2960573400F8EF57 /* SceneDelegate.h */, - 2B0EF83E2960573400F8EF57 /* SceneDelegate.m */, 2B0EF8402960573400F8EF57 /* ViewController.h */, 2B0EF8412960573400F8EF57 /* ViewController.m */, - 2B0EF8432960573400F8EF57 /* Main.storyboard */, 2B0EF8462960573400F8EF57 /* Assets.xcassets */, 2B0EF8482960573400F8EF57 /* LaunchScreen.storyboard */, 2B0EF84B2960573400F8EF57 /* Info.plist */, - 2B0EF84C2960573400F8EF57 /* main.m */, + 2B1E802529799276006EC199 /* main.m */, ); path = lodewallet; sourceTree = ""; }; + 2B1E80222978D410006EC199 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2B1E80232978D410006EC199 /* frontend.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + 2B1E801E2978CF14006EC199 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ 2B0EF8362960573400F8EF57 /* lodewallet */ = { isa = PBXNativeTarget; buildConfigurationList = 2B0EF8502960573400F8EF57 /* Build configuration list for PBXNativeTarget "lodewallet" */; buildPhases = ( + 2B1E801E2978CF14006EC199 /* Headers */, 2B0EF8332960573400F8EF57 /* Sources */, 2B0EF8342960573400F8EF57 /* Frameworks */, 2B0EF8352960573400F8EF57 /* Resources */, @@ -135,7 +151,7 @@ files = ( 2B0EF84A2960573400F8EF57 /* LaunchScreen.storyboard in Resources */, 2B0EF8472960573400F8EF57 /* Assets.xcassets in Resources */, - 2B0EF8452960573400F8EF57 /* Main.storyboard in Resources */, + 2B1E80212978D192006EC199 /* include in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -147,23 +163,14 @@ buildActionMask = 2147483647; files = ( 2B0EF8422960573400F8EF57 /* ViewController.m in Sources */, + 2B1E802629799276006EC199 /* main.m in Sources */, 2B0EF83C2960573400F8EF57 /* AppDelegate.m in Sources */, - 2B0EF84D2960573400F8EF57 /* main.m in Sources */, - 2B0EF83F2960573400F8EF57 /* SceneDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 2B0EF8432960573400F8EF57 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 2B0EF8442960573400F8EF57 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; 2B0EF8482960573400F8EF57 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -290,16 +297,18 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_ARC = NO; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1.2.5.3; DEVELOPMENT_TEAM = 6B335P5EL8; GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = lodewallet/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 16.1; @@ -307,12 +316,20 @@ "$(inherited)", "@executable_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = /Users/luigy; + MACH_O_TYPE = mh_execute; MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.2.5; + OTHER_LDFLAGS = ( + "--verbose", + "-lfrontend", + "-liconv", + ); PRODUCT_BUNDLE_IDENTIFIER = systems.obsidian.lodewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "${SRCROOT}/lodewallet/include/**"; }; name = Debug; }; @@ -321,16 +338,18 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_ARC = NO; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1.2.5.3; DEVELOPMENT_TEAM = 6B335P5EL8; GENERATE_INFOPLIST_FILE = YES; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = lodewallet/Info.plist; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UIMainStoryboardFile = ""; INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 16.1; @@ -338,13 +357,21 @@ "$(inherited)", "@executable_path/Frameworks", ); + LIBRARY_SEARCH_PATHS = /Users/luigy; + MACH_O_TYPE = mh_execute; MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.2.5; + OTHER_LDFLAGS = ( + "--verbose", + "-lfrontend", + "-liconv", + ); PRODUCT_BUNDLE_IDENTIFIER = systems.obsidian.lodewallet; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = "${SRCROOT}/lodewallet/include/**"; }; name = Release; }; diff --git a/lodewallet.xcodeproj/project.xcworkspace/xcuserdata/luigy.xcuserdatad/UserInterfaceState.xcuserstate b/lodewallet.xcodeproj/project.xcworkspace/xcuserdata/luigy.xcuserdatad/UserInterfaceState.xcuserstate index 28ab87bf623fb22c97c07af3c0417b88a6291264..4af21a27ce53f457122d3f608c7fb8234ffc28f2 100644 GIT binary patch literal 58404 zcmYc)$jK}&F)+Boz{tSFz|6qHz{7bh64--8Ll(jV7SR}i{UoI9frFM_ZaRoJYaav@Rs2n!$*cM3||?3F#Kfr!|<1p zfsv7sm645+laY&&n~|SUfKiZ9ozZ~Nn9+pMoY8{On$d>Qp3#BPnbC#Ooza8QlhK#a zk1>cbm@$MglrfSqiZOvPg)x;epRs_kkgf;mYZ%uu zZe-lVxQ%f;<8H=1j0YGGG9G0-#(0YHG~;>33yfD7uQJ|byv2Br@jl~s#vhD78GkYU zX8gnWm+>FtedCC={D0Hrn^k{nC>$@V0y^( zi0LuY6Q-w3FPT0tePjC0^q-l5nS+^=S&>B$isd!SXO=IlJgmH|e60Me0<40p zLaf59BCMjUVysfEimd9a8mtDahOCyXR;*F1ajfyI$*d`?8LXMCxvY7tMXbfF<*XH~ zHLSI)jjTwMM)tUFkDvhHHt&ANwmFY7+m{j3LA z53(L&J;r*L^)l-f);p|sS?{slXMN84f{lTVk&TIsnT>^wm5q&!osENylZ}gwk4=U`dvaM&^z_x>JC)+Nz zLu`lHZnNECyUTWu?LONBwufww*dDVzVSCE5KiC=A8QGc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index 5625678..b74c41c 100644 --- a/lodewallet/AppDelegate.h +++ b/lodewallet/AppDelegate.h @@ -1,14 +1,8 @@ -// -// AppDelegate.h -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - +#include "HsFFI.h" #import @interface AppDelegate : UIResponder +@property (nonatomic, assign) UIWindow *window; @end - diff --git a/lodewallet/AppDelegate.m b/lodewallet/AppDelegate.m index afae922..d66d026 100644 --- a/lodewallet/AppDelegate.m +++ b/lodewallet/AppDelegate.m @@ -1,40 +1,210 @@ -// -// AppDelegate.m -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - #import "AppDelegate.h" +#import "ViewController.h" +#import +#import + +extern void callIO(HsStablePtr); +extern void callWithCString(const char * _Nonnull, HsStablePtr); +extern void callWithCIntCString(int n, const char * _Nonnull, HsStablePtr); @interface AppDelegate () @end +HsStablePtr globalHandler = 0; +HsStablePtr global_willFinishLaunchingWithOptions = 0; +HsStablePtr global_didFinishLaunchingWithOptions = 0; +HsStablePtr global_applicationDidBecomeActive = 0; +HsStablePtr global_applicationWillResignActive = 0; +HsStablePtr global_applicationDidEnterBackground = 0; +HsStablePtr global_applicationWillEnterForeground = 0; +HsStablePtr global_applicationWillTerminate = 0; +HsStablePtr global_applicationSignificantTimeChange = 0; +HsStablePtr global_applicationUniversalLink = 0; +HsStablePtr global_applicationDidReceiveRemoteNotification = 0; +uint64_t global_requestAuthorizationWithOptions = 0; +uint64_t global_requestAuthorizationOptionBadge = 0; +uint64_t global_requestAuthorizationOptionSound = 0; +uint64_t global_requestAuthorizationOptionAlert = 0; +uint64_t global_requestAuthorizationOptionCarPlay = 0; +uint64_t global_registerForRemoteNotifications = 0; +HsStablePtr global_didRegisterForRemoteNotificationsWithDeviceToken = 0; +HsStablePtr global_didFailToRegisterForRemoteNotificationsWithError = 0; + @implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. +- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Tells the delegate that the launch process has begun but that state restoration has not yet occurred. + callIO(global_willFinishLaunchingWithOptions); return YES; } +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Tells the delegate that the launch process is almost done and the app is almost ready to run. + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + // Override point for customization after application launch. + self.window.rootViewController = [[ViewController alloc] initWithHandler:globalHandler]; + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; -#pragma mark - UISceneSession lifecycle + UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; + center.delegate = self; + if (global_requestAuthorizationWithOptions) { + UNAuthorizationOptions options = (UNAuthorizationOptions)0; + if (global_requestAuthorizationOptionBadge) { + options = options | UNAuthorizationOptionBadge; + } + if (global_requestAuthorizationOptionSound) { + options = options | UNAuthorizationOptionSound; + } + if (global_requestAuthorizationOptionAlert) { + options = options | UNAuthorizationOptionAlert; + } + if (global_requestAuthorizationOptionCarPlay) { + options = options | UNAuthorizationOptionCarPlay; + } + [center requestAuthorizationWithOptions:(options) + completionHandler:^(BOOL granted, NSError * _Nullable error) { + // Handler used to alter application behavior based on types of notifications authorized + }]; + if (global_registerForRemoteNotifications) { + [application registerForRemoteNotifications]; + } + } + callIO(global_didFinishLaunchingWithOptions); + return YES; +} -- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { - // Called when a new scene session is being created. - // Use this method to select a configuration to create the new scene with. - return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +- (void)applicationWillResignActive:(UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + callIO(global_applicationWillResignActive); } -- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { - // Called when the user discards a scene session. - // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. - // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +- (void)applicationDidEnterBackground:(UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + callIO(global_applicationDidEnterBackground); } +- (void)applicationWillEnterForeground:(UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + callIO(global_applicationWillEnterForeground); +} + + +- (void)applicationDidBecomeActive:(UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + callIO(global_applicationDidBecomeActive); +} + + +- (void)applicationWillTerminate:(UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + callIO(global_applicationWillTerminate); +} + +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + // Tells the delegate that the app successfully registered with Apple Push Notification service (APNs). + NSString *deviceTokenString = [deviceToken base64EncodedStringWithOptions: 0]; + callWithCString([deviceTokenString UTF8String], global_didRegisterForRemoteNotificationsWithDeviceToken); +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler { + // Sent when the application receives remote notifications in the foreground or background + // TODO Allow a configurable CString -> IO () to be passed into AppDelegateConfig + if ([userInfo valueForKeyPath:@"aps.badge"] != nil) { + [UIApplication sharedApplication].applicationIconBadgeNumber=[[[userInfo objectForKey:@"aps"] objectForKey:@"badge"] intValue]; + } + NSError *error; + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:userInfo options:0 error:&error]; + if (jsonData) { + NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + callWithCIntCString((int) application.applicationState, [jsonString UTF8String], global_applicationDidReceiveRemoteNotification); + } else { + NSLog(@"jsaddle-wkwebview didReceiveRemoteNotification handler: error while serialising push notification as JSON"); + } + completionHandler(UIBackgroundFetchResultNewData); +} + +- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { + // Sent to the delegate when Apple Push Notification service cannot successfully complete the registration process. + NSString *errorString = [error localizedDescription]; + callWithCString([errorString UTF8String], global_didFailToRegisterForRemoteNotificationsWithError); +} + +- (void)applicationSignificantTimeChange:(UIApplication *)application { + // Tells the delegate when there is a significant change in the time. + callIO(global_applicationSignificantTimeChange); +} + +- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler { + // TODO: Reroute universal links when they're clicked in-app. + // https://developer.apple.com/reference/webkit/wknavigationdelegate/1455643-webview?language=objc + if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb] && userActivity.webpageURL) { + callWithCString([userActivity.webpageURL.absoluteString UTF8String], global_applicationUniversalLink); + return YES; + } + return NO; +} + @end + +void runInWKWebView(HsStablePtr handler, + const char * _Nonnull progName, + HsStablePtr hs_willFinishLaunchingWithOptions, + HsStablePtr hs_didFinishLaunchingWithOptions, + HsStablePtr hs_applicationDidBecomeActive, + HsStablePtr hs_applicationWillResignActive, + HsStablePtr hs_applicationDidEnterBackground, + HsStablePtr hs_applicationWillEnterForeground, + HsStablePtr hs_applicationWillTerminate, + HsStablePtr hs_applicationSignificantTimeChange, + HsStablePtr hs_applicationUniversalLink, + HsStablePtr hs_applicationDidReceiveRemoteNotification, + const uint64_t hs_requestAuthorizationWithOptions, + const uint64_t hs_requestAuthorizationOptionBadge, + const uint64_t hs_requestAuthorizationOptionSound, + const uint64_t hs_requestAuthorizationOptionAlert, + const uint64_t hs_requestAuthorizationOptionCarPlay, + const uint64_t hs_registerForRemoteNotifications, + HsStablePtr hs_didRegisterForRemoteNotificationsWithDeviceToken, + HsStablePtr hs_didFailToRegisterForRemoteNotificationsWithError, + const uint64_t hs_developerExtrasEnabled) { + @autoreleasepool { + globalHandler = handler; + global_willFinishLaunchingWithOptions = hs_willFinishLaunchingWithOptions; + global_didFinishLaunchingWithOptions = hs_didFinishLaunchingWithOptions; + global_applicationDidBecomeActive = hs_applicationDidBecomeActive; + global_applicationWillResignActive = hs_applicationWillResignActive; + global_applicationDidEnterBackground = hs_applicationDidEnterBackground; + global_applicationWillEnterForeground = hs_applicationWillEnterForeground; + global_applicationWillTerminate = hs_applicationWillTerminate; + global_applicationSignificantTimeChange = hs_applicationSignificantTimeChange; + global_applicationUniversalLink = hs_applicationUniversalLink; + global_applicationDidReceiveRemoteNotification = hs_applicationDidReceiveRemoteNotification; + global_requestAuthorizationWithOptions = hs_requestAuthorizationWithOptions; + global_requestAuthorizationOptionBadge = hs_requestAuthorizationOptionBadge; + global_requestAuthorizationOptionSound = hs_requestAuthorizationOptionSound; + global_requestAuthorizationOptionAlert = hs_requestAuthorizationOptionAlert; + global_requestAuthorizationOptionCarPlay = hs_requestAuthorizationOptionCarPlay; + global_registerForRemoteNotifications = hs_registerForRemoteNotifications; + global_didRegisterForRemoteNotificationsWithDeviceToken = hs_didRegisterForRemoteNotificationsWithDeviceToken; + global_didFailToRegisterForRemoteNotificationsWithError = hs_didFailToRegisterForRemoteNotificationsWithError; + const char * _Nonnull argv [] = {"", 0}; + UIApplicationMain(0, argv, nil, NSStringFromClass([AppDelegate class])); + } +} + +BOOL openApp(NSURL * url) { + UIApplication *app = [UIApplication sharedApplication]; + if ([app canOpenURL:url]) { + [app openURL:url options:@{} completionHandler:nil]; + return true; + } + return false; +} + diff --git a/lodewallet/Base.lproj/Main.storyboard b/lodewallet/Base.lproj/Main.storyboard deleted file mode 100644 index 808a21c..0000000 --- a/lodewallet/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lodewallet/Info.plist b/lodewallet/Info.plist index 81ed29b..97ff79d 100644 --- a/lodewallet/Info.plist +++ b/lodewallet/Info.plist @@ -6,20 +6,6 @@ UIApplicationSupportsMultipleScenes - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - diff --git a/lodewallet/SceneDelegate.h b/lodewallet/SceneDelegate.h deleted file mode 100644 index 4812c94..0000000 --- a/lodewallet/SceneDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// SceneDelegate.h -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - -#import - -@interface SceneDelegate : UIResponder - -@property (strong, nonatomic) UIWindow * window; - -@end - diff --git a/lodewallet/SceneDelegate.m b/lodewallet/SceneDelegate.m deleted file mode 100644 index 9796286..0000000 --- a/lodewallet/SceneDelegate.m +++ /dev/null @@ -1,57 +0,0 @@ -// -// SceneDelegate.m -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - -#import "SceneDelegate.h" - -@interface SceneDelegate () - -@end - -@implementation SceneDelegate - - -- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). -} - - -- (void)sceneDidDisconnect:(UIScene *)scene { - // Called as the scene is being released by the system. - // This occurs shortly after the scene enters the background, or when its session is discarded. - // Release any resources associated with this scene that can be re-created the next time the scene connects. - // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). -} - - -- (void)sceneDidBecomeActive:(UIScene *)scene { - // Called when the scene has moved from an inactive state to an active state. - // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. -} - - -- (void)sceneWillResignActive:(UIScene *)scene { - // Called when the scene will move from an active state to an inactive state. - // This may occur due to temporary interruptions (ex. an incoming phone call). -} - - -- (void)sceneWillEnterForeground:(UIScene *)scene { - // Called as the scene transitions from the background to the foreground. - // Use this method to undo the changes made on entering the background. -} - - -- (void)sceneDidEnterBackground:(UIScene *)scene { - // Called as the scene transitions from the foreground to the background. - // Use this method to save data, release shared resources, and store enough scene-specific state information - // to restore the scene back to its current state. -} - - -@end diff --git a/lodewallet/ViewController.h b/lodewallet/ViewController.h index 3c0db01..a310903 100644 --- a/lodewallet/ViewController.h +++ b/lodewallet/ViewController.h @@ -1,14 +1,11 @@ -// -// ViewController.h -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - +#include "HsFFI.h" #import +#import @interface ViewController : UIViewController +@property (nonatomic, assign) HsStablePtr handler; +@property (nonatomic, assign) WKWebView *webView; - +- (instancetype)initWithHandler:(HsStablePtr)handler; @end diff --git a/lodewallet/ViewController.m b/lodewallet/ViewController.m index c0cde09..0dcd35e 100644 --- a/lodewallet/ViewController.m +++ b/lodewallet/ViewController.m @@ -1,22 +1,42 @@ -// -// ViewController.m -// lodewallet -// -// Created by Luigy Leon on 12/31/22. -// - #import "ViewController.h" +extern void callWithWebView(WKWebView *, HsStablePtr); + @interface ViewController () @end @implementation ViewController +-(id)initWithHandler:(HsStablePtr)handler { + self = [super init]; + if (self) { + _handler = handler; + } + return self; +} + +- (void)loadView { + [super loadView]; + // WKWebViewConfiguration *theConfiguration = [[WKWebViewConfiguration alloc] init]; + // [theConfiguration.preferences setValue:@YES forKey:@"developerExtrasEnabled"]; + _webView = [[WKWebView alloc] init]; + _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.view = _webView; +} + - (void)viewDidLoad { [super viewDidLoad]; - // Do any additional setup after loading the view. + + callWithWebView(_webView, _handler); +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. } @end + diff --git a/lodewallet/include/Cmm.h b/lodewallet/include/Cmm.h new file mode 100644 index 0000000..e53ed4b --- /dev/null +++ b/lodewallet/include/Cmm.h @@ -0,0 +1,903 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The University of Glasgow 2004-2013 + * + * This file is included at the top of all .cmm source files (and + * *only* .cmm files). It defines a collection of useful macros for + * making .cmm code a bit less error-prone to write, and a bit easier + * on the eye for the reader. + * + * For the syntax of .cmm files, see the parser in ghc/compiler/cmm/CmmParse.y. + * + * Accessing fields of structures defined in the RTS header files is + * done via automatically-generated macros in DerivedConstants.h. For + * example, where previously we used + * + * CurrentTSO->what_next = x + * + * in C-- we now use + * + * StgTSO_what_next(CurrentTSO) = x + * + * where the StgTSO_what_next() macro is automatically generated by + * mkDerivedConstants.c. If you need to access a field that doesn't + * already have a macro, edit that file (it's pretty self-explanatory). + * + * -------------------------------------------------------------------------- */ + +#pragma once + +/* + * In files that are included into both C and C-- (and perhaps + * Haskell) sources, we sometimes need to conditionally compile bits + * depending on the language. CMINUSMINUS==1 in .cmm sources: + */ +#define CMINUSMINUS 1 + +#include "ghcconfig.h" + +/* ----------------------------------------------------------------------------- + Types + + The following synonyms for C-- types are declared here: + + I8, I16, I32, I64 MachRep-style names for convenience + + W_ is shorthand for the word type (== StgWord) + F_ shorthand for float (F_ == StgFloat == C's float) + D_ shorthand for double (D_ == StgDouble == C's double) + + CInt has the same size as an int in C on this platform + CLong has the same size as a long in C on this platform + CBool has the same size as a bool in C on this platform + + --------------------------------------------------------------------------- */ + +#define I8 bits8 +#define I16 bits16 +#define I32 bits32 +#define I64 bits64 +#define P_ gcptr + +#if SIZEOF_VOID_P == 4 +#define W_ bits32 +/* Maybe it's better to include MachDeps.h */ +#define TAG_BITS 2 +#elif SIZEOF_VOID_P == 8 +#define W_ bits64 +/* Maybe it's better to include MachDeps.h */ +#define TAG_BITS 3 +#else +#error Unknown word size +#endif + +/* + * The RTS must sometimes UNTAG a pointer before dereferencing it. + * See the wiki page commentary/rts/haskell-execution/pointer-tagging + */ +#define TAG_MASK ((1 << TAG_BITS) - 1) +#define UNTAG(p) (p & ~TAG_MASK) +#define GETTAG(p) (p & TAG_MASK) + +#if SIZEOF_INT == 4 +#define CInt bits32 +#elif SIZEOF_INT == 8 +#define CInt bits64 +#else +#error Unknown int size +#endif + +#if SIZEOF_LONG == 4 +#define CLong bits32 +#elif SIZEOF_LONG == 8 +#define CLong bits64 +#else +#error Unknown long size +#endif + +#define CBool bits8 + +#define F_ float32 +#define D_ float64 +#define L_ bits64 +#define V16_ bits128 +#define V32_ bits256 +#define V64_ bits512 + +#define SIZEOF_StgDouble 8 +#define SIZEOF_StgWord64 8 + +/* ----------------------------------------------------------------------------- + Misc useful stuff + -------------------------------------------------------------------------- */ + +#define ccall foreign "C" + +#define NULL (0::W_) + +#define STRING(name,str) \ + section "rodata" { \ + name : bits8[] str; \ + } \ + +#if defined(TABLES_NEXT_TO_CODE) +#define RET_LBL(f) f##_info +#else +#define RET_LBL(f) f##_ret +#endif + +#if defined(TABLES_NEXT_TO_CODE) +#define ENTRY_LBL(f) f##_info +#else +#define ENTRY_LBL(f) f##_entry +#endif + +/* ----------------------------------------------------------------------------- + Byte/word macros + + Everything in C-- is in byte offsets (well, most things). We use + some macros to allow us to express offsets in words and to try to + avoid byte/word confusion. + -------------------------------------------------------------------------- */ + +#define SIZEOF_W SIZEOF_VOID_P +#define W_MASK (SIZEOF_W-1) + +#if SIZEOF_W == 4 +#define W_SHIFT 2 +#elif SIZEOF_W == 8 +#define W_SHIFT 3 +#endif + +/* Converting quantities of words to bytes */ +#define WDS(n) ((n)*SIZEOF_W) + +/* + * Converting quantities of bytes to words + * NB. these work on *unsigned* values only + */ +#define BYTES_TO_WDS(n) ((n) / SIZEOF_W) +#define ROUNDUP_BYTES_TO_WDS(n) (((n) + SIZEOF_W - 1) / SIZEOF_W) + +/* + * TO_W_(n) and TO_ZXW_(n) convert n to W_ type from a smaller type, + * with and without sign extension respectively + */ +#if SIZEOF_W == 4 +#define TO_I64(x) %sx64(x) +#define TO_W_(x) %sx32(x) +#define TO_ZXW_(x) %zx32(x) +#define HALF_W_(x) %lobits16(x) +#elif SIZEOF_W == 8 +#define TO_I64(x) (x) +#define TO_W_(x) %sx64(x) +#define TO_ZXW_(x) %zx64(x) +#define HALF_W_(x) %lobits32(x) +#endif + +#if SIZEOF_INT == 4 && SIZEOF_W == 8 +#define W_TO_INT(x) %lobits32(x) +#elif SIZEOF_INT == SIZEOF_W +#define W_TO_INT(x) (x) +#endif + +#if SIZEOF_LONG == 4 && SIZEOF_W == 8 +#define W_TO_LONG(x) %lobits32(x) +#elif SIZEOF_LONG == SIZEOF_W +#define W_TO_LONG(x) (x) +#endif + +/* ----------------------------------------------------------------------------- + Atomic memory operations. + -------------------------------------------------------------------------- */ + +#if SIZEOF_W == 4 +#define cmpxchgW cmpxchg32 +#elif SIZEOF_W == 8 +#define cmpxchgW cmpxchg64 +#endif + +/* ----------------------------------------------------------------------------- + Heap/stack access, and adjusting the heap/stack pointers. + -------------------------------------------------------------------------- */ + +#define Sp(n) W_[Sp + WDS(n)] +#define Hp(n) W_[Hp + WDS(n)] + +#define Sp_adj(n) Sp = Sp + WDS(n) /* pronounced "spadge" */ +#define Hp_adj(n) Hp = Hp + WDS(n) + +/* ----------------------------------------------------------------------------- + Assertions and Debuggery + -------------------------------------------------------------------------- */ + +#if defined(DEBUG) +#define ASSERT(predicate) \ + if (predicate) { \ + /*null*/; \ + } else { \ + foreign "C" _assertFail(__FILE__, __LINE__) never returns; \ + } +#else +#define ASSERT(p) /* nothing */ +#endif + +#if defined(DEBUG) +#define DEBUG_ONLY(s) s +#else +#define DEBUG_ONLY(s) /* nothing */ +#endif + +/* + * The IF_DEBUG macro is useful for debug messages that depend on one + * of the RTS debug options. For example: + * + * IF_DEBUG(RtsFlags_DebugFlags_apply, + * foreign "C" fprintf(stderr, stg_ap_0_ret_str)); + * + * Note the syntax is slightly different to the C version of this macro. + */ +#if defined(DEBUG) +#define IF_DEBUG(c,s) if (RtsFlags_DebugFlags_##c(RtsFlags) != 0::CBool) { s; } +#else +#define IF_DEBUG(c,s) /* nothing */ +#endif + +/* ----------------------------------------------------------------------------- + Entering + + It isn't safe to "enter" every closure. Functions in particular + have no entry code as such; their entry point contains the code to + apply the function. + + ToDo: range should end in N_CLOSURE_TYPES-1, not N_CLOSURE_TYPES, + but switch doesn't allow us to use exprs there yet. + + If R1 points to a tagged object it points either to + * A constructor. + * A function with arity <= TAG_MASK. + In both cases the right thing to do is to return. + Note: it is rather lucky that we can use the tag bits to do this + for both objects. Maybe it points to a brittle design? + + Indirections can contain tagged pointers, so their tag is checked. + -------------------------------------------------------------------------- */ + +#if defined(PROFILING) + +// When profiling, we cannot shortcut ENTER() by checking the tag, +// because LDV profiling relies on entering closures to mark them as +// "used". + +#define LOAD_INFO(ret,x) \ + info = %INFO_PTR(UNTAG(x)); + +#define UNTAG_IF_PROF(x) UNTAG(x) + +#else + +#define LOAD_INFO(ret,x) \ + if (GETTAG(x) != 0) { \ + ret(x); \ + } \ + info = %INFO_PTR(x); + +#define UNTAG_IF_PROF(x) (x) /* already untagged */ + +#endif + +// We need two versions of ENTER(): +// - ENTER(x) takes the closure as an argument and uses return(), +// for use in civilized code where the stack is handled by GHC +// +// - ENTER_NOSTACK() where the closure is in R1, and returns are +// explicit jumps, for use when we are doing the stack management +// ourselves. + +#if defined(PROFILING) +// See Note [Evaluating functions with profiling] in rts/Apply.cmm +#define ENTER(x) jump stg_ap_0_fast(x); +#else +#define ENTER(x) ENTER_(return,x) +#endif + +#define ENTER_R1() ENTER_(RET_R1,R1) + +#define RET_R1(x) jump %ENTRY_CODE(Sp(0)) [R1] + +#define ENTER_(ret,x) \ + again: \ + W_ info; \ + LOAD_INFO(ret,x) \ + /* See Note [Heap memory barriers] in SMP.h */ \ + prim_read_barrier; \ + switch [INVALID_OBJECT .. N_CLOSURE_TYPES] \ + (TO_W_( %INFO_TYPE(%STD_INFO(info)) )) { \ + case \ + IND, \ + IND_STATIC: \ + { \ + x = StgInd_indirectee(x); \ + goto again; \ + } \ + case \ + FUN, \ + FUN_1_0, \ + FUN_0_1, \ + FUN_2_0, \ + FUN_1_1, \ + FUN_0_2, \ + FUN_STATIC, \ + BCO, \ + PAP: \ + { \ + ret(x); \ + } \ + default: \ + { \ + x = UNTAG_IF_PROF(x); \ + jump %ENTRY_CODE(info) (x); \ + } \ + } + +// The FUN cases almost never happen: a pointer to a non-static FUN +// should always be tagged. This unfortunately isn't true for the +// interpreter right now, which leaves untagged FUNs on the stack. + +/* ----------------------------------------------------------------------------- + Constants. + -------------------------------------------------------------------------- */ + +#include "rts/Constants.h" +#include "DerivedConstants.h" +#include "rts/storage/ClosureTypes.h" +#include "rts/storage/FunTypes.h" +#include "rts/OSThreads.h" + +/* + * Need MachRegs, because some of the RTS code is conditionally + * compiled based on REG_R1, REG_R2, etc. + */ +#include "stg/MachRegsForHost.h" + +#include "rts/prof/LDV.h" + +#undef BLOCK_SIZE +#undef MBLOCK_SIZE +#include "rts/storage/Block.h" /* For Bdescr() */ + + +#define MyCapability() (BaseReg - OFFSET_Capability_r) + +/* ------------------------------------------------------------------------- + Info tables + ------------------------------------------------------------------------- */ + +#if defined(PROFILING) +#define PROF_HDR_FIELDS(w_,hdr1,hdr2) \ + w_ hdr1, \ + w_ hdr2, +#else +#define PROF_HDR_FIELDS(w_,hdr1,hdr2) /* nothing */ +#endif + +/* ------------------------------------------------------------------------- + Allocation and garbage collection + ------------------------------------------------------------------------- */ + +/* + * ALLOC_PRIM is for allocating memory on the heap for a primitive + * object. It is used all over PrimOps.cmm. + * + * We make the simplifying assumption that the "admin" part of a + * primitive closure is just the header when calculating sizes for + * ticky-ticky. It's not clear whether eg. the size field of an array + * should be counted as "admin", or the various fields of a BCO. + */ +#define ALLOC_PRIM(bytes) \ + HP_CHK_GEN_TICKY(bytes); \ + TICK_ALLOC_PRIM(SIZEOF_StgHeader,bytes-SIZEOF_StgHeader,0); \ + CCCS_ALLOC(bytes); + +#define HEAP_CHECK(bytes,failure) \ + TICK_BUMP(HEAP_CHK_ctr); \ + Hp = Hp + (bytes); \ + if (Hp > HpLim) { HpAlloc = (bytes); failure; } \ + TICK_ALLOC_HEAP_NOCTR(bytes); + +#define ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,failure) \ + HEAP_CHECK(bytes,failure) \ + TICK_ALLOC_PRIM(SIZEOF_StgHeader,bytes-SIZEOF_StgHeader,0); \ + CCCS_ALLOC(bytes); + +#define ALLOC_PRIM_(bytes,fun) \ + ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,GC_PRIM(fun)); + +#define ALLOC_PRIM_P(bytes,fun,arg) \ + ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,GC_PRIM_P(fun,arg)); + +#define ALLOC_PRIM_N(bytes,fun,arg) \ + ALLOC_PRIM_WITH_CUSTOM_FAILURE(bytes,GC_PRIM_N(fun,arg)); + +/* CCS_ALLOC wants the size in words, because ccs->mem_alloc is in words */ +#define CCCS_ALLOC(__alloc) CCS_ALLOC(BYTES_TO_WDS(__alloc), CCCS) + +#define HP_CHK_GEN_TICKY(bytes) \ + HP_CHK_GEN(bytes); \ + TICK_ALLOC_HEAP_NOCTR(bytes); + +#define HP_CHK_P(bytes, fun, arg) \ + HEAP_CHECK(bytes, GC_PRIM_P(fun,arg)) + +// TODO I'm not seeing where ALLOC_P_TICKY is used; can it be removed? +// -NSF March 2013 +#define ALLOC_P_TICKY(bytes, fun, arg) \ + HP_CHK_P(bytes); \ + TICK_ALLOC_HEAP_NOCTR(bytes); + +#define CHECK_GC() \ + (bdescr_link(CurrentNursery) == NULL || \ + generation_n_new_large_words(W_[g0]) >= TO_W_(CLong[large_alloc_lim])) + +// allocate() allocates from the nursery, so we check to see +// whether the nursery is nearly empty in any function that uses +// allocate() - this includes many of the primops. +// +// HACK alert: the __L__ stuff is here to coax the common-block +// eliminator into commoning up the call stg_gc_noregs() with the same +// code that gets generated by a STK_CHK_GEN() in the same proc. We +// also need an if (0) { goto __L__; } so that the __L__ label isn't +// optimised away by the control-flow optimiser prior to common-block +// elimination (it will be optimised away later). +// +// This saves some code in gmp-wrappers.cmm where we have lots of +// MAYBE_GC() in the same proc as STK_CHK_GEN(). +// +#define MAYBE_GC(retry) \ + if (CHECK_GC()) { \ + HpAlloc = 0; \ + goto __L__; \ + __L__: \ + call stg_gc_noregs(); \ + goto retry; \ + } \ + if (0) { goto __L__; } + +#define GC_PRIM(fun) \ + jump stg_gc_prim(fun); + +// Version of GC_PRIM for use in low-level Cmm. We can call +// stg_gc_prim, because it takes one argument and therefore has a +// platform-independent calling convention (Note [Syntax of .cmm +// files] in CmmParse.y). +#define GC_PRIM_LL(fun) \ + R1 = fun; \ + jump stg_gc_prim [R1]; + +// We pass the fun as the second argument, because the arg is +// usually already in the first argument position (R1), so this +// avoids moving it to a different register / stack slot. +#define GC_PRIM_N(fun,arg) \ + jump stg_gc_prim_n(arg,fun); + +#define GC_PRIM_P(fun,arg) \ + jump stg_gc_prim_p(arg,fun); + +#define GC_PRIM_P_LL(fun,arg) \ + R1 = arg; \ + R2 = fun; \ + jump stg_gc_prim_p_ll [R1,R2]; + +#define GC_PRIM_PP(fun,arg1,arg2) \ + jump stg_gc_prim_pp(arg1,arg2,fun); + +#define MAYBE_GC_(fun) \ + if (CHECK_GC()) { \ + HpAlloc = 0; \ + GC_PRIM(fun) \ + } + +#define MAYBE_GC_N(fun,arg) \ + if (CHECK_GC()) { \ + HpAlloc = 0; \ + GC_PRIM_N(fun,arg) \ + } + +#define MAYBE_GC_P(fun,arg) \ + if (CHECK_GC()) { \ + HpAlloc = 0; \ + GC_PRIM_P(fun,arg) \ + } + +#define MAYBE_GC_PP(fun,arg1,arg2) \ + if (CHECK_GC()) { \ + HpAlloc = 0; \ + GC_PRIM_PP(fun,arg1,arg2) \ + } + +#define STK_CHK_LL(n, fun) \ + TICK_BUMP(STK_CHK_ctr); \ + if (Sp - (n) < SpLim) { \ + GC_PRIM_LL(fun) \ + } + +#define STK_CHK_P_LL(n, fun, arg) \ + TICK_BUMP(STK_CHK_ctr); \ + if (Sp - (n) < SpLim) { \ + GC_PRIM_P_LL(fun,arg) \ + } + +#define STK_CHK_PP(n, fun, arg1, arg2) \ + TICK_BUMP(STK_CHK_ctr); \ + if (Sp - (n) < SpLim) { \ + GC_PRIM_PP(fun,arg1,arg2) \ + } + +#define STK_CHK_ENTER(n, closure) \ + TICK_BUMP(STK_CHK_ctr); \ + if (Sp - (n) < SpLim) { \ + jump __stg_gc_enter_1(closure); \ + } + +// A funky heap check used by AutoApply.cmm + +#define HP_CHK_NP_ASSIGN_SP0(size,f) \ + HEAP_CHECK(size, Sp(0) = f; jump __stg_gc_enter_1 [R1];) + +/* ----------------------------------------------------------------------------- + Closure headers + -------------------------------------------------------------------------- */ + +/* + * This is really ugly, since we don't do the rest of StgHeader this + * way. The problem is that values from DerivedConstants.h cannot be + * dependent on the way (SMP, PROF etc.). For SIZEOF_StgHeader we get + * the value from GHC, but it seems like too much trouble to do that + * for StgThunkHeader. + */ +#define SIZEOF_StgThunkHeader SIZEOF_StgHeader+SIZEOF_StgSMPThunkHeader + +#define StgThunk_payload(__ptr__,__ix__) \ + W_[__ptr__+SIZEOF_StgThunkHeader+ WDS(__ix__)] + +/* ----------------------------------------------------------------------------- + Closures + -------------------------------------------------------------------------- */ + +/* The offset of the payload of an array */ +#define BYTE_ARR_CTS(arr) ((arr) + SIZEOF_StgArrBytes) + +/* The number of words allocated in an array payload */ +#define BYTE_ARR_WDS(arr) ROUNDUP_BYTES_TO_WDS(StgArrBytes_bytes(arr)) + +/* Getting/setting the info pointer of a closure */ +#define SET_INFO(p,info) StgHeader_info(p) = info +#define GET_INFO(p) StgHeader_info(p) + +/* Determine the size of an ordinary closure from its info table */ +#define sizeW_fromITBL(itbl) \ + SIZEOF_StgHeader + WDS(%INFO_PTRS(itbl)) + WDS(%INFO_NPTRS(itbl)) + +/* NB. duplicated from InfoTables.h! */ +#define BITMAP_SIZE(bitmap) ((bitmap) & BITMAP_SIZE_MASK) +#define BITMAP_BITS(bitmap) ((bitmap) >> BITMAP_BITS_SHIFT) + +/* Debugging macros */ +#define LOOKS_LIKE_INFO_PTR(p) \ + ((p) != NULL && \ + LOOKS_LIKE_INFO_PTR_NOT_NULL(p)) + +#define LOOKS_LIKE_INFO_PTR_NOT_NULL(p) \ + ( (TO_W_(%INFO_TYPE(%STD_INFO(p))) != INVALID_OBJECT) && \ + (TO_W_(%INFO_TYPE(%STD_INFO(p))) < N_CLOSURE_TYPES)) + +#define LOOKS_LIKE_CLOSURE_PTR(p) (LOOKS_LIKE_INFO_PTR(GET_INFO(UNTAG(p)))) + +/* + * The layout of the StgFunInfoExtra part of an info table changes + * depending on TABLES_NEXT_TO_CODE. So we define field access + * macros which use the appropriate version here: + */ +#if defined(TABLES_NEXT_TO_CODE) +/* + * when TABLES_NEXT_TO_CODE, slow_apply is stored as an offset + * instead of the normal pointer. + */ + +#define StgFunInfoExtra_slow_apply(fun_info) \ + (TO_W_(StgFunInfoExtraRev_slow_apply_offset(fun_info)) \ + + (fun_info) + SIZEOF_StgFunInfoExtraRev + SIZEOF_StgInfoTable) + +#define StgFunInfoExtra_fun_type(i) StgFunInfoExtraRev_fun_type(i) +#define StgFunInfoExtra_arity(i) StgFunInfoExtraRev_arity(i) +#define StgFunInfoExtra_bitmap(i) StgFunInfoExtraRev_bitmap(i) +#else +#define StgFunInfoExtra_slow_apply(i) StgFunInfoExtraFwd_slow_apply(i) +#define StgFunInfoExtra_fun_type(i) StgFunInfoExtraFwd_fun_type(i) +#define StgFunInfoExtra_arity(i) StgFunInfoExtraFwd_arity(i) +#define StgFunInfoExtra_bitmap(i) StgFunInfoExtraFwd_bitmap(i) +#endif + +#define mutArrCardMask ((1 << MUT_ARR_PTRS_CARD_BITS) - 1) +#define mutArrPtrCardDown(i) ((i) >> MUT_ARR_PTRS_CARD_BITS) +#define mutArrPtrCardUp(i) (((i) + mutArrCardMask) >> MUT_ARR_PTRS_CARD_BITS) +#define mutArrPtrsCardWords(n) ROUNDUP_BYTES_TO_WDS(mutArrPtrCardUp(n)) + +#if defined(PROFILING) || (!defined(THREADED_RTS) && defined(DEBUG)) +#define OVERWRITING_CLOSURE_SIZE(c, size) foreign "C" overwritingClosureSize(c "ptr", size) +#define OVERWRITING_CLOSURE(c) foreign "C" overwritingClosure(c "ptr") +#define OVERWRITING_CLOSURE_OFS(c,n) foreign "C" overwritingClosureOfs(c "ptr", n) +#else +#define OVERWRITING_CLOSURE_SIZE(c, size) /* nothing */ +#define OVERWRITING_CLOSURE(c) /* nothing */ +#define OVERWRITING_CLOSURE_OFS(c,n) /* nothing */ +#endif + +// Memory barriers. +// For discussion of how these are used to fence heap object +// accesses see Note [Heap memory barriers] in SMP.h. +#if defined(THREADED_RTS) +#define prim_read_barrier prim %read_barrier() +#else +#define prim_read_barrier /* nothing */ +#endif +#if defined(THREADED_RTS) +#define prim_write_barrier prim %write_barrier() +#else +#define prim_write_barrier /* nothing */ +#endif + +/* ----------------------------------------------------------------------------- + Ticky macros + -------------------------------------------------------------------------- */ + +#if defined(TICKY_TICKY) +#define TICK_BUMP_BY(ctr,n) CLong[ctr] = CLong[ctr] + n +#else +#define TICK_BUMP_BY(ctr,n) /* nothing */ +#endif + +#define TICK_BUMP(ctr) TICK_BUMP_BY(ctr,1) + +#define TICK_ENT_DYN_IND() TICK_BUMP(ENT_DYN_IND_ctr) +#define TICK_ENT_DYN_THK() TICK_BUMP(ENT_DYN_THK_ctr) +#define TICK_ENT_VIA_NODE() TICK_BUMP(ENT_VIA_NODE_ctr) +#define TICK_ENT_STATIC_IND() TICK_BUMP(ENT_STATIC_IND_ctr) +#define TICK_ENT_PERM_IND() TICK_BUMP(ENT_PERM_IND_ctr) +#define TICK_ENT_PAP() TICK_BUMP(ENT_PAP_ctr) +#define TICK_ENT_AP() TICK_BUMP(ENT_AP_ctr) +#define TICK_ENT_AP_STACK() TICK_BUMP(ENT_AP_STACK_ctr) +#define TICK_ENT_BH() TICK_BUMP(ENT_BH_ctr) +#define TICK_ENT_LNE() TICK_BUMP(ENT_LNE_ctr) +#define TICK_UNKNOWN_CALL() TICK_BUMP(UNKNOWN_CALL_ctr) +#define TICK_UPDF_PUSHED() TICK_BUMP(UPDF_PUSHED_ctr) +#define TICK_CATCHF_PUSHED() TICK_BUMP(CATCHF_PUSHED_ctr) +#define TICK_UPDF_OMITTED() TICK_BUMP(UPDF_OMITTED_ctr) +#define TICK_UPD_NEW_IND() TICK_BUMP(UPD_NEW_IND_ctr) +#define TICK_UPD_NEW_PERM_IND() TICK_BUMP(UPD_NEW_PERM_IND_ctr) +#define TICK_UPD_OLD_IND() TICK_BUMP(UPD_OLD_IND_ctr) +#define TICK_UPD_OLD_PERM_IND() TICK_BUMP(UPD_OLD_PERM_IND_ctr) + +#define TICK_SLOW_CALL_FUN_TOO_FEW() TICK_BUMP(SLOW_CALL_FUN_TOO_FEW_ctr) +#define TICK_SLOW_CALL_FUN_CORRECT() TICK_BUMP(SLOW_CALL_FUN_CORRECT_ctr) +#define TICK_SLOW_CALL_FUN_TOO_MANY() TICK_BUMP(SLOW_CALL_FUN_TOO_MANY_ctr) +#define TICK_SLOW_CALL_PAP_TOO_FEW() TICK_BUMP(SLOW_CALL_PAP_TOO_FEW_ctr) +#define TICK_SLOW_CALL_PAP_CORRECT() TICK_BUMP(SLOW_CALL_PAP_CORRECT_ctr) +#define TICK_SLOW_CALL_PAP_TOO_MANY() TICK_BUMP(SLOW_CALL_PAP_TOO_MANY_ctr) + +#define TICK_SLOW_CALL_fast_v16() TICK_BUMP(SLOW_CALL_fast_v16_ctr) +#define TICK_SLOW_CALL_fast_v() TICK_BUMP(SLOW_CALL_fast_v_ctr) +#define TICK_SLOW_CALL_fast_p() TICK_BUMP(SLOW_CALL_fast_p_ctr) +#define TICK_SLOW_CALL_fast_pv() TICK_BUMP(SLOW_CALL_fast_pv_ctr) +#define TICK_SLOW_CALL_fast_pp() TICK_BUMP(SLOW_CALL_fast_pp_ctr) +#define TICK_SLOW_CALL_fast_ppv() TICK_BUMP(SLOW_CALL_fast_ppv_ctr) +#define TICK_SLOW_CALL_fast_ppp() TICK_BUMP(SLOW_CALL_fast_ppp_ctr) +#define TICK_SLOW_CALL_fast_pppv() TICK_BUMP(SLOW_CALL_fast_pppv_ctr) +#define TICK_SLOW_CALL_fast_pppp() TICK_BUMP(SLOW_CALL_fast_pppp_ctr) +#define TICK_SLOW_CALL_fast_ppppp() TICK_BUMP(SLOW_CALL_fast_ppppp_ctr) +#define TICK_SLOW_CALL_fast_pppppp() TICK_BUMP(SLOW_CALL_fast_pppppp_ctr) +#define TICK_VERY_SLOW_CALL() TICK_BUMP(VERY_SLOW_CALL_ctr) + +/* NOTE: TICK_HISTO_BY and TICK_HISTO + currently have no effect. + The old code for it didn't typecheck and I + just commented it out to get ticky to work. + - krc 1/2007 */ + +#define TICK_HISTO_BY(histo,n,i) /* nothing */ + +#define TICK_HISTO(histo,n) TICK_HISTO_BY(histo,n,1) + +/* An unboxed tuple with n components. */ +#define TICK_RET_UNBOXED_TUP(n) \ + TICK_BUMP(RET_UNBOXED_TUP_ctr++); \ + TICK_HISTO(RET_UNBOXED_TUP,n) + +/* + * A slow call with n arguments. In the unevald case, this call has + * already been counted once, so don't count it again. + */ +#define TICK_SLOW_CALL(n) \ + TICK_BUMP(SLOW_CALL_ctr); \ + TICK_HISTO(SLOW_CALL,n) + +/* + * This slow call was found to be to an unevaluated function; undo the + * ticks we did in TICK_SLOW_CALL. + */ +#define TICK_SLOW_CALL_UNEVALD(n) \ + TICK_BUMP(SLOW_CALL_UNEVALD_ctr); \ + TICK_BUMP_BY(SLOW_CALL_ctr,-1); \ + TICK_HISTO_BY(SLOW_CALL,n,-1); + +/* Updating a closure with a new CON */ +#define TICK_UPD_CON_IN_NEW(n) \ + TICK_BUMP(UPD_CON_IN_NEW_ctr); \ + TICK_HISTO(UPD_CON_IN_NEW,n) + +#define TICK_ALLOC_HEAP_NOCTR(bytes) \ + TICK_BUMP(ALLOC_RTS_ctr); \ + TICK_BUMP_BY(ALLOC_RTS_tot,bytes) + +/* ----------------------------------------------------------------------------- + Misc junk + -------------------------------------------------------------------------- */ + +#define NO_TREC stg_NO_TREC_closure +#define END_TSO_QUEUE stg_END_TSO_QUEUE_closure +#define STM_AWOKEN stg_STM_AWOKEN_closure + +#define recordMutableCap(p, gen) \ + W_ __bd; \ + W_ mut_list; \ + mut_list = Capability_mut_lists(MyCapability()) + WDS(gen); \ + __bd = W_[mut_list]; \ + if (bdescr_free(__bd) >= bdescr_start(__bd) + BLOCK_SIZE) { \ + W_ __new_bd; \ + ("ptr" __new_bd) = foreign "C" allocBlock_lock(); \ + bdescr_link(__new_bd) = __bd; \ + __bd = __new_bd; \ + W_[mut_list] = __bd; \ + } \ + W_ free; \ + free = bdescr_free(__bd); \ + W_[free] = p; \ + bdescr_free(__bd) = free + WDS(1); + +#define recordMutable(p) \ + P_ __p; \ + W_ __bd; \ + W_ __gen; \ + __p = p; \ + __bd = Bdescr(__p); \ + __gen = TO_W_(bdescr_gen_no(__bd)); \ + if (__gen > 0) { recordMutableCap(__p, __gen); } + +/* ----------------------------------------------------------------------------- + Update remembered set write barrier + -------------------------------------------------------------------------- */ + +/* ----------------------------------------------------------------------------- + Arrays + -------------------------------------------------------------------------- */ + +/* Complete function body for the clone family of (mutable) array ops. + Defined as a macro to avoid function call overhead or code + duplication. */ +#define cloneArray(info, src, offset, n) \ + W_ words, size; \ + gcptr dst, dst_p, src_p; \ + \ + again: MAYBE_GC(again); \ + \ + size = n + mutArrPtrsCardWords(n); \ + words = BYTES_TO_WDS(SIZEOF_StgMutArrPtrs) + size; \ + ("ptr" dst) = ccall allocate(MyCapability() "ptr", words); \ + TICK_ALLOC_PRIM(SIZEOF_StgMutArrPtrs, WDS(size), 0); \ + \ + SET_HDR(dst, info, CCCS); \ + StgMutArrPtrs_ptrs(dst) = n; \ + StgMutArrPtrs_size(dst) = size; \ + \ + dst_p = dst + SIZEOF_StgMutArrPtrs; \ + src_p = src + SIZEOF_StgMutArrPtrs + WDS(offset); \ + prim %memcpy(dst_p, src_p, n * SIZEOF_W, SIZEOF_W); \ + \ + return (dst); + +#define copyArray(src, src_off, dst, dst_off, n) \ + W_ dst_elems_p, dst_p, src_p, dst_cards_p, bytes; \ + \ + if ((n) != 0) { \ + SET_HDR(dst, stg_MUT_ARR_PTRS_DIRTY_info, CCCS); \ + \ + dst_elems_p = (dst) + SIZEOF_StgMutArrPtrs; \ + dst_p = dst_elems_p + WDS(dst_off); \ + src_p = (src) + SIZEOF_StgMutArrPtrs + WDS(src_off); \ + bytes = WDS(n); \ + \ + prim %memcpy(dst_p, src_p, bytes, SIZEOF_W); \ + \ + dst_cards_p = dst_elems_p + WDS(StgMutArrPtrs_ptrs(dst)); \ + setCards(dst_cards_p, dst_off, n); \ + } \ + \ + return (); + +#define copyMutableArray(src, src_off, dst, dst_off, n) \ + W_ dst_elems_p, dst_p, src_p, dst_cards_p, bytes; \ + \ + if ((n) != 0) { \ + SET_HDR(dst, stg_MUT_ARR_PTRS_DIRTY_info, CCCS); \ + \ + dst_elems_p = (dst) + SIZEOF_StgMutArrPtrs; \ + dst_p = dst_elems_p + WDS(dst_off); \ + src_p = (src) + SIZEOF_StgMutArrPtrs + WDS(src_off); \ + bytes = WDS(n); \ + \ + if ((src) == (dst)) { \ + prim %memmove(dst_p, src_p, bytes, SIZEOF_W); \ + } else { \ + prim %memcpy(dst_p, src_p, bytes, SIZEOF_W); \ + } \ + \ + dst_cards_p = dst_elems_p + WDS(StgMutArrPtrs_ptrs(dst)); \ + setCards(dst_cards_p, dst_off, n); \ + } \ + \ + return (); + +/* + * Set the cards in the cards table pointed to by dst_cards_p for an + * update to n elements, starting at element dst_off. + */ +#define setCards(dst_cards_p, dst_off, n) \ + W_ __start_card, __end_card, __cards; \ + __start_card = mutArrPtrCardDown(dst_off); \ + __end_card = mutArrPtrCardDown((dst_off) + (n) - 1); \ + __cards = __end_card - __start_card + 1; \ + prim %memset((dst_cards_p) + __start_card, 1, __cards, 1); + +/* Complete function body for the clone family of small (mutable) + array ops. Defined as a macro to avoid function call overhead or + code duplication. */ +#define cloneSmallArray(info, src, offset, n) \ + W_ words, size; \ + gcptr dst, dst_p, src_p; \ + \ + again: MAYBE_GC(again); \ + \ + words = BYTES_TO_WDS(SIZEOF_StgSmallMutArrPtrs) + n; \ + ("ptr" dst) = ccall allocate(MyCapability() "ptr", words); \ + TICK_ALLOC_PRIM(SIZEOF_StgSmallMutArrPtrs, WDS(n), 0); \ + \ + SET_HDR(dst, info, CCCS); \ + StgSmallMutArrPtrs_ptrs(dst) = n; \ + \ + dst_p = dst + SIZEOF_StgSmallMutArrPtrs; \ + src_p = src + SIZEOF_StgSmallMutArrPtrs + WDS(offset); \ + prim %memcpy(dst_p, src_p, n * SIZEOF_W, SIZEOF_W); \ + \ + return (dst); + + +// +// Nonmoving write barrier helpers +// +// See Note [Update remembered set] in NonMovingMark.c. + +#if defined(THREADED_RTS) +#define IF_NONMOVING_WRITE_BARRIER_ENABLED \ + if (W_[nonmoving_write_barrier_enabled] != 0) (likely: False) +#else +// A similar measure is also taken in rts/NonMoving.h, but that isn't visible from C-- +#define IF_NONMOVING_WRITE_BARRIER_ENABLED \ + if (0) +#define nonmoving_write_barrier_enabled 0 +#endif + +// A useful helper for pushing a pointer to the update remembered set. +#define updateRemembSetPushPtr(p) \ + IF_NONMOVING_WRITE_BARRIER_ENABLED { \ + ccall updateRemembSetPushClosure_(BaseReg "ptr", p "ptr"); \ + } diff --git a/lodewallet/include/DerivedConstants.h b/lodewallet/include/DerivedConstants.h new file mode 100644 index 0000000..8b89431 --- /dev/null +++ b/lodewallet/include/DerivedConstants.h @@ -0,0 +1,555 @@ +/* This file is created automatically. Do not edit by hand.*/ + +#define CONTROL_GROUP_CONST_291 291 +#define STD_HDR_SIZE 1 +#define PROF_HDR_SIZE 2 +#define STACK_DIRTY 1 +#define BLOCK_SIZE 4096 +#define MBLOCK_SIZE 1048576 +#define BLOCKS_PER_MBLOCK 252 +#define TICKY_BIN_COUNT 9 +#define OFFSET_StgRegTable_rR1 0 +#define OFFSET_StgRegTable_rR2 8 +#define OFFSET_StgRegTable_rR3 16 +#define OFFSET_StgRegTable_rR4 24 +#define OFFSET_StgRegTable_rR5 32 +#define OFFSET_StgRegTable_rR6 40 +#define OFFSET_StgRegTable_rR7 48 +#define OFFSET_StgRegTable_rR8 56 +#define OFFSET_StgRegTable_rR9 64 +#define OFFSET_StgRegTable_rR10 72 +#define OFFSET_StgRegTable_rF1 80 +#define OFFSET_StgRegTable_rF2 84 +#define OFFSET_StgRegTable_rF3 88 +#define OFFSET_StgRegTable_rF4 92 +#define OFFSET_StgRegTable_rF5 96 +#define OFFSET_StgRegTable_rF6 100 +#define OFFSET_StgRegTable_rD1 104 +#define OFFSET_StgRegTable_rD2 112 +#define OFFSET_StgRegTable_rD3 120 +#define OFFSET_StgRegTable_rD4 128 +#define OFFSET_StgRegTable_rD5 136 +#define OFFSET_StgRegTable_rD6 144 +#define OFFSET_StgRegTable_rXMM1 152 +#define OFFSET_StgRegTable_rXMM2 168 +#define OFFSET_StgRegTable_rXMM3 184 +#define OFFSET_StgRegTable_rXMM4 200 +#define OFFSET_StgRegTable_rXMM5 216 +#define OFFSET_StgRegTable_rXMM6 232 +#define OFFSET_StgRegTable_rYMM1 248 +#define OFFSET_StgRegTable_rYMM2 280 +#define OFFSET_StgRegTable_rYMM3 312 +#define OFFSET_StgRegTable_rYMM4 344 +#define OFFSET_StgRegTable_rYMM5 376 +#define OFFSET_StgRegTable_rYMM6 408 +#define OFFSET_StgRegTable_rZMM1 440 +#define OFFSET_StgRegTable_rZMM2 504 +#define OFFSET_StgRegTable_rZMM3 568 +#define OFFSET_StgRegTable_rZMM4 632 +#define OFFSET_StgRegTable_rZMM5 696 +#define OFFSET_StgRegTable_rZMM6 760 +#define OFFSET_StgRegTable_rL1 824 +#define OFFSET_StgRegTable_rSp 832 +#define OFFSET_StgRegTable_rSpLim 840 +#define OFFSET_StgRegTable_rHp 848 +#define OFFSET_StgRegTable_rHpLim 856 +#define OFFSET_StgRegTable_rCCCS 864 +#define OFFSET_StgRegTable_rCurrentTSO 872 +#define OFFSET_StgRegTable_rCurrentNursery 888 +#define OFFSET_StgRegTable_rHpAlloc 904 +#define OFFSET_StgRegTable_rRet 912 +#define REP_StgRegTable_rRet b64 +#define StgRegTable_rRet(__ptr__) REP_StgRegTable_rRet[__ptr__+OFFSET_StgRegTable_rRet] +#define OFFSET_StgRegTable_rNursery 880 +#define REP_StgRegTable_rNursery b64 +#define StgRegTable_rNursery(__ptr__) REP_StgRegTable_rNursery[__ptr__+OFFSET_StgRegTable_rNursery] +#define OFFSET_stgEagerBlackholeInfo -24 +#define OFFSET_stgGCEnter1 -16 +#define OFFSET_stgGCFun -8 +#define OFFSET_Capability_r 24 +#define OFFSET_Capability_lock 1208 +#define OFFSET_Capability_no 944 +#define REP_Capability_no b32 +#define Capability_no(__ptr__) REP_Capability_no[__ptr__+OFFSET_Capability_no] +#define OFFSET_Capability_mut_lists 1016 +#define REP_Capability_mut_lists b64 +#define Capability_mut_lists(__ptr__) REP_Capability_mut_lists[__ptr__+OFFSET_Capability_mut_lists] +#define OFFSET_Capability_context_switch 1176 +#define REP_Capability_context_switch b32 +#define Capability_context_switch(__ptr__) REP_Capability_context_switch[__ptr__+OFFSET_Capability_context_switch] +#define OFFSET_Capability_interrupt 1180 +#define REP_Capability_interrupt b32 +#define Capability_interrupt(__ptr__) REP_Capability_interrupt[__ptr__+OFFSET_Capability_interrupt] +#define OFFSET_Capability_sparks 1312 +#define REP_Capability_sparks b64 +#define Capability_sparks(__ptr__) REP_Capability_sparks[__ptr__+OFFSET_Capability_sparks] +#define OFFSET_Capability_total_allocated 1184 +#define REP_Capability_total_allocated b64 +#define Capability_total_allocated(__ptr__) REP_Capability_total_allocated[__ptr__+OFFSET_Capability_total_allocated] +#define OFFSET_Capability_weak_ptr_list_hd 1160 +#define REP_Capability_weak_ptr_list_hd b64 +#define Capability_weak_ptr_list_hd(__ptr__) REP_Capability_weak_ptr_list_hd[__ptr__+OFFSET_Capability_weak_ptr_list_hd] +#define OFFSET_Capability_weak_ptr_list_tl 1168 +#define REP_Capability_weak_ptr_list_tl b64 +#define Capability_weak_ptr_list_tl(__ptr__) REP_Capability_weak_ptr_list_tl[__ptr__+OFFSET_Capability_weak_ptr_list_tl] +#define OFFSET_bdescr_start 0 +#define REP_bdescr_start b64 +#define bdescr_start(__ptr__) REP_bdescr_start[__ptr__+OFFSET_bdescr_start] +#define OFFSET_bdescr_free 8 +#define REP_bdescr_free b64 +#define bdescr_free(__ptr__) REP_bdescr_free[__ptr__+OFFSET_bdescr_free] +#define OFFSET_bdescr_blocks 48 +#define REP_bdescr_blocks b32 +#define bdescr_blocks(__ptr__) REP_bdescr_blocks[__ptr__+OFFSET_bdescr_blocks] +#define OFFSET_bdescr_gen_no 40 +#define REP_bdescr_gen_no b16 +#define bdescr_gen_no(__ptr__) REP_bdescr_gen_no[__ptr__+OFFSET_bdescr_gen_no] +#define OFFSET_bdescr_link 16 +#define REP_bdescr_link b64 +#define bdescr_link(__ptr__) REP_bdescr_link[__ptr__+OFFSET_bdescr_link] +#define OFFSET_bdescr_flags 46 +#define REP_bdescr_flags b16 +#define bdescr_flags(__ptr__) REP_bdescr_flags[__ptr__+OFFSET_bdescr_flags] +#define SIZEOF_generation 384 +#define OFFSET_generation_n_new_large_words 56 +#define REP_generation_n_new_large_words b64 +#define generation_n_new_large_words(__ptr__) REP_generation_n_new_large_words[__ptr__+OFFSET_generation_n_new_large_words] +#define OFFSET_generation_weak_ptr_list 112 +#define REP_generation_weak_ptr_list b64 +#define generation_weak_ptr_list(__ptr__) REP_generation_weak_ptr_list[__ptr__+OFFSET_generation_weak_ptr_list] +#define SIZEOF_CostCentreStack 96 +#define OFFSET_CostCentreStack_ccsID 0 +#define REP_CostCentreStack_ccsID b64 +#define CostCentreStack_ccsID(__ptr__) REP_CostCentreStack_ccsID[__ptr__+OFFSET_CostCentreStack_ccsID] +#define OFFSET_CostCentreStack_mem_alloc 72 +#define REP_CostCentreStack_mem_alloc b64 +#define CostCentreStack_mem_alloc(__ptr__) REP_CostCentreStack_mem_alloc[__ptr__+OFFSET_CostCentreStack_mem_alloc] +#define OFFSET_CostCentreStack_scc_count 48 +#define REP_CostCentreStack_scc_count b64 +#define CostCentreStack_scc_count(__ptr__) REP_CostCentreStack_scc_count[__ptr__+OFFSET_CostCentreStack_scc_count] +#define OFFSET_CostCentreStack_prevStack 16 +#define REP_CostCentreStack_prevStack b64 +#define CostCentreStack_prevStack(__ptr__) REP_CostCentreStack_prevStack[__ptr__+OFFSET_CostCentreStack_prevStack] +#define OFFSET_CostCentre_ccID 0 +#define REP_CostCentre_ccID b64 +#define CostCentre_ccID(__ptr__) REP_CostCentre_ccID[__ptr__+OFFSET_CostCentre_ccID] +#define OFFSET_CostCentre_link 56 +#define REP_CostCentre_link b64 +#define CostCentre_link(__ptr__) REP_CostCentre_link[__ptr__+OFFSET_CostCentre_link] +#define OFFSET_StgHeader_info 0 +#define REP_StgHeader_info b64 +#define StgHeader_info(__ptr__) REP_StgHeader_info[__ptr__+OFFSET_StgHeader_info] +#define OFFSET_StgHeader_ccs 8 +#define REP_StgHeader_ccs b64 +#define StgHeader_ccs(__ptr__) REP_StgHeader_ccs[__ptr__+OFFSET_StgHeader_ccs] +#define OFFSET_StgHeader_ldvw 16 +#define REP_StgHeader_ldvw b64 +#define StgHeader_ldvw(__ptr__) REP_StgHeader_ldvw[__ptr__+OFFSET_StgHeader_ldvw] +#define SIZEOF_StgSMPThunkHeader 8 +#define OFFSET_StgClosure_payload 0 +#define StgClosure_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgClosure_payload + WDS(__ix__)] +#define OFFSET_StgEntCounter_allocs 48 +#define REP_StgEntCounter_allocs b64 +#define StgEntCounter_allocs(__ptr__) REP_StgEntCounter_allocs[__ptr__+OFFSET_StgEntCounter_allocs] +#define OFFSET_StgEntCounter_allocd 16 +#define REP_StgEntCounter_allocd b64 +#define StgEntCounter_allocd(__ptr__) REP_StgEntCounter_allocd[__ptr__+OFFSET_StgEntCounter_allocd] +#define OFFSET_StgEntCounter_registeredp 0 +#define REP_StgEntCounter_registeredp b64 +#define StgEntCounter_registeredp(__ptr__) REP_StgEntCounter_registeredp[__ptr__+OFFSET_StgEntCounter_registeredp] +#define OFFSET_StgEntCounter_link 56 +#define REP_StgEntCounter_link b64 +#define StgEntCounter_link(__ptr__) REP_StgEntCounter_link[__ptr__+OFFSET_StgEntCounter_link] +#define OFFSET_StgEntCounter_entry_count 40 +#define REP_StgEntCounter_entry_count b64 +#define StgEntCounter_entry_count(__ptr__) REP_StgEntCounter_entry_count[__ptr__+OFFSET_StgEntCounter_entry_count] +#define SIZEOF_StgUpdateFrame_NoHdr 8 +#define SIZEOF_StgUpdateFrame (SIZEOF_StgHeader+8) +#define SIZEOF_StgCatchFrame_NoHdr 16 +#define SIZEOF_StgCatchFrame (SIZEOF_StgHeader+16) +#define SIZEOF_StgStopFrame_NoHdr 0 +#define SIZEOF_StgStopFrame (SIZEOF_StgHeader+0) +#define SIZEOF_StgMutArrPtrs_NoHdr 16 +#define SIZEOF_StgMutArrPtrs (SIZEOF_StgHeader+16) +#define OFFSET_StgMutArrPtrs_ptrs 0 +#define REP_StgMutArrPtrs_ptrs b64 +#define StgMutArrPtrs_ptrs(__ptr__) REP_StgMutArrPtrs_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_ptrs] +#define OFFSET_StgMutArrPtrs_size 8 +#define REP_StgMutArrPtrs_size b64 +#define StgMutArrPtrs_size(__ptr__) REP_StgMutArrPtrs_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutArrPtrs_size] +#define SIZEOF_StgSmallMutArrPtrs_NoHdr 8 +#define SIZEOF_StgSmallMutArrPtrs (SIZEOF_StgHeader+8) +#define OFFSET_StgSmallMutArrPtrs_ptrs 0 +#define REP_StgSmallMutArrPtrs_ptrs b64 +#define StgSmallMutArrPtrs_ptrs(__ptr__) REP_StgSmallMutArrPtrs_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgSmallMutArrPtrs_ptrs] +#define SIZEOF_StgArrBytes_NoHdr 8 +#define SIZEOF_StgArrBytes (SIZEOF_StgHeader+8) +#define OFFSET_StgArrBytes_bytes 0 +#define REP_StgArrBytes_bytes b64 +#define StgArrBytes_bytes(__ptr__) REP_StgArrBytes_bytes[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrBytes_bytes] +#define OFFSET_StgArrBytes_payload 8 +#define StgArrBytes_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgArrBytes_payload + WDS(__ix__)] +#define OFFSET_StgTSO__link 0 +#define REP_StgTSO__link b64 +#define StgTSO__link(__ptr__) REP_StgTSO__link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO__link] +#define OFFSET_StgTSO_global_link 8 +#define REP_StgTSO_global_link b64 +#define StgTSO_global_link(__ptr__) REP_StgTSO_global_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_global_link] +#define OFFSET_StgTSO_what_next 24 +#define REP_StgTSO_what_next b16 +#define StgTSO_what_next(__ptr__) REP_StgTSO_what_next[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_what_next] +#define OFFSET_StgTSO_why_blocked 26 +#define REP_StgTSO_why_blocked b16 +#define StgTSO_why_blocked(__ptr__) REP_StgTSO_why_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_why_blocked] +#define OFFSET_StgTSO_block_info 32 +#define REP_StgTSO_block_info b64 +#define StgTSO_block_info(__ptr__) REP_StgTSO_block_info[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_block_info] +#define OFFSET_StgTSO_blocked_exceptions 80 +#define REP_StgTSO_blocked_exceptions b64 +#define StgTSO_blocked_exceptions(__ptr__) REP_StgTSO_blocked_exceptions[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_blocked_exceptions] +#define OFFSET_StgTSO_id 40 +#define REP_StgTSO_id b32 +#define StgTSO_id(__ptr__) REP_StgTSO_id[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_id] +#define OFFSET_StgTSO_cap 64 +#define REP_StgTSO_cap b64 +#define StgTSO_cap(__ptr__) REP_StgTSO_cap[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_cap] +#define OFFSET_StgTSO_saved_errno 44 +#define REP_StgTSO_saved_errno b32 +#define StgTSO_saved_errno(__ptr__) REP_StgTSO_saved_errno[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_saved_errno] +#define OFFSET_StgTSO_trec 72 +#define REP_StgTSO_trec b64 +#define StgTSO_trec(__ptr__) REP_StgTSO_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_trec] +#define OFFSET_StgTSO_flags 28 +#define REP_StgTSO_flags b32 +#define StgTSO_flags(__ptr__) REP_StgTSO_flags[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_flags] +#define OFFSET_StgTSO_dirty 48 +#define REP_StgTSO_dirty b32 +#define StgTSO_dirty(__ptr__) REP_StgTSO_dirty[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_dirty] +#define OFFSET_StgTSO_bq 88 +#define REP_StgTSO_bq b64 +#define StgTSO_bq(__ptr__) REP_StgTSO_bq[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_bq] +#define OFFSET_StgTSO_alloc_limit 96 +#define REP_StgTSO_alloc_limit b64 +#define StgTSO_alloc_limit(__ptr__) REP_StgTSO_alloc_limit[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_alloc_limit] +#define OFFSET_StgTSO_cccs 112 +#define REP_StgTSO_cccs b64 +#define StgTSO_cccs(__ptr__) REP_StgTSO_cccs[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_cccs] +#define OFFSET_StgTSO_stackobj 16 +#define REP_StgTSO_stackobj b64 +#define StgTSO_stackobj(__ptr__) REP_StgTSO_stackobj[__ptr__+SIZEOF_StgHeader+OFFSET_StgTSO_stackobj] +#define OFFSET_StgStack_sp 8 +#define REP_StgStack_sp b64 +#define StgStack_sp(__ptr__) REP_StgStack_sp[__ptr__+SIZEOF_StgHeader+OFFSET_StgStack_sp] +#define OFFSET_StgStack_stack 16 +#define OFFSET_StgStack_stack_size 0 +#define REP_StgStack_stack_size b32 +#define StgStack_stack_size(__ptr__) REP_StgStack_stack_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgStack_stack_size] +#define OFFSET_StgStack_dirty 4 +#define REP_StgStack_dirty b8 +#define StgStack_dirty(__ptr__) REP_StgStack_dirty[__ptr__+SIZEOF_StgHeader+OFFSET_StgStack_dirty] +#define SIZEOF_StgTSOProfInfo 8 +#define OFFSET_StgUpdateFrame_updatee 0 +#define REP_StgUpdateFrame_updatee b64 +#define StgUpdateFrame_updatee(__ptr__) REP_StgUpdateFrame_updatee[__ptr__+SIZEOF_StgHeader+OFFSET_StgUpdateFrame_updatee] +#define OFFSET_StgCatchFrame_handler 8 +#define REP_StgCatchFrame_handler b64 +#define StgCatchFrame_handler(__ptr__) REP_StgCatchFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_handler] +#define OFFSET_StgCatchFrame_exceptions_blocked 0 +#define REP_StgCatchFrame_exceptions_blocked b64 +#define StgCatchFrame_exceptions_blocked(__ptr__) REP_StgCatchFrame_exceptions_blocked[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchFrame_exceptions_blocked] +#define SIZEOF_StgPAP_NoHdr 16 +#define SIZEOF_StgPAP (SIZEOF_StgHeader+16) +#define OFFSET_StgPAP_n_args 4 +#define REP_StgPAP_n_args b32 +#define StgPAP_n_args(__ptr__) REP_StgPAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_n_args] +#define OFFSET_StgPAP_fun 8 +#define REP_StgPAP_fun gcptr +#define StgPAP_fun(__ptr__) REP_StgPAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_fun] +#define OFFSET_StgPAP_arity 0 +#define REP_StgPAP_arity b32 +#define StgPAP_arity(__ptr__) REP_StgPAP_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_arity] +#define OFFSET_StgPAP_payload 16 +#define StgPAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgPAP_payload + WDS(__ix__)] +#define SIZEOF_StgAP_NoThunkHdr 16 +#define SIZEOF_StgAP_NoHdr 24 +#define SIZEOF_StgAP (SIZEOF_StgHeader+24) +#define OFFSET_StgAP_n_args 12 +#define REP_StgAP_n_args b32 +#define StgAP_n_args(__ptr__) REP_StgAP_n_args[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_n_args] +#define OFFSET_StgAP_fun 16 +#define REP_StgAP_fun gcptr +#define StgAP_fun(__ptr__) REP_StgAP_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_fun] +#define OFFSET_StgAP_payload 24 +#define StgAP_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_payload + WDS(__ix__)] +#define SIZEOF_StgAP_STACK_NoThunkHdr 16 +#define SIZEOF_StgAP_STACK_NoHdr 24 +#define SIZEOF_StgAP_STACK (SIZEOF_StgHeader+24) +#define OFFSET_StgAP_STACK_size 8 +#define REP_StgAP_STACK_size b64 +#define StgAP_STACK_size(__ptr__) REP_StgAP_STACK_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_size] +#define OFFSET_StgAP_STACK_fun 16 +#define REP_StgAP_STACK_fun gcptr +#define StgAP_STACK_fun(__ptr__) REP_StgAP_STACK_fun[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_fun] +#define OFFSET_StgAP_STACK_payload 24 +#define StgAP_STACK_payload(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgAP_STACK_payload + WDS(__ix__)] +#define SIZEOF_StgSelector_NoThunkHdr 8 +#define SIZEOF_StgSelector_NoHdr 16 +#define SIZEOF_StgSelector (SIZEOF_StgHeader+16) +#define OFFSET_StgInd_indirectee 0 +#define REP_StgInd_indirectee gcptr +#define StgInd_indirectee(__ptr__) REP_StgInd_indirectee[__ptr__+SIZEOF_StgHeader+OFFSET_StgInd_indirectee] +#define SIZEOF_StgMutVar_NoHdr 8 +#define SIZEOF_StgMutVar (SIZEOF_StgHeader+8) +#define OFFSET_StgMutVar_var 0 +#define REP_StgMutVar_var b64 +#define StgMutVar_var(__ptr__) REP_StgMutVar_var[__ptr__+SIZEOF_StgHeader+OFFSET_StgMutVar_var] +#define SIZEOF_StgAtomicallyFrame_NoHdr 16 +#define SIZEOF_StgAtomicallyFrame (SIZEOF_StgHeader+16) +#define OFFSET_StgAtomicallyFrame_code 0 +#define REP_StgAtomicallyFrame_code b64 +#define StgAtomicallyFrame_code(__ptr__) REP_StgAtomicallyFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_code] +#define OFFSET_StgAtomicallyFrame_result 8 +#define REP_StgAtomicallyFrame_result b64 +#define StgAtomicallyFrame_result(__ptr__) REP_StgAtomicallyFrame_result[__ptr__+SIZEOF_StgHeader+OFFSET_StgAtomicallyFrame_result] +#define OFFSET_StgTRecHeader_enclosing_trec 0 +#define REP_StgTRecHeader_enclosing_trec b64 +#define StgTRecHeader_enclosing_trec(__ptr__) REP_StgTRecHeader_enclosing_trec[__ptr__+SIZEOF_StgHeader+OFFSET_StgTRecHeader_enclosing_trec] +#define SIZEOF_StgCatchSTMFrame_NoHdr 16 +#define SIZEOF_StgCatchSTMFrame (SIZEOF_StgHeader+16) +#define OFFSET_StgCatchSTMFrame_handler 8 +#define REP_StgCatchSTMFrame_handler b64 +#define StgCatchSTMFrame_handler(__ptr__) REP_StgCatchSTMFrame_handler[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_handler] +#define OFFSET_StgCatchSTMFrame_code 0 +#define REP_StgCatchSTMFrame_code b64 +#define StgCatchSTMFrame_code(__ptr__) REP_StgCatchSTMFrame_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchSTMFrame_code] +#define SIZEOF_StgCatchRetryFrame_NoHdr 24 +#define SIZEOF_StgCatchRetryFrame (SIZEOF_StgHeader+24) +#define OFFSET_StgCatchRetryFrame_running_alt_code 0 +#define REP_StgCatchRetryFrame_running_alt_code b64 +#define StgCatchRetryFrame_running_alt_code(__ptr__) REP_StgCatchRetryFrame_running_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_running_alt_code] +#define OFFSET_StgCatchRetryFrame_first_code 8 +#define REP_StgCatchRetryFrame_first_code b64 +#define StgCatchRetryFrame_first_code(__ptr__) REP_StgCatchRetryFrame_first_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_first_code] +#define OFFSET_StgCatchRetryFrame_alt_code 16 +#define REP_StgCatchRetryFrame_alt_code b64 +#define StgCatchRetryFrame_alt_code(__ptr__) REP_StgCatchRetryFrame_alt_code[__ptr__+SIZEOF_StgHeader+OFFSET_StgCatchRetryFrame_alt_code] +#define OFFSET_StgTVarWatchQueue_closure 0 +#define REP_StgTVarWatchQueue_closure b64 +#define StgTVarWatchQueue_closure(__ptr__) REP_StgTVarWatchQueue_closure[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_closure] +#define OFFSET_StgTVarWatchQueue_next_queue_entry 8 +#define REP_StgTVarWatchQueue_next_queue_entry b64 +#define StgTVarWatchQueue_next_queue_entry(__ptr__) REP_StgTVarWatchQueue_next_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_next_queue_entry] +#define OFFSET_StgTVarWatchQueue_prev_queue_entry 16 +#define REP_StgTVarWatchQueue_prev_queue_entry b64 +#define StgTVarWatchQueue_prev_queue_entry(__ptr__) REP_StgTVarWatchQueue_prev_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVarWatchQueue_prev_queue_entry] +#define SIZEOF_StgTVar_NoHdr 24 +#define SIZEOF_StgTVar (SIZEOF_StgHeader+24) +#define OFFSET_StgTVar_current_value 0 +#define REP_StgTVar_current_value b64 +#define StgTVar_current_value(__ptr__) REP_StgTVar_current_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVar_current_value] +#define OFFSET_StgTVar_first_watch_queue_entry 8 +#define REP_StgTVar_first_watch_queue_entry b64 +#define StgTVar_first_watch_queue_entry(__ptr__) REP_StgTVar_first_watch_queue_entry[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVar_first_watch_queue_entry] +#define OFFSET_StgTVar_num_updates 16 +#define REP_StgTVar_num_updates b64 +#define StgTVar_num_updates(__ptr__) REP_StgTVar_num_updates[__ptr__+SIZEOF_StgHeader+OFFSET_StgTVar_num_updates] +#define SIZEOF_StgWeak_NoHdr 40 +#define SIZEOF_StgWeak (SIZEOF_StgHeader+40) +#define OFFSET_StgWeak_link 32 +#define REP_StgWeak_link b64 +#define StgWeak_link(__ptr__) REP_StgWeak_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_link] +#define OFFSET_StgWeak_key 8 +#define REP_StgWeak_key b64 +#define StgWeak_key(__ptr__) REP_StgWeak_key[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_key] +#define OFFSET_StgWeak_value 16 +#define REP_StgWeak_value b64 +#define StgWeak_value(__ptr__) REP_StgWeak_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_value] +#define OFFSET_StgWeak_finalizer 24 +#define REP_StgWeak_finalizer b64 +#define StgWeak_finalizer(__ptr__) REP_StgWeak_finalizer[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_finalizer] +#define OFFSET_StgWeak_cfinalizers 0 +#define REP_StgWeak_cfinalizers b64 +#define StgWeak_cfinalizers(__ptr__) REP_StgWeak_cfinalizers[__ptr__+SIZEOF_StgHeader+OFFSET_StgWeak_cfinalizers] +#define SIZEOF_StgCFinalizerList_NoHdr 40 +#define SIZEOF_StgCFinalizerList (SIZEOF_StgHeader+40) +#define OFFSET_StgCFinalizerList_link 0 +#define REP_StgCFinalizerList_link b64 +#define StgCFinalizerList_link(__ptr__) REP_StgCFinalizerList_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgCFinalizerList_link] +#define OFFSET_StgCFinalizerList_fptr 8 +#define REP_StgCFinalizerList_fptr b64 +#define StgCFinalizerList_fptr(__ptr__) REP_StgCFinalizerList_fptr[__ptr__+SIZEOF_StgHeader+OFFSET_StgCFinalizerList_fptr] +#define OFFSET_StgCFinalizerList_ptr 16 +#define REP_StgCFinalizerList_ptr b64 +#define StgCFinalizerList_ptr(__ptr__) REP_StgCFinalizerList_ptr[__ptr__+SIZEOF_StgHeader+OFFSET_StgCFinalizerList_ptr] +#define OFFSET_StgCFinalizerList_eptr 24 +#define REP_StgCFinalizerList_eptr b64 +#define StgCFinalizerList_eptr(__ptr__) REP_StgCFinalizerList_eptr[__ptr__+SIZEOF_StgHeader+OFFSET_StgCFinalizerList_eptr] +#define OFFSET_StgCFinalizerList_flag 32 +#define REP_StgCFinalizerList_flag b64 +#define StgCFinalizerList_flag(__ptr__) REP_StgCFinalizerList_flag[__ptr__+SIZEOF_StgHeader+OFFSET_StgCFinalizerList_flag] +#define SIZEOF_StgMVar_NoHdr 24 +#define SIZEOF_StgMVar (SIZEOF_StgHeader+24) +#define OFFSET_StgMVar_head 0 +#define REP_StgMVar_head b64 +#define StgMVar_head(__ptr__) REP_StgMVar_head[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_head] +#define OFFSET_StgMVar_tail 8 +#define REP_StgMVar_tail b64 +#define StgMVar_tail(__ptr__) REP_StgMVar_tail[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_tail] +#define OFFSET_StgMVar_value 16 +#define REP_StgMVar_value b64 +#define StgMVar_value(__ptr__) REP_StgMVar_value[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVar_value] +#define SIZEOF_StgMVarTSOQueue_NoHdr 16 +#define SIZEOF_StgMVarTSOQueue (SIZEOF_StgHeader+16) +#define OFFSET_StgMVarTSOQueue_link 0 +#define REP_StgMVarTSOQueue_link b64 +#define StgMVarTSOQueue_link(__ptr__) REP_StgMVarTSOQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_link] +#define OFFSET_StgMVarTSOQueue_tso 8 +#define REP_StgMVarTSOQueue_tso b64 +#define StgMVarTSOQueue_tso(__ptr__) REP_StgMVarTSOQueue_tso[__ptr__+SIZEOF_StgHeader+OFFSET_StgMVarTSOQueue_tso] +#define SIZEOF_StgBCO_NoHdr 32 +#define SIZEOF_StgBCO (SIZEOF_StgHeader+32) +#define OFFSET_StgBCO_instrs 0 +#define REP_StgBCO_instrs b64 +#define StgBCO_instrs(__ptr__) REP_StgBCO_instrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_instrs] +#define OFFSET_StgBCO_literals 8 +#define REP_StgBCO_literals b64 +#define StgBCO_literals(__ptr__) REP_StgBCO_literals[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_literals] +#define OFFSET_StgBCO_ptrs 16 +#define REP_StgBCO_ptrs b64 +#define StgBCO_ptrs(__ptr__) REP_StgBCO_ptrs[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_ptrs] +#define OFFSET_StgBCO_arity 24 +#define REP_StgBCO_arity b32 +#define StgBCO_arity(__ptr__) REP_StgBCO_arity[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_arity] +#define OFFSET_StgBCO_size 28 +#define REP_StgBCO_size b32 +#define StgBCO_size(__ptr__) REP_StgBCO_size[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_size] +#define OFFSET_StgBCO_bitmap 32 +#define StgBCO_bitmap(__ptr__,__ix__) W_[__ptr__+SIZEOF_StgHeader+OFFSET_StgBCO_bitmap + WDS(__ix__)] +#define SIZEOF_StgStableName_NoHdr 8 +#define SIZEOF_StgStableName (SIZEOF_StgHeader+8) +#define OFFSET_StgStableName_sn 0 +#define REP_StgStableName_sn b64 +#define StgStableName_sn(__ptr__) REP_StgStableName_sn[__ptr__+SIZEOF_StgHeader+OFFSET_StgStableName_sn] +#define SIZEOF_StgBlockingQueue_NoHdr 32 +#define SIZEOF_StgBlockingQueue (SIZEOF_StgHeader+32) +#define OFFSET_StgBlockingQueue_bh 8 +#define REP_StgBlockingQueue_bh b64 +#define StgBlockingQueue_bh(__ptr__) REP_StgBlockingQueue_bh[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_bh] +#define OFFSET_StgBlockingQueue_owner 16 +#define REP_StgBlockingQueue_owner b64 +#define StgBlockingQueue_owner(__ptr__) REP_StgBlockingQueue_owner[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_owner] +#define OFFSET_StgBlockingQueue_queue 24 +#define REP_StgBlockingQueue_queue b64 +#define StgBlockingQueue_queue(__ptr__) REP_StgBlockingQueue_queue[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_queue] +#define OFFSET_StgBlockingQueue_link 0 +#define REP_StgBlockingQueue_link b64 +#define StgBlockingQueue_link(__ptr__) REP_StgBlockingQueue_link[__ptr__+SIZEOF_StgHeader+OFFSET_StgBlockingQueue_link] +#define SIZEOF_MessageBlackHole_NoHdr 24 +#define SIZEOF_MessageBlackHole (SIZEOF_StgHeader+24) +#define OFFSET_MessageBlackHole_link 0 +#define REP_MessageBlackHole_link b64 +#define MessageBlackHole_link(__ptr__) REP_MessageBlackHole_link[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_link] +#define OFFSET_MessageBlackHole_tso 8 +#define REP_MessageBlackHole_tso b64 +#define MessageBlackHole_tso(__ptr__) REP_MessageBlackHole_tso[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_tso] +#define OFFSET_MessageBlackHole_bh 16 +#define REP_MessageBlackHole_bh b64 +#define MessageBlackHole_bh(__ptr__) REP_MessageBlackHole_bh[__ptr__+SIZEOF_StgHeader+OFFSET_MessageBlackHole_bh] +#define SIZEOF_StgCompactNFData_NoHdr 64 +#define SIZEOF_StgCompactNFData (SIZEOF_StgHeader+64) +#define OFFSET_StgCompactNFData_totalW 0 +#define REP_StgCompactNFData_totalW b64 +#define StgCompactNFData_totalW(__ptr__) REP_StgCompactNFData_totalW[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_totalW] +#define OFFSET_StgCompactNFData_autoBlockW 8 +#define REP_StgCompactNFData_autoBlockW b64 +#define StgCompactNFData_autoBlockW(__ptr__) REP_StgCompactNFData_autoBlockW[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_autoBlockW] +#define OFFSET_StgCompactNFData_nursery 32 +#define REP_StgCompactNFData_nursery b64 +#define StgCompactNFData_nursery(__ptr__) REP_StgCompactNFData_nursery[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_nursery] +#define OFFSET_StgCompactNFData_last 40 +#define REP_StgCompactNFData_last b64 +#define StgCompactNFData_last(__ptr__) REP_StgCompactNFData_last[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_last] +#define OFFSET_StgCompactNFData_hp 16 +#define REP_StgCompactNFData_hp b64 +#define StgCompactNFData_hp(__ptr__) REP_StgCompactNFData_hp[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_hp] +#define OFFSET_StgCompactNFData_hpLim 24 +#define REP_StgCompactNFData_hpLim b64 +#define StgCompactNFData_hpLim(__ptr__) REP_StgCompactNFData_hpLim[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_hpLim] +#define OFFSET_StgCompactNFData_hash 48 +#define REP_StgCompactNFData_hash b64 +#define StgCompactNFData_hash(__ptr__) REP_StgCompactNFData_hash[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_hash] +#define OFFSET_StgCompactNFData_result 56 +#define REP_StgCompactNFData_result b64 +#define StgCompactNFData_result(__ptr__) REP_StgCompactNFData_result[__ptr__+SIZEOF_StgHeader+OFFSET_StgCompactNFData_result] +#define SIZEOF_StgCompactNFDataBlock 24 +#define OFFSET_StgCompactNFDataBlock_self 0 +#define REP_StgCompactNFDataBlock_self b64 +#define StgCompactNFDataBlock_self(__ptr__) REP_StgCompactNFDataBlock_self[__ptr__+OFFSET_StgCompactNFDataBlock_self] +#define OFFSET_StgCompactNFDataBlock_owner 8 +#define REP_StgCompactNFDataBlock_owner b64 +#define StgCompactNFDataBlock_owner(__ptr__) REP_StgCompactNFDataBlock_owner[__ptr__+OFFSET_StgCompactNFDataBlock_owner] +#define OFFSET_StgCompactNFDataBlock_next 16 +#define REP_StgCompactNFDataBlock_next b64 +#define StgCompactNFDataBlock_next(__ptr__) REP_StgCompactNFDataBlock_next[__ptr__+OFFSET_StgCompactNFDataBlock_next] +#define OFFSET_RtsFlags_ProfFlags_showCCSOnException 285 +#define REP_RtsFlags_ProfFlags_showCCSOnException b8 +#define RtsFlags_ProfFlags_showCCSOnException(__ptr__) REP_RtsFlags_ProfFlags_showCCSOnException[__ptr__+OFFSET_RtsFlags_ProfFlags_showCCSOnException] +#define OFFSET_RtsFlags_DebugFlags_apply 228 +#define REP_RtsFlags_DebugFlags_apply b8 +#define RtsFlags_DebugFlags_apply(__ptr__) REP_RtsFlags_DebugFlags_apply[__ptr__+OFFSET_RtsFlags_DebugFlags_apply] +#define OFFSET_RtsFlags_DebugFlags_sanity 223 +#define REP_RtsFlags_DebugFlags_sanity b8 +#define RtsFlags_DebugFlags_sanity(__ptr__) REP_RtsFlags_DebugFlags_sanity[__ptr__+OFFSET_RtsFlags_DebugFlags_sanity] +#define OFFSET_RtsFlags_DebugFlags_weak 218 +#define REP_RtsFlags_DebugFlags_weak b8 +#define RtsFlags_DebugFlags_weak(__ptr__) REP_RtsFlags_DebugFlags_weak[__ptr__+OFFSET_RtsFlags_DebugFlags_weak] +#define OFFSET_RtsFlags_GcFlags_initialStkSize 16 +#define REP_RtsFlags_GcFlags_initialStkSize b32 +#define RtsFlags_GcFlags_initialStkSize(__ptr__) REP_RtsFlags_GcFlags_initialStkSize[__ptr__+OFFSET_RtsFlags_GcFlags_initialStkSize] +#define OFFSET_RtsFlags_MiscFlags_tickInterval 192 +#define REP_RtsFlags_MiscFlags_tickInterval b64 +#define RtsFlags_MiscFlags_tickInterval(__ptr__) REP_RtsFlags_MiscFlags_tickInterval[__ptr__+OFFSET_RtsFlags_MiscFlags_tickInterval] +#define SIZEOF_StgFunInfoExtraFwd 32 +#define OFFSET_StgFunInfoExtraFwd_slow_apply 24 +#define REP_StgFunInfoExtraFwd_slow_apply b64 +#define StgFunInfoExtraFwd_slow_apply(__ptr__) REP_StgFunInfoExtraFwd_slow_apply[__ptr__+OFFSET_StgFunInfoExtraFwd_slow_apply] +#define OFFSET_StgFunInfoExtraFwd_fun_type 0 +#define REP_StgFunInfoExtraFwd_fun_type b32 +#define StgFunInfoExtraFwd_fun_type(__ptr__) REP_StgFunInfoExtraFwd_fun_type[__ptr__+OFFSET_StgFunInfoExtraFwd_fun_type] +#define OFFSET_StgFunInfoExtraFwd_arity 4 +#define REP_StgFunInfoExtraFwd_arity b32 +#define StgFunInfoExtraFwd_arity(__ptr__) REP_StgFunInfoExtraFwd_arity[__ptr__+OFFSET_StgFunInfoExtraFwd_arity] +#define OFFSET_StgFunInfoExtraFwd_bitmap 16 +#define REP_StgFunInfoExtraFwd_bitmap b64 +#define StgFunInfoExtraFwd_bitmap(__ptr__) REP_StgFunInfoExtraFwd_bitmap[__ptr__+OFFSET_StgFunInfoExtraFwd_bitmap] +#define SIZEOF_StgFunInfoExtraRev 32 +#define OFFSET_StgFunInfoExtraRev_slow_apply_offset 0 +#define REP_StgFunInfoExtraRev_slow_apply_offset b64 +#define StgFunInfoExtraRev_slow_apply_offset(__ptr__) REP_StgFunInfoExtraRev_slow_apply_offset[__ptr__+OFFSET_StgFunInfoExtraRev_slow_apply_offset] +#define OFFSET_StgFunInfoExtraRev_fun_type 24 +#define REP_StgFunInfoExtraRev_fun_type b32 +#define StgFunInfoExtraRev_fun_type(__ptr__) REP_StgFunInfoExtraRev_fun_type[__ptr__+OFFSET_StgFunInfoExtraRev_fun_type] +#define OFFSET_StgFunInfoExtraRev_arity 28 +#define REP_StgFunInfoExtraRev_arity b32 +#define StgFunInfoExtraRev_arity(__ptr__) REP_StgFunInfoExtraRev_arity[__ptr__+OFFSET_StgFunInfoExtraRev_arity] +#define OFFSET_StgFunInfoExtraRev_bitmap 8 +#define REP_StgFunInfoExtraRev_bitmap b64 +#define StgFunInfoExtraRev_bitmap(__ptr__) REP_StgFunInfoExtraRev_bitmap[__ptr__+OFFSET_StgFunInfoExtraRev_bitmap] +#define OFFSET_StgFunInfoExtraRev_bitmap_offset 8 +#define REP_StgFunInfoExtraRev_bitmap_offset b64 +#define StgFunInfoExtraRev_bitmap_offset(__ptr__) REP_StgFunInfoExtraRev_bitmap_offset[__ptr__+OFFSET_StgFunInfoExtraRev_bitmap_offset] +#define OFFSET_StgLargeBitmap_size 0 +#define REP_StgLargeBitmap_size b64 +#define StgLargeBitmap_size(__ptr__) REP_StgLargeBitmap_size[__ptr__+OFFSET_StgLargeBitmap_size] +#define OFFSET_StgLargeBitmap_bitmap 8 +#define SIZEOF_snEntry 24 +#define OFFSET_snEntry_sn_obj 16 +#define REP_snEntry_sn_obj b64 +#define snEntry_sn_obj(__ptr__) REP_snEntry_sn_obj[__ptr__+OFFSET_snEntry_sn_obj] +#define OFFSET_snEntry_addr 0 +#define REP_snEntry_addr b64 +#define snEntry_addr(__ptr__) REP_snEntry_addr[__ptr__+OFFSET_snEntry_addr] +#define SIZEOF_spEntry 8 +#define OFFSET_spEntry_addr 0 +#define REP_spEntry_addr b64 +#define spEntry_addr(__ptr__) REP_spEntry_addr[__ptr__+OFFSET_spEntry_addr] diff --git a/lodewallet/include/HsFFI.h b/lodewallet/include/HsFFI.h new file mode 100644 index 0000000..4b6278b --- /dev/null +++ b/lodewallet/include/HsFFI.h @@ -0,0 +1,141 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 2000 + * + * A mapping for Haskell types to C types, including the corresponding bounds. + * Intended to be used in conjuction with the FFI. + * + * WARNING: Keep this file and StgTypes.h in synch! + * + * ---------------------------------------------------------------------------*/ + +#pragma once + +#if defined(__cplusplus) +extern "C" { +#endif + +/* get types from GHC's runtime system */ +#include "ghcconfig.h" +#include "stg/Types.h" + +/* get limits for floating point types */ +#include + +typedef StgChar HsChar; +typedef StgInt HsInt; +typedef StgInt8 HsInt8; +typedef StgInt16 HsInt16; +typedef StgInt32 HsInt32; +typedef StgInt64 HsInt64; +typedef StgWord HsWord; +typedef StgWord8 HsWord8; +typedef StgWord16 HsWord16; +typedef StgWord32 HsWord32; +typedef StgWord64 HsWord64; +typedef StgFloat HsFloat; +typedef StgDouble HsDouble; +typedef StgInt HsBool; +typedef void* HsPtr; /* this should better match StgAddr */ +typedef void (*HsFunPtr)(void); /* this should better match StgAddr */ +typedef void* HsStablePtr; + +/* this should correspond to the type of StgChar in StgTypes.h */ +#define HS_CHAR_MIN 0 +#define HS_CHAR_MAX 0x10FFFF + +/* is it true or not? */ +#define HS_BOOL_FALSE 0 +#define HS_BOOL_TRUE 1 + +#define HS_BOOL_MIN HS_BOOL_FALSE +#define HS_BOOL_MAX HS_BOOL_TRUE + + +#define HS_INT_MIN STG_INT_MIN +#define HS_INT_MAX STG_INT_MAX +#define HS_WORD_MAX STG_WORD_MAX + +#define HS_INT8_MIN STG_INT8_MIN +#define HS_INT8_MAX STG_INT8_MAX +#define HS_INT16_MIN STG_INT16_MIN +#define HS_INT16_MAX STG_INT16_MAX +#define HS_INT32_MIN STG_INT32_MIN +#define HS_INT32_MAX STG_INT32_MAX +#define HS_INT64_MIN STG_INT64_MIN +#define HS_INT64_MAX STG_INT64_MAX +#define HS_WORD8_MAX STG_WORD8_MAX +#define HS_WORD16_MAX STG_WORD16_MAX +#define HS_WORD32_MAX STG_WORD32_MAX +#define HS_WORD64_MAX STG_WORD64_MAX + +#define HS_FLOAT_RADIX FLT_RADIX +#define HS_FLOAT_ROUNDS FLT_ROUNDS +#define HS_FLOAT_EPSILON FLT_EPSILON +#define HS_FLOAT_DIG FLT_DIG +#define HS_FLOAT_MANT_DIG FLT_MANT_DIG +#define HS_FLOAT_MIN FLT_MIN +#define HS_FLOAT_MIN_EXP FLT_MIN_EXP +#define HS_FLOAT_MIN_10_EXP FLT_MIN_10_EXP +#define HS_FLOAT_MAX FLT_MAX +#define HS_FLOAT_MAX_EXP FLT_MAX_EXP +#define HS_FLOAT_MAX_10_EXP FLT_MAX_10_EXP + +#define HS_DOUBLE_RADIX DBL_RADIX +#define HS_DOUBLE_ROUNDS DBL_ROUNDS +#define HS_DOUBLE_EPSILON DBL_EPSILON +#define HS_DOUBLE_DIG DBL_DIG +#define HS_DOUBLE_MANT_DIG DBL_MANT_DIG +#define HS_DOUBLE_MIN DBL_MIN +#define HS_DOUBLE_MIN_EXP DBL_MIN_EXP +#define HS_DOUBLE_MIN_10_EXP DBL_MIN_10_EXP +#define HS_DOUBLE_MAX DBL_MAX +#define HS_DOUBLE_MAX_EXP DBL_MAX_EXP +#define HS_DOUBLE_MAX_10_EXP DBL_MAX_10_EXP + +extern void hs_init (int *argc, char **argv[]); +extern void hs_exit (void); +extern void hs_exit_nowait(void); +extern void hs_set_argv (int argc, char *argv[]); +extern void hs_thread_done (void); + +extern void hs_perform_gc (void); + +// Lock the stable pointer table. The table must be unlocked +// again before calling any Haskell functions, even if those +// functions do not manipulate stable pointers. The Haskell +// garbage collector will not be able to run until this lock +// is released! It is also forbidden to call hs_free_fun_ptr +// or any stable pointer-related FFI functions other than +// hs_free_stable_ptr_unsafe while the table is locked. +extern void hs_lock_stable_ptr_table (void); + +// A deprecated synonym. +extern void hs_lock_stable_tables (void); + +// Unlock the stable pointer table. +extern void hs_unlock_stable_ptr_table (void); + +// A deprecated synonym. +extern void hs_unlock_stable_tables (void); + +// Free a stable pointer assuming that the stable pointer +// table is already locked. +extern void hs_free_stable_ptr_unsafe (HsStablePtr sp); + +extern void hs_free_stable_ptr (HsStablePtr sp); +extern void hs_free_fun_ptr (HsFunPtr fp); + +extern StgPtr hs_spt_lookup(StgWord64 key1, StgWord64 key2); +extern int hs_spt_keys(StgPtr keys[], int szKeys); +extern int hs_spt_key_count (void); + +extern void hs_try_putmvar (int capability, HsStablePtr sp); + +/* -------------------------------------------------------------------------- */ + + + +#if defined(__cplusplus) +} +#endif diff --git a/lodewallet/include/MachDeps.h b/lodewallet/include/MachDeps.h new file mode 100644 index 0000000..81d6641 --- /dev/null +++ b/lodewallet/include/MachDeps.h @@ -0,0 +1,121 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The University of Glasgow 2002 + * + * Definitions that characterise machine specific properties of basic + * types (C & Haskell) of a target platform. + * + * NB: Keep in sync with HsFFI.h and StgTypes.h. + * NB: THIS FILE IS INCLUDED IN HASKELL SOURCE! + * + * To understand the structure of the RTS headers, see the wiki: + * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes + * + * ---------------------------------------------------------------------------*/ + +#pragma once + +/* Don't allow stage1 (cross-)compiler embed assumptions about target + * platform. When ghc-stage1 is being built by ghc-stage0 is should not + * refer to target defines. A few past examples: + * - https://gitlab.haskell.org/ghc/ghc/issues/13491 + * - https://phabricator.haskell.org/D3122 + * - https://phabricator.haskell.org/D3405 + * + * In those cases code change assumed target defines like SIZEOF_HSINT + * are applied to host platform, not target platform. + * + * So what should be used instead in GHC_STAGE=1? + * + * To get host's equivalent of SIZEOF_HSINT you can use Bits instances: + * Data.Bits.finiteBitSize (0 :: Int) + * + * To get target's values it is preferred to use runtime target + * configuration from 'targetPlatform :: DynFlags -> Platform' + * record. A few wrappers are already defined and used throughout GHC: + * wORD_SIZE :: DynFlags -> Int + * wORD_SIZE dflags = pc_WORD_SIZE (platformConstants dflags) + * + * Hence we hide these macros from GHC_STAGE=1 + */ + +/* Sizes of C types come from here... */ +#include "ghcautoconf.h" + +/* Sizes of Haskell types follow. These sizes correspond to: + * - the number of bytes in the primitive type (eg. Int#) + * - the number of bytes in the external representation (eg. HsInt) + * - the scale offset used by writeFooOffAddr# + * + * In the heap, the type may take up more space: eg. SIZEOF_INT8 == 1, + * but it takes up SIZEOF_HSWORD (4 or 8) bytes in the heap. + */ + +#define SIZEOF_HSCHAR SIZEOF_WORD32 +#define ALIGNMENT_HSCHAR ALIGNMENT_WORD32 + +#define SIZEOF_HSINT SIZEOF_VOID_P +#define ALIGNMENT_HSINT ALIGNMENT_VOID_P + +#define SIZEOF_HSWORD SIZEOF_VOID_P +#define ALIGNMENT_HSWORD ALIGNMENT_VOID_P + +#define SIZEOF_HSDOUBLE SIZEOF_DOUBLE +#define ALIGNMENT_HSDOUBLE ALIGNMENT_DOUBLE + +#define SIZEOF_HSFLOAT SIZEOF_FLOAT +#define ALIGNMENT_HSFLOAT ALIGNMENT_FLOAT + +#define SIZEOF_HSPTR SIZEOF_VOID_P +#define ALIGNMENT_HSPTR ALIGNMENT_VOID_P + +#define SIZEOF_HSFUNPTR SIZEOF_VOID_P +#define ALIGNMENT_HSFUNPTR ALIGNMENT_VOID_P + +#define SIZEOF_HSSTABLEPTR SIZEOF_VOID_P +#define ALIGNMENT_HSSTABLEPTR ALIGNMENT_VOID_P + +#define SIZEOF_INT8 SIZEOF_INT8_T +#define ALIGNMENT_INT8 ALIGNMENT_INT8_T + +#define SIZEOF_WORD8 SIZEOF_UINT8_T +#define ALIGNMENT_WORD8 ALIGNMENT_UINT8_T + +#define SIZEOF_INT16 SIZEOF_INT16_T +#define ALIGNMENT_INT16 ALIGNMENT_INT16_T + +#define SIZEOF_WORD16 SIZEOF_UINT16_T +#define ALIGNMENT_WORD16 ALIGNMENT_UINT16_T + +#define SIZEOF_INT32 SIZEOF_INT32_T +#define ALIGNMENT_INT32 ALIGNMENT_INT32_T + +#define SIZEOF_WORD32 SIZEOF_UINT32_T +#define ALIGNMENT_WORD32 ALIGNMENT_UINT32_T + +#define SIZEOF_INT64 SIZEOF_INT64_T +#define ALIGNMENT_INT64 ALIGNMENT_INT64_T + +#define SIZEOF_WORD64 SIZEOF_UINT64_T +#define ALIGNMENT_WORD64 ALIGNMENT_UINT64_T + +#if !defined(WORD_SIZE_IN_BITS) +#if SIZEOF_HSWORD == 4 +#define WORD_SIZE_IN_BITS 32 +#define WORD_SIZE_IN_BITS_FLOAT 32.0 +#else +#define WORD_SIZE_IN_BITS 64 +#define WORD_SIZE_IN_BITS_FLOAT 64.0 +#endif +#endif + +#if !defined(TAG_BITS) +#if SIZEOF_HSWORD == 4 +#define TAG_BITS 2 +#else +#define TAG_BITS 3 +#endif +#endif + +#define TAG_MASK ((1 << TAG_BITS) - 1) + diff --git a/lodewallet/include/Rts.h b/lodewallet/include/Rts.h new file mode 100644 index 0000000..1db3ea0 --- /dev/null +++ b/lodewallet/include/Rts.h @@ -0,0 +1,341 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 1998-2009 + * + * RTS external APIs. This file declares everything that the GHC RTS + * exposes externally. + * + * To understand the structure of the RTS headers, see the wiki: + * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes + * + * ---------------------------------------------------------------------------*/ + +#pragma once + +#if defined(__cplusplus) +extern "C" { +#endif + +/* get types from GHC's runtime system */ +#include "ghcconfig.h" +/* We have to include Types.h before everything else as this defines some + macros that will change the behaviour of system headers. */ +#include "stg/Types.h" + +/* We include windows.h very early, as on Win64 the CONTEXT type has + fields "R8", "R9" and "R10", which goes bad if we've already + #define'd those names for our own purposes (in stg/Regs.h) */ +#if defined(HAVE_WINDOWS_H) +#include +#endif + +#if !defined(IN_STG_CODE) +#define IN_STG_CODE 0 +#endif +#include "Stg.h" + +#include "HsFFI.h" +#include "RtsAPI.h" + +// Turn off inlining when debugging - it obfuscates things +#if defined(DEBUG) +# undef STATIC_INLINE +# define STATIC_INLINE static +#endif + +#include "rts/Types.h" +#include "rts/Time.h" + +#if __GNUC__ >= 3 +#define ATTRIBUTE_ALIGNED(n) __attribute__((aligned(n))) +#else +#define ATTRIBUTE_ALIGNED(n) /*nothing*/ +#endif + +// Symbols that are extern, but private to the RTS, are declared +// with visibility "hidden" to hide them outside the RTS shared +// library. +#if defined(HAS_VISIBILITY_HIDDEN) +#define RTS_PRIVATE GNUC3_ATTRIBUTE(visibility("hidden")) +#else +#define RTS_PRIVATE /* disabled: RTS_PRIVATE */ +#endif + +#if __GNUC__ >= 4 +#define RTS_UNLIKELY(p) __builtin_expect((p),0) +#else +#define RTS_UNLIKELY(p) (p) +#endif + +#if __GNUC__ >= 4 +#define RTS_LIKELY(p) __builtin_expect(!!(p), 1) +#else +#define RTS_LIKELY(p) (p) +#endif + +/* __builtin_unreachable is supported since GNU C 4.5 */ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#define RTS_UNREACHABLE __builtin_unreachable() +#else +#define RTS_UNREACHABLE abort() +#endif + +/* Prefetch primitives */ +#define prefetchForRead(ptr) __builtin_prefetch(ptr, 0) +#define prefetchForWrite(ptr) __builtin_prefetch(ptr, 1) + +/* Fix for mingw stat problem (done here so it's early enough) */ +#if defined(mingw32_HOST_OS) +#define __MSVCRT__ 1 +#endif + +/* Needed to get the macro version of errno on some OSs, and also to + get prototypes for the _r versions of C library functions. */ +#if !defined(_REENTRANT) +#define _REENTRANT 1 +#endif + +/* + * We often want to know the size of something in units of an + * StgWord... (rounded up, of course!) + */ +#define ROUNDUP_BYTES_TO_WDS(n) (((n) + sizeof(W_) - 1) / sizeof(W_)) + +#define sizeofW(t) ROUNDUP_BYTES_TO_WDS(sizeof(t)) + +/* ----------------------------------------------------------------------------- + Assertions and Debuggery + + CHECK(p) evaluates p and terminates with an error if p is false + ASSERT(p) like CHECK(p) if DEBUG is on, otherwise a no-op + -------------------------------------------------------------------------- */ + +void _assertFail(const char *filename, unsigned int linenum) + GNUC3_ATTRIBUTE(__noreturn__); + +#define CHECK(predicate) \ + if (predicate) \ + /*null*/; \ + else \ + _assertFail(__FILE__, __LINE__) + +#define CHECKM(predicate, msg, ...) \ + if (predicate) \ + /*null*/; \ + else \ + barf(msg, ##__VA_ARGS__) + +#if !defined(DEBUG) +#define ASSERT(predicate) /* nothing */ +#define ASSERTM(predicate,msg,...) /* nothing */ +#else +#define ASSERT(predicate) CHECK(predicate) +#define ASSERTM(predicate,msg,...) CHECKM(predicate,msg,##__VA_ARGS__) +#endif /* DEBUG */ + +/* + * Use this on the RHS of macros which expand to nothing + * to make sure that the macro can be used in a context which + * demands a non-empty statement. + */ + +#define doNothing() do { } while (0) + +#if defined(DEBUG) +#define USED_IF_DEBUG +#define USED_IF_NOT_DEBUG STG_UNUSED +#else +#define USED_IF_DEBUG STG_UNUSED +#define USED_IF_NOT_DEBUG +#endif + +#if defined(THREADED_RTS) +#define USED_IF_THREADS +#define USED_IF_NOT_THREADS STG_UNUSED +#else +#define USED_IF_THREADS STG_UNUSED +#define USED_IF_NOT_THREADS +#endif + +#if defined(PROFILING) +#define USED_IF_PROFILING +#define USED_IF_NOT_PROFILING STG_UNUSED +#else +#define USED_IF_PROFILING STG_UNUSED +#define USED_IF_NOT_PROFILING +#endif + +#define FMT_SizeT "zu" +#define FMT_HexSizeT "zx" + +/* ----------------------------------------------------------------------------- + Include everything STG-ish + -------------------------------------------------------------------------- */ + +/* System headers: stdlib.h is needed so that we can use NULL. It must + * come after MachRegs.h, because stdlib.h might define some inline + * functions which may only be defined after register variables have + * been declared. + */ +#include + +#include "rts/Config.h" + +/* Global constraints */ +#include "rts/Constants.h" + +/* Profiling information */ +#include "rts/prof/CCS.h" +#include "rts/prof/LDV.h" + +/* Parallel information */ +#include "rts/OSThreads.h" +#include "rts/TSANUtils.h" +#include "rts/SpinLock.h" + +#include "rts/Messages.h" +#include "rts/Threads.h" + +/* Storage format definitions */ +#include "rts/storage/FunTypes.h" +#include "rts/storage/InfoTables.h" +#include "rts/storage/Closures.h" +#include "rts/storage/Heap.h" +#include "rts/storage/ClosureTypes.h" +#include "rts/storage/TSO.h" +#include "stg/MiscClosures.h" /* InfoTables, closures etc. defined in the RTS */ +#include "rts/storage/Block.h" +#include "rts/storage/ClosureMacros.h" +#include "rts/storage/MBlock.h" +#include "rts/storage/GC.h" +#include "rts/NonMoving.h" + +/* Foreign exports */ +#include "rts/ForeignExports.h" + +/* Other RTS external APIs */ +#include "rts/Parallel.h" +#include "rts/Signals.h" +#include "rts/BlockSignals.h" +#include "rts/Hpc.h" +#include "rts/Flags.h" +#include "rts/Adjustor.h" +#include "rts/FileLock.h" +#include "rts/GetTime.h" +#include "rts/Globals.h" +#include "rts/IOManager.h" +#include "rts/Linker.h" +#include "rts/Ticky.h" +#include "rts/Timer.h" +#include "rts/StablePtr.h" +#include "rts/StableName.h" +#include "rts/TTY.h" +#include "rts/Utils.h" +#include "rts/PrimFloat.h" +#include "rts/Main.h" +#include "rts/Profiling.h" +#include "rts/StaticPtrTable.h" +#include "rts/Libdw.h" +#include "rts/LibdwPool.h" + +/* Misc stuff without a home */ +DLL_IMPORT_RTS extern char **prog_argv; /* so we can get at these from Haskell */ +DLL_IMPORT_RTS extern int prog_argc; +DLL_IMPORT_RTS extern char *prog_name; + +void reportStackOverflow(StgTSO* tso); +void reportHeapOverflow(void); + +void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__); + +#if !defined(mingw32_HOST_OS) +int stg_sig_install (int, int, void *); +#endif + +/* ----------------------------------------------------------------------------- + Ways + -------------------------------------------------------------------------- */ + +// Returns non-zero if the RTS is a profiling version +int rts_isProfiled(void); + +// Returns non-zero if the RTS is a dynamically-linked version +int rts_isDynamic(void); + +/* ----------------------------------------------------------------------------- + RTS Exit codes + -------------------------------------------------------------------------- */ + +/* 255 is allegedly used by dynamic linkers to report linking failure */ +#define EXIT_INTERNAL_ERROR 254 +#define EXIT_DEADLOCK 253 +#define EXIT_INTERRUPTED 252 +#define EXIT_HEAPOVERFLOW 251 +#define EXIT_KILLED 250 + +/* ----------------------------------------------------------------------------- + Miscellaneous garbage + -------------------------------------------------------------------------- */ + +#if defined(DEBUG) +#define TICK_VAR(arity) \ + extern StgInt SLOW_CALLS_##arity; \ + extern StgInt RIGHT_ARITY_##arity; \ + extern StgInt TAGGED_PTR_##arity; + +extern StgInt TOTAL_CALLS; + +TICK_VAR(1) +TICK_VAR(2) +#endif + +/* ----------------------------------------------------------------------------- + Assertions and Debuggery + -------------------------------------------------------------------------- */ + +#define IF_RTSFLAGS(c,s) if (RtsFlags.c) { s; } doNothing() + +#if defined(DEBUG) +/* See Note [RtsFlags is a pointer in STG code] */ +#if IN_STG_CODE +#define IF_DEBUG(c,s) if (RtsFlags[0].DebugFlags.c) { s; } doNothing() +#else +#define IF_DEBUG(c,s) if (RtsFlags.DebugFlags.c) { s; } doNothing() +#endif /* IN_STG_CODE */ +#else +#define IF_DEBUG(c,s) doNothing() +#endif /* DEBUG */ + +#if defined(DEBUG) +#define DEBUG_ONLY(s) s +#else +#define DEBUG_ONLY(s) doNothing() +#endif /* DEBUG */ + +#if defined(DEBUG) +#define DEBUG_IS_ON 1 +#else +#define DEBUG_IS_ON 0 +#endif /* DEBUG */ + +/* ----------------------------------------------------------------------------- + Useful macros and inline functions + -------------------------------------------------------------------------- */ + +#if defined(__GNUC__) +#define SUPPORTS_TYPEOF +#endif + +#if defined(SUPPORTS_TYPEOF) +#define stg_min(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _a : _b; }) +#define stg_max(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _b : _a; }) +#else +#define stg_min(a,b) ((a) <= (b) ? (a) : (b)) +#define stg_max(a,b) ((a) <= (b) ? (b) : (a)) +#endif + +/* -------------------------------------------------------------------------- */ + +#if defined(__cplusplus) +} +#endif diff --git a/lodewallet/include/RtsAPI.h b/lodewallet/include/RtsAPI.h new file mode 100644 index 0000000..3cf02c0 --- /dev/null +++ b/lodewallet/include/RtsAPI.h @@ -0,0 +1,526 @@ +/* ---------------------------------------------------------------------------- + * + * (c) The GHC Team, 1998-2004 + * + * API for invoking Haskell functions via the RTS + * + * To understand the structure of the RTS headers, see the wiki: + * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes + * + * --------------------------------------------------------------------------*/ + +#pragma once + +#if defined(__cplusplus) +extern "C" { +#endif + +#include "HsFFI.h" +#include "rts/Time.h" +#include "rts/EventLogWriter.h" + +/* + * Running the scheduler + */ +typedef enum { + NoStatus, /* not finished yet */ + Success, /* completed successfully */ + Killed, /* uncaught exception */ + Interrupted, /* stopped in response to a call to interruptStgRts */ + HeapExhausted /* out of memory */ +} SchedulerStatus; + +typedef struct StgClosure_ *HaskellObj; + +/* + * An abstract type representing the token returned by rts_lock() and + * used when allocating objects and threads in the RTS. + */ +typedef struct Capability_ Capability; + +/* + * The public view of a Capability: we can be sure it starts with + * these two components (but it may have more private fields). + */ +typedef struct CapabilityPublic_ { + StgFunTable f; + StgRegTable r; +} CapabilityPublic; + +/* ---------------------------------------------------------------------------- + RTS configuration settings, for passing to hs_init_ghc() + ------------------------------------------------------------------------- */ + +typedef enum { + RtsOptsNone, // +RTS causes an error + RtsOptsIgnore, // Ignore command line arguments + RtsOptsIgnoreAll, // Ignore command line and Environment arguments + RtsOptsSafeOnly, // safe RTS options allowed; others cause an error + RtsOptsAll // all RTS options allowed + } RtsOptsEnabledEnum; + +struct GCDetails_; + +// The RtsConfig struct is passed (by value) to hs_init_ghc(). The +// reason for using a struct is extensibility: we can add more +// fields to this later without breaking existing client code. +typedef struct { + + // Whether to interpret +RTS options on the command line + RtsOptsEnabledEnum rts_opts_enabled; + + // Whether to give RTS flag suggestions + HsBool rts_opts_suggestions; + + // additional RTS options + const char *rts_opts; + + // True if GHC was not passed -no-hs-main + HsBool rts_hs_main; + + // Whether to retain CAFs (default: false) + HsBool keep_cafs; + + // Writer a for eventlog. + const EventLogWriter *eventlog_writer; + + // Called before processing command-line flags, so that default + // settings for RtsFlags can be provided. + void (* defaultsHook) (void); + + // Called just before exiting + void (* onExitHook) (void); + + // Called on a stack overflow, before exiting + void (* stackOverflowHook) (W_ stack_size); + + // Called on heap overflow, before exiting + void (* outOfHeapHook) (W_ request_size, W_ heap_size); + + // Called when malloc() fails, before exiting + void (* mallocFailHook) (W_ request_size /* in bytes */, const char *msg); + + // Called for every GC + void (* gcDoneHook) (const struct GCDetails_ *stats); + + // Called when GC sync takes too long (+RTS --long-gc-sync=