1
0
mirror of https://github.com/irmen/prog8.git synced 2025-01-14 01:29:55 +00:00

moved some more stuff around

This commit is contained in:
Irmen de Jong 2019-01-08 02:09:35 +01:00
parent d5250a97c2
commit 0146a39ebb
32 changed files with 21 additions and 8 deletions

1
.gitignore vendored

@ -8,6 +8,7 @@
*.asm
*.bin
*.labels.txt
*.vm.txt
*.vice-mon-list
docs/build
out/

@ -1,6 +1,8 @@
rem set PROG8_LIBDIR=../prog8lib
set PROG8CLASSPATH=out/production/compiler/
set PROG8_COMPILER_DIR=compiler
set PROG8_LIBDIR=%PROG8_COMPILER_DIR%/prog8lib
set PROG8CLASSPATH=%PROG8_COMPILER_DIR%/out/production/compiler/
set KOTLINPATH=%USERPROFILE%/.IdeaIC2018.3/config/plugins/Kotlin
set LIBJARS=%KOTLINPATH%/lib/kotlin-stdlib.jar;%KOTLINPATH%/lib/kotlin-reflect.jar;antlr/lib/antlr-runtime-4.7.2.jar
set LIBJARS=%KOTLINPATH%/lib/kotlin-stdlib.jar;%KOTLINPATH%/lib/kotlin-reflect.jar;%PROG8_COMPILER_DIR%/antlr/lib/antlr-runtime-4.7.2.jar
java -Dprog8.libdir=%PROG8_LIBDIR% -cp %PROG8CLASSPATH%;%LIBJARS% prog8.CompilerMainKt %*

@ -1,8 +1,9 @@
#!/usr/bin/env sh
# PROG8_LIBDIR=../prog8lib
PROG8CLASSPATH=out/production/compiler
PROG8_COMPILER_DIR=compiler
PROG8_LIBDIR=${PROG8_COMPILER_DIR}/prog8lib
PROG8CLASSPATH=${PROG8_COMPILER_DIR}/out/production/compiler
KOTLINPATH=${HOME}/.IntelliJIdea2018.3/config/plugins/Kotlin
LIBJARS=${KOTLINPATH}/lib/kotlin-stdlib.jar:${KOTLINPATH}/lib/kotlin-reflect.jar:antlr/lib/antlr-runtime-4.7.2.jar
LIBJARS=${KOTLINPATH}/lib/kotlin-stdlib.jar:${KOTLINPATH}/lib/kotlin-reflect.jar:${PROG8_COMPILER_DIR}/antlr/lib/antlr-runtime-4.7.2.jar
java -Dprog8.libdir=${PROG8_LIBDIR} -cp ${PROG8CLASSPATH}:${LIBJARS} prog8.CompilerMainKt $*

@ -138,7 +138,7 @@ private fun compileMain(args: Array<String>) {
val intermediate = compiler.compile(moduleAst, heap)
intermediate.optimize()
val stackVmFilename = intermediate.name + "_stackvm.txt"
val stackVmFilename = intermediate.name + ".vm.txt"
val stackvmFile = PrintStream(File(stackVmFilename), "utf-8")
intermediate.writeCode(stackvmFile)
stackvmFile.close()

@ -30,7 +30,7 @@ The compiler is invoked with the command:
For now, it produces intermediate code for the stack-based "StackVM" virtual machine. You can run this code
with the command:
``$ ./stackvm.sh modulefile_stackvm.txt``
``$ ./stackvm.sh modulefile.vm.txt``
.. todo::

9
examples/examples.iml Normal file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>