<commit_before>#!/bin/sh
# test that every step outputs something that is consumable by 
# another step

rm -f test.bc.temp[12]

LD_LIBRARY_PATH=../lib/Assembly/Parser/Debug:../lib/Assembly/Writer/Debug:../lib/Analysis/Debug:../lib/VMCore/Debug:../lib/Bytecode/Writer/Debug:../lib/Bytecode/Reader/Debug:../lib/Optimizations/Debug
export LD_LIBRARY_PATH

# Two full cycles are needed for bitwise stability
# FIXME: We must strip symbols, because the symbol tables are not output in 
# sorted order in the bytecode :(

../tools/as/as   < $1      | ../tools/opt/opt -q -strip > $1.bc.1 || exit 1
../tools/dis/dis < $1.bc.1 > $1.ll.1 || exit 2
../tools/as/as   < $1.ll.1 > $1.bc.2 || exit 3
../tools/dis/dis < $1.bc.2 > $1.ll.2 || exit 4

diff $1.ll.[12] || exit 7

# FIXME: When we sort things correctly and deterministically, we can reenable this
#diff $1.bc.[12] || exit 8

rm $1.[bl][cl].[12]
<commit_msg>Symboltables are sorted in the bytecode, so no problems here!<commit_after>#!/bin/sh
# test that every step outputs something that is consumable by 
# another step

rm -f test.bc.temp[12]

LD_LIBRARY_PATH=../lib/Assembly/Parser/Debug:../lib/Assembly/Writer/Debug:../lib/Analysis/Debug:../lib/VMCore/Debug:../lib/Bytecode/Writer/Debug:../lib/Bytecode/Reader/Debug:../lib/Optimizations/Debug
export LD_LIBRARY_PATH

# Two full cycles are needed for bitwise stability

../tools/as/as   < $1      > $1.bc.1 || exit 1
../tools/dis/dis < $1.bc.1 > $1.ll.1 || exit 2
../tools/as/as   < $1.ll.1 > $1.bc.2 || exit 3
../tools/dis/dis < $1.bc.2 > $1.ll.2 || exit 4

diff $1.ll.[12] || exit 7

# FIXME: When we sort things correctly and deterministically, we can reenable this
#diff $1.bc.[12] || exit 8

rm $1.[bl][cl].[12]

{'fraction_non_alphanumeric': 0.17927823050058206, 'fraction_numerical': 0.037252619324796274, 'mean_word_length': 3.1026252983293556, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3284223', 'n_tokens_mistral': 660, 'n_tokens_neox': 632, 'n_words': 168}