Last active
August 29, 2015 13:56
-
-
Save Tarrasch/8972574 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just some good commands | |
compnd () { "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-DUSE_DWARF -optc-O2 -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\" -static -O -H64m -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -g -c rts/sm/Scav.c -o $1 -optc-D$2 } | |
comp () { "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS -optc-DDEBUG -optc-fno-strict-aliasing -optc-fno-common -optc-DUSE_DWARF -optc-O2 -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\" -static -O -H64m -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -g -c rts/sm/Scav.c -o $1 -optc-D$2 } | |
comp Scav_use.o use_function_yay && comp Scav_explicit.o explicit_yay && banner MUSTSEETHIS && banner $(( $(cat Scav_use.o | wc -l) - $(cat Scav_explicit.o | wc -l) )) && diff Scav_use.o Scav_explicit.o | |
objdump --source Scav_explicit.o | less | |
diff <(objdump --source Scav_explicit.o | sed 's:<.*>::') <(objdump --source Scav_use.o | sed 's:<.*>::') | less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STATIC_INLINE StgPtr | |
scavenge_small_bitmap (StgPtr p, nat size, StgWord bitmap) | |
{ | |
while (size > 0) { | |
if ((bitmap & 1) == 0) { | |
evacuate((StgClosure **)p); | |
} | |
p++; | |
bitmap = bitmap >> 1; | |
size--; | |
} | |
return p; | |
} | |
// Why Does the object files differ? wtf? it shouldnt | |
StgPtr | |
scavenge_PAP_payload (StgClosure *fun, StgClosure **payload, StgWord size) | |
{ | |
StgPtr p; | |
StgWord bitmap; | |
StgFunInfoTable *fun_info; | |
switch (fun_info->f.fun_type) { | |
default: | |
#if defined(use_function_yay) | |
p = scavenge_small_bitmap(p, size, bitmap); | |
#elif defined(explicit_yay) | |
while (size > 0) { | |
if ((bitmap & 1) == 0) { | |
evacuate((StgClosure **)p); | |
} | |
p++; | |
bitmap = bitmap >> 1; | |
size--; | |
} | |
#else | |
#error("you mama!!!") | |
#endif | |
break; | |
} | |
return p; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment