From 7dcdfce1e51791f8cc34c661b0370403ebbca0f1 Mon Sep 17 00:00:00 2001 From: Pierre Le Marre Date: Mon, 17 Jun 2024 19:41:38 +0200 Subject: [PATCH] fix: Remove NOINLINE for bitmaps --- ucd2haskell/exe/UCD2Haskell/Generator.hs | 8 -------- .../lib/Unicode/Internal/Char/ScriptExtensions.hs | 5 ----- unicode-data-scripts/lib/Unicode/Internal/Char/Scripts.hs | 3 --- .../lib/Unicode/Internal/Char/Security/IdentifierType.hs | 5 ----- .../Unicode/Internal/Char/UnicodeData/GeneralCategory.hs | 5 ----- 5 files changed, 26 deletions(-) diff --git a/ucd2haskell/exe/UCD2Haskell/Generator.hs b/ucd2haskell/exe/UCD2Haskell/Generator.hs index a796037..1a5b607 100644 --- a/ucd2haskell/exe/UCD2Haskell/Generator.hs +++ b/ucd2haskell/exe/UCD2Haskell/Generator.hs @@ -559,12 +559,10 @@ generateShamochuBitmaps name rawInt powersStage1 powersStage2 convert xs = , mkAnd "n" "mask" ] , "\n" , " where\n" - -- , " mask = (1 `shiftL` ", BB.wordDec (Shamochu.dataChunkSizeLog2 stats), ") - 1\n" , " ", mkMask "mask" (Shamochu.dataChunkSizeLog2 stats) , " !(Ptr data#) = ", dataBitMap, "\n" , " !(Ptr offsets#) = ", offsetsBitMap, "\n" , "\n" - , "{-# NOINLINE ", dataBitMap, " #-}\n" , dataBitMap, " :: Ptr ", dataType, "\n" , dataBitMap, " = Ptr\n" , " \"", enumMapToAddrLiteral' @@ -574,7 +572,6 @@ generateShamochuBitmaps name rawInt powersStage1 powersStage2 convert xs = (Exts.toList array) "\"#\n" , "\n" - , "{-# NOINLINE ", offsetsBitMap, " #-}\n" , offsetsBitMap, " :: Ptr ", offsetType, "\n" , offsetsBitMap, " = Ptr\n" , " \"", enumMapToAddrLiteral' @@ -614,15 +611,12 @@ generateShamochuBitmaps name rawInt powersStage1 powersStage2 convert xs = , mkAnd "n" "maskData" ] , "\n" , " where\n" - -- , " maskData = (1 `shiftL` ", BB.wordDec (Shamochu.dataChunkSizeLog2 stats), ") - 1\n" - -- , " maskOffsets = (1 `shiftL` ", BB.wordDec (Shamochu.offsets1ChunkSizeLog2 stats), ") - 1\n" , " ", mkMask "maskData" (Shamochu.dataChunkSizeLog2 stats) , " ", mkMask "maskOffsets" (Shamochu.offsets1ChunkSizeLog2 stats) , " !(Ptr data#) = ", dataBitMap, "\n" , " !(Ptr offsets1#) = ", offsets1BitMap, "\n" , " !(Ptr offsets2#) = ", offsets2BitMap, "\n" , "\n" - , "{-# NOINLINE ", dataBitMap, " #-}\n" , dataBitMap, " :: Ptr ", dataType, "\n" , dataBitMap, " = Ptr\n" , " \"", enumMapToAddrLiteral' @@ -632,7 +626,6 @@ generateShamochuBitmaps name rawInt powersStage1 powersStage2 convert xs = (Exts.toList dataArray) "\"#\n" , "\n" - , "{-# NOINLINE ", offsets1BitMap, " #-}\n" , offsets1BitMap, " :: Ptr ", offset1Type, "\n" , offsets1BitMap, " = Ptr\n" , " \"", enumMapToAddrLiteral' @@ -642,7 +635,6 @@ generateShamochuBitmaps name rawInt powersStage1 powersStage2 convert xs = (Exts.toList offset1Array) "\"#\n" , "\n" - , "{-# NOINLINE ", offsets2BitMap, " #-}\n" , offsets2BitMap, " :: Ptr ", offset2Type, "\n" , offsets2BitMap, " = Ptr\n" , " \"", enumMapToAddrLiteral' diff --git a/unicode-data-scripts/lib/Unicode/Internal/Char/ScriptExtensions.hs b/unicode-data-scripts/lib/Unicode/Internal/Char/ScriptExtensions.hs index 1f1dbaf..4c364b4 100644 --- a/unicode-data-scripts/lib/Unicode/Internal/Char/ScriptExtensions.hs +++ b/unicode-data-scripts/lib/Unicode/Internal/Char/ScriptExtensions.hs @@ -119,7 +119,6 @@ lookupEncodedScriptExtensionsPlanes0To3BitMap n = !(Ptr offsets1#) = encodedScriptExtensionsPlanes0To3Offsets1BitMap !(Ptr offsets2#) = encodedScriptExtensionsPlanes0To3Offsets2BitMap -{-# NOINLINE encodedScriptExtensionsPlanes0To3DataBitMap #-} encodedScriptExtensionsPlanes0To3DataBitMap :: Ptr Int8 encodedScriptExtensionsPlanes0To3DataBitMap = Ptr "\70\70\24\24\156\156\156\156\82\82\82\82\82\216\82\82\82\82\156\123\123\123\123\123\123\123\123\156\156\156\156\156\156\180\31\180\199\31\175\175\204\202\31\204\204\31\31\203\175\31\ @@ -200,7 +199,6 @@ encodedScriptExtensionsPlanes0To3DataBitMap = Ptr \\119\119\119\119\119\119\119\119\89\89\89\89\89\89\89\89\112\112\112\112\112\112\112\112\108\108\108\108\108\108\108\108\111\111\111\111\111\111\111\111\128\128\128\128\128\128\128\128\163\163\ \\163\163\163\163\163\163"# -{-# NOINLINE encodedScriptExtensionsPlanes0To3Offsets1BitMap #-} encodedScriptExtensionsPlanes0To3Offsets1BitMap :: Ptr Word16 encodedScriptExtensionsPlanes0To3Offsets1BitMap = Ptr "\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\79\14\117\1\79\14\149\2\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\ @@ -297,7 +295,6 @@ encodedScriptExtensionsPlanes0To3Offsets1BitMap = Ptr \\40\9\40\9\40\9\181\5\39\9\36\9\142\5\186\5\34\7\181\5\32\7\181\5\36\9\36\9\137\5\40\9\37\9\40\9\6\4\38\7\37\9\40\9\6\4\117\1\117\1\117\1\117\1\117\1\117\1\8\4\117\1\6\11\117\1\163\4\163\4\163\4\163\4\163\4\99\0\163\4\92\1\129\5\117\1\97\0\117\1\117\1\117\1\117\1\117\1\117\1\ \\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\117\1\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\163\4\79\8\163\4\163\4\163\4\163\4\163\4\163\4\90\1\117\1\117\1\117\1\117\1\163\4\91\1"# -{-# NOINLINE encodedScriptExtensionsPlanes0To3Offsets2BitMap #-} encodedScriptExtensionsPlanes0To3Offsets2BitMap :: Ptr Word16 encodedScriptExtensionsPlanes0To3Offsets2BitMap = Ptr "\141\0\19\1\28\1\229\9\135\7\161\7\164\6\5\10\37\10\69\10\101\10\133\10\165\10\197\10\229\10\5\11\37\11\69\11\234\8\8\9\122\3\122\3\138\3\101\11\133\11\165\11\197\11\229\11\5\12\172\0\19\1\37\12\71\9\238\3\174\1\174\1\162\1\174\1\174\1\174\1\69\12\174\1\174\1\212\4\101\12\107\7\166\5\100\1\133\12\165\12\ @@ -331,12 +328,10 @@ lookupEncodedScriptExtensionsPlane14BitMap n = !(Ptr data#) = encodedScriptExtensionsPlane14DataBitMap !(Ptr offsets#) = encodedScriptExtensionsPlane14OffsetsBitMap -{-# NOINLINE encodedScriptExtensionsPlane14DataBitMap #-} encodedScriptExtensionsPlane14DataBitMap :: Ptr Int8 encodedScriptExtensionsPlane14DataBitMap = Ptr "\156\24\156\156\156\156\156\156\156\156\24\24\24\24\24\24\24\24\55\55\55\55\55\55\55\55"# -{-# NOINLINE encodedScriptExtensionsPlane14OffsetsBitMap #-} encodedScriptExtensionsPlane14OffsetsBitMap :: Ptr Word8 encodedScriptExtensionsPlane14OffsetsBitMap = Ptr "\0\2\2\2\10\10\10\10\10\10\10\10\10\10\10\10\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\ diff --git a/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts.hs b/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts.hs index 63c4c4b..2b3e495 100644 --- a/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts.hs +++ b/unicode-data-scripts/lib/Unicode/Internal/Char/Scripts.hs @@ -599,7 +599,6 @@ lookupScriptPlanes0To1BitMap n = !(Ptr offsets1#) = scriptPlanes0To1Offsets1BitMap !(Ptr offsets2#) = scriptPlanes0To1Offsets2BitMap -{-# NOINLINE scriptPlanes0To1DataBitMap #-} scriptPlanes0To1DataBitMap :: Ptr Int8 scriptPlanes0To1DataBitMap = Ptr "\49\49\49\49\49\49\49\49\156\156\156\156\156\156\123\123\123\123\123\123\123\123\156\156\156\156\156\156\70\70\24\24\156\156\156\156\143\143\143\143\143\143\143\143\156\156\156\156\156\55\ @@ -674,7 +673,6 @@ scriptPlanes0To1DataBitMap = Ptr \\119\119\119\119\119\119\119\89\89\89\89\89\89\89\89\112\112\112\112\112\112\112\112\108\108\108\108\108\108\108\108\111\111\111\111\111\111\111\111\128\128\128\128\128\128\128\128\163\163\163\ \\163\163\163\163\163"# -{-# NOINLINE scriptPlanes0To1Offsets1BitMap #-} scriptPlanes0To1Offsets1BitMap :: Ptr Word16 scriptPlanes0To1Offsets1BitMap = Ptr "\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\56\11\200\3\56\11\103\11\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\ @@ -767,7 +765,6 @@ scriptPlanes0To1Offsets1BitMap = Ptr \\114\4\114\4\114\4\96\3\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\96\3\200\3\114\4\115\4\46\5\114\4\46\5\114\4\46\5\114\4\114\4\114\4\116\4\200\3\131\10\200\3\114\4\114\4\114\4\114\4\114\4\96\3\114\4\35\4\34\4\200\3\116\4\200\3\200\3\200\3\200\3\200\3\200\3\200\3\ \\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\200\3\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\114\4\78\3\114\4\114\4\114\4\114\4\114\4\114\4\33\4\200\3\200\3\200\3\200\3\114\4\45\13"# -{-# NOINLINE scriptPlanes0To1Offsets2BitMap #-} scriptPlanes0To1Offsets2BitMap :: Ptr Word16 scriptPlanes0To1Offsets2BitMap = Ptr "\137\0\254\0\7\1\192\0\91\7\117\7\120\6\124\9\156\9\188\9\220\9\252\9\28\10\60\10\92\10\124\10\156\10\188\10\129\8\159\8\79\3\79\3\95\3\220\10\252\10\28\11\60\11\92\11\124\11\168\0\254\0\222\0\222\8\225\3\81\1\81\1\69\1\81\1\81\1\81\1\156\11\81\1\81\1\217\1\188\11\63\7\176\5\220\11\252\11\199\4\ diff --git a/unicode-data-security/lib/Unicode/Internal/Char/Security/IdentifierType.hs b/unicode-data-security/lib/Unicode/Internal/Char/Security/IdentifierType.hs index 8e2ff24..ca77d6c 100644 --- a/unicode-data-security/lib/Unicode/Internal/Char/Security/IdentifierType.hs +++ b/unicode-data-security/lib/Unicode/Internal/Char/Security/IdentifierType.hs @@ -122,7 +122,6 @@ lookupIdentifierTypesPlanes0To3BitMap n = !(Ptr offsets1#) = identifierTypesPlanes0To3Offsets1BitMap !(Ptr offsets2#) = identifierTypesPlanes0To3Offsets2BitMap -{-# NOINLINE identifierTypesPlanes0To3DataBitMap #-} identifierTypesPlanes0To3DataBitMap :: Ptr Int8 identifierTypesPlanes0To3DataBitMap = Ptr "\14\7\12\12\14\14\12\7\7\14\14\14\14\14\14\27\14\14\14\14\14\14\4\14\14\14\14\14\14\27\27\14\9\14\27\14\9\9\9\9\9\9\9\7\7\7\7\7\7\4\ @@ -172,7 +171,6 @@ identifierTypesPlanes0To3DataBitMap = Ptr \\8\8\8\4\21\21\0\0\0\0\22\22\22\22\22\22\0\23\10\10\10\10\10\10\20\20\20\20\20\20\20\20\14\14\14\14\0\14\14\0\0\27\0\0\0\0\0\20\20\20\ \\20\20\20\20\20\10\10\0\0\0\0\0"# -{-# NOINLINE identifierTypesPlanes0To3Offsets1BitMap #-} identifierTypesPlanes0To3Offsets1BitMap :: Ptr Word16 identifierTypesPlanes0To3Offsets1BitMap = Ptr "\147\5\36\7\148\5\148\5\159\1\159\1\159\1\151\5\43\7\177\4\222\5\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\148\5\159\1\159\1\159\1\159\1\159\1\159\1\159\1\159\1\148\5\226\0\153\5\159\1\46\7\149\5\159\1\159\1\159\1\ @@ -266,7 +264,6 @@ identifierTypesPlanes0To3Offsets1BitMap = Ptr \\185\4\184\4\112\4\248\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\112\4\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\98\6\175\3\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\ \\252\4\169\6\250\4\253\4\112\4\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\169\6\250\4\112\4\169\6\248\4\169\6\249\4\169\6\253\4\169\6\169\6\169\6\169\6\169\6\99\6\248\4\187\4\169\6\250\4\169\6\253\4\169\6\253\4"# -{-# NOINLINE identifierTypesPlanes0To3Offsets2BitMap #-} identifierTypesPlanes0To3Offsets2BitMap :: Ptr Word16 identifierTypesPlanes0To3Offsets2BitMap = Ptr "\139\7\170\7\234\5\103\8\209\1\135\8\156\6\167\8\199\8\231\8\7\9\39\9\71\9\103\9\135\9\167\9\201\7\216\6\55\1\199\9\129\0\130\0\158\4\231\9\7\10\127\5\39\10\71\10\103\10\135\10\167\10\199\10\231\10\122\1\155\5\182\5\36\6\188\5\188\5\188\5\21\1\188\5\98\6\126\6\7\11\188\6\39\11\96\3\71\11\179\2\ @@ -300,12 +297,10 @@ lookupIdentifierTypesPlane14BitMap n = !(Ptr data#) = identifierTypesPlane14DataBitMap !(Ptr offsets#) = identifierTypesPlane14OffsetsBitMap -{-# NOINLINE identifierTypesPlane14DataBitMap #-} identifierTypesPlane14DataBitMap :: Ptr Int8 identifierTypesPlane14DataBitMap = Ptr "\0\1\0\0\0\0\0\0\0\0\2\2\2\2\2\2\2\2"# -{-# NOINLINE identifierTypesPlane14OffsetsBitMap #-} identifierTypesPlane14OffsetsBitMap :: Ptr Word8 identifierTypesPlane14OffsetsBitMap = Ptr "\0\2\2\2\10\10\10\10\10\10\10\10\10\10\10\10\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\10\ diff --git a/unicode-data/lib/Unicode/Internal/Char/UnicodeData/GeneralCategory.hs b/unicode-data/lib/Unicode/Internal/Char/UnicodeData/GeneralCategory.hs index 1f40a11..f801680 100644 --- a/unicode-data/lib/Unicode/Internal/Char/UnicodeData/GeneralCategory.hs +++ b/unicode-data/lib/Unicode/Internal/Char/UnicodeData/GeneralCategory.hs @@ -270,7 +270,6 @@ lookupGeneralCategoryPlanes0To3BitMap n = !(Ptr offsets1#) = generalCategoryPlanes0To3Offsets1BitMap !(Ptr offsets2#) = generalCategoryPlanes0To3Offsets2BitMap -{-# NOINLINE generalCategoryPlanes0To3DataBitMap #-} generalCategoryPlanes0To3DataBitMap :: Ptr Int8 generalCategoryPlanes0To3DataBitMap = Ptr "\1\0\0\1\0\1\0\0\0\0\0\1\0\1\0\1\1\0\1\1\0\1\0\0\0\1\1\0\0\0\1\1\1\13\18\14\18\13\14\17\17\17\17\17\3\3\3\3\29\3\ @@ -337,7 +336,6 @@ generalCategoryPlanes0To3DataBitMap = Ptr \\0\0\29\1\17\5\5\17\5\5\17\5\5\5\5\5\5\12\5\5\5\5\5\17\29\29\9\9\9\0\1\9\9\9\10\21\21\29\29\29\29\13\14\13\14\21\21\21\21\0\ \\1\0\1\5\5\0\1\29\29\29\29\5\5\6\6\29\4\4\4\17\29\29\29\29\29\29\2\2\2\2\2\2\2\2\27\27\27\27\27\27\27\27\28\28\28\28\28\28\28\28"# -{-# NOINLINE generalCategoryPlanes0To3Offsets1BitMap #-} generalCategoryPlanes0To3Offsets1BitMap :: Ptr Word16 generalCategoryPlanes0To3Offsets1BitMap = Ptr "\237\5\126\4\74\3\74\3\74\3\74\3\235\5\101\1\240\9\119\3\150\6\127\1\74\3\74\3\74\3\74\3\74\3\236\5\120\1\138\11\164\6\119\3\74\3\74\3\74\3\74\3\74\3\74\3\74\3\74\3\74\3\118\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\119\3\ @@ -433,7 +431,6 @@ generalCategoryPlanes0To3Offsets1BitMap = Ptr \\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\29\4\76\2\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\34\4\28\4\32\4\35\4\119\3\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\32\4\119\3\28\4\30\4\28\4\31\4\28\4\35\4\28\4\28\4\28\4\28\4\28\4\ \\162\7\30\4\216\4\28\4\32\4\28\4\35\4\28\4\35\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\28\4\165\7\28\4\28\4\28\4\28\4\28\4\28\4\33\4\119\3\119\3\119\3\119\3\44\10\202\11"# -{-# NOINLINE generalCategoryPlanes0To3Offsets2BitMap #-} generalCategoryPlanes0To3Offsets2BitMap :: Ptr Word16 generalCategoryPlanes0To3Offsets2BitMap = Ptr "\175\8\212\7\243\7\207\8\111\6\137\6\239\8\15\9\47\9\79\9\111\9\143\9\175\9\207\9\239\9\15\10\47\10\76\1\188\0\155\7\240\3\76\1\3\4\79\10\111\10\201\1\143\10\175\10\207\10\239\10\187\7\15\11\47\11\79\11\108\4\228\6\1\7\6\2\248\1\78\4\156\4\124\4\108\4\229\1\111\11\143\11\175\11\126\0\207\11\64\0\ @@ -467,12 +464,10 @@ lookupGeneralCategoryPlane14BitMap n = !(Ptr data#) = generalCategoryPlane14DataBitMap !(Ptr offsets#) = generalCategoryPlane14OffsetsBitMap -{-# NOINLINE generalCategoryPlane14DataBitMap #-} generalCategoryPlane14DataBitMap :: Ptr Int8 generalCategoryPlane14DataBitMap = Ptr "\29\26\29\29\29\29\29\29\29\29\26\26\26\26\26\26\26\26\5\5\5\5\5\5\5\5"# -{-# NOINLINE generalCategoryPlane14OffsetsBitMap #-} generalCategoryPlane14OffsetsBitMap :: Ptr Word8 generalCategoryPlane14OffsetsBitMap = Ptr "\0\2\2\2\10\10\10\10\10\10\10\10\10\10\10\10\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\18\