summaryrefslogtreecommitdiff
path: root/minie
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2019-02-28 21:15:32 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2019-02-28 21:15:32 +0100
commit0abefa3cdee7b821c49c2eab28b2c7b2b34a88e7 (patch)
treeb6d35ec27aeba413358352affa6f312d7612a2cf /minie
parenta1c7f0a1d6677283dcfbd838df148d839be0f374 (diff)
downloadcompilertests-0abefa3cdee7b821c49c2eab28b2c7b2b34a88e7.tar.gz
compilertests-0abefa3cdee7b821c49c2eab28b2c7b2b34a88e7.tar.bz2
some comments before a redesign of the symbol table
Diffstat (limited to 'minie')
-rw-r--r--minie/DESIGN6
-rw-r--r--minie/TODOS11
-rwxr-xr-xminie/build.sh6
3 files changed, 17 insertions, 6 deletions
diff --git a/minie/DESIGN b/minie/DESIGN
index 7c6a4ce..a517964 100644
--- a/minie/DESIGN
+++ b/minie/DESIGN
@@ -63,9 +63,9 @@ Step 2: Write compiler in N, with a backend for O''
Do all the steps of step 1 again in language N as nicely as possible.
Introduce new elements to N (and thus to the N to O translator as needed).
-The question remains whether this is a full N language or only a sublanguage N'.
-We produce code for a small subset of O, so also this code can be
+The question remains whether this is a full N language or only a subset
+of language N'. We produce code for a small subset of O, so also this code can be
built on as many systems as possible. The goal is that N is self-hosting
using the toolchain of O.
-Step 3:
+Step 3: Write a native backend for N targetting system T'' or a for a simulator E(T'')
diff --git a/minie/TODOS b/minie/TODOS
index b1b6011..edae44a 100644
--- a/minie/TODOS
+++ b/minie/TODOS
@@ -233,6 +233,17 @@ intermediate formats can be in memory or on external media. The later is
the older design when memory was scarse. It also avoids using complicated
data structures in memory.
+symbols
+
+all allocation on stack might not be the best idea..
+..we allocate all symbols with their type, we must split symbols and
+types. Variables point to their defined type, parameters in a function
+to local variables (or variables of the upper scope in case of a VAR
+parameter), names in a record type definition to symbols agains, which
+point to types.
+This also means we usually get a global namespace this way, so a variable
+'a', a type 'a' and a procedure 'a' cannot co-exist.
+
links
-----
diff --git a/minie/build.sh b/minie/build.sh
index 3975514..ee3737c 100755
--- a/minie/build.sh
+++ b/minie/build.sh
@@ -3,9 +3,9 @@
set -e
gcc -m32 --stack-usage -g -O0 -Wall -pedantic -std=c89 -Wno-return-type -o e2c e2c.c
-tcc -m32 -g -O0 -o e2c e2c.c
-pcc -melf_i386 -g -Wall -O0 -g -D__float128="long double" -o e2c e2c.c
-clang -m32 -g -O0 -Wall -pedantic -std=c89 -Wno-return-type -o e2c e2c.c
+#tcc -m32 -g -O0 -o e2c e2c.c
+#pcc -melf_i386 -g -Wall -O0 -g -D__float128="long double" -o e2c e2c.c
+#clang -m32 -g -O0 -Wall -pedantic -std=c89 -Wno-return-type -o e2c e2c.c
./e2c < test1.e
set +e