mirror of
https://github.com/anoma/juvix.git
synced 2024-09-11 16:26:33 +03:00
Minor refactor and script update (#2261)
* Updates the `cntlines.sh` script to take into account the removal of Abstract. * Moves the VampIR runtime to `runtime/src/vampir`.
This commit is contained in:
parent
65b000999d
commit
70dea79181
2
Makefile
2
Makefile
@ -37,6 +37,8 @@ else
|
||||
THREADS := $(shell echo %NUMBER_OF_PROCESSORS%)
|
||||
endif
|
||||
|
||||
all: build
|
||||
|
||||
clean: clean-runtime
|
||||
@${STACK} clean --full
|
||||
@rm -rf .hie
|
||||
|
17
cntlines.sh
17
cntlines.sh
@ -4,7 +4,14 @@ function count() {
|
||||
cloc $1 | grep 'SUM:' | awk '{print $5}'
|
||||
}
|
||||
|
||||
RUNTIME=$(count runtime/src)
|
||||
function count_pir () {
|
||||
find $1 -name '*.pir' -print | xargs sed '/^[[:space:]]*$/d' | wc -l | tr -d ' '
|
||||
}
|
||||
|
||||
RUNTIME_C=$(count runtime/src/juvix)
|
||||
RUNTIME_VAMPIR=$(count_pir runtime/src/vampir)
|
||||
|
||||
RUNTIME=$((RUNTIME_C+RUNTIME_VAMPIR))
|
||||
|
||||
BACKENDC=$(count src/Juvix/Compiler/Backend/C/)
|
||||
GEB=$(count src/Juvix/Compiler/Backend/Geb/)
|
||||
@ -14,7 +21,6 @@ ASM=$(count src/Juvix/Compiler/Asm/)
|
||||
CORE=$(count src/Juvix/Compiler/Core/)
|
||||
|
||||
CONCRETE=$(count src/Juvix/Compiler/Concrete/)
|
||||
ABSTRACT=$(count src/Juvix/Compiler/Abstract/)
|
||||
INTERNAL=$(count src/Juvix/Compiler/Internal/)
|
||||
BUILTINS=$(count src/Juvix/Compiler/Builtins/)
|
||||
PIPELINE=$(count src/Juvix/Compiler/Pipeline/)
|
||||
@ -25,7 +31,7 @@ EXTRA=$(count src/Juvix/Extra/)
|
||||
DATA=$(count src/Juvix/Data/)
|
||||
PRELUDE=$(count src/Juvix/Prelude/)
|
||||
|
||||
FRONT=$((CONCRETE + ABSTRACT + INTERNAL + BUILTINS + PIPELINE))
|
||||
FRONT=$((CONCRETE + INTERNAL + BUILTINS + PIPELINE))
|
||||
BACK=$((BACKENDC + GEB + VAMPIR + REG + ASM + CORE))
|
||||
OTHER=$((APP + HTML + EXTRA + DATA + PRELUDE))
|
||||
TESTS=$(count test/)
|
||||
@ -34,7 +40,6 @@ TOTAL=$((FRONT+BACK+OTHER+TESTS))
|
||||
|
||||
echo "Front end: $FRONT LOC"
|
||||
echo " Concrete: $CONCRETE LOC"
|
||||
echo " Abstract: $ABSTRACT LOC"
|
||||
echo " Internal: $INTERNAL LOC"
|
||||
echo " Builtins: $BUILTINS LOC"
|
||||
echo " Pipeline: $PIPELINE LOC"
|
||||
@ -46,6 +51,8 @@ echo " JuvixReg: $REG LOC"
|
||||
echo " JuvixAsm: $ASM LOC"
|
||||
echo " JuvixCore: $CORE LOC"
|
||||
echo "Runtime: $RUNTIME LOC"
|
||||
echo " C runtime: $RUNTIME_C LOC"
|
||||
echo " VampIR runtime: $RUNTIME_VAMPIR LOC"
|
||||
echo "Other: $OTHER LOC"
|
||||
echo " Application: $APP LOC"
|
||||
echo " Html: $HTML LOC"
|
||||
@ -54,4 +61,4 @@ echo " Data: $DATA LOC"
|
||||
echo " Prelude: $PRELUDE LOC"
|
||||
echo "Tests: $TESTS LOC"
|
||||
echo ""
|
||||
echo "Total: $TOTAL Haskell LOC + $RUNTIME C LOC"
|
||||
echo "Total: $TOTAL Haskell LOC + $RUNTIME_C C LOC + $RUNTIME_VAMPIR VampIR LOC"
|
||||
|
@ -29,7 +29,7 @@ extra-source-files:
|
||||
- juvix-stdlib/**/*.juvix
|
||||
- runtime/include/**/*.h
|
||||
- runtime/**/*.a
|
||||
- runtime/vampir/*.pir
|
||||
- runtime/src/vampir/*.pir
|
||||
|
||||
dependencies:
|
||||
- aeson == 2.0.*
|
||||
|
@ -97,7 +97,7 @@ vampIRDefs bits =
|
||||
"def integerBits = "
|
||||
<> show bits
|
||||
<> ";\n"
|
||||
<> UTF8.toString $(FE.makeRelativeToProject "runtime/vampir/stdlib.pir" >>= FE.embedFile)
|
||||
<> UTF8.toString $(FE.makeRelativeToProject "runtime/src/vampir/stdlib.pir" >>= FE.embedFile)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- helper functions
|
||||
|
Loading…
Reference in New Issue
Block a user