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:
parent
d5250a97c2
commit
0146a39ebb
.gitignorecompile.cmdcompile.sh
compiler/src/prog8
docs/source
examples
assignments.p8comparison_ifs_byte.p8comparison_ifs_float.p8comparison_ifs_ubyte.p8comparison_ifs_uword.p8comparison_ifs_word.p8comparisons_byte.p8comparisons_float.p8comparisons_ubyte.p8comparisons_uword.p8comparisons_word.p8cube3d-float.p8cube3d-stackvm.p8cube3d.p8examples.imlforloops.p8hello.p8mandelbrot-stackvm.p8mandelbrot.p8numbergame-lowlevel.p8numbergame.p8sprites.p8swirl-float.p8swirl-stackvm.p8swirl.p8test.p8wizzine.p8
1
.gitignore
vendored
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
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>
|
Loading…
x
Reference in New Issue
Block a user