-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
92 lines (60 loc) · 2.48 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Kit v0.00.2C.x
Current status: "This is a test! Ignore!!!"
1. BUILD INSTRUCTIONS
(From a Visual Studio command line:)
mk\build_windows.bat
or (on 32-bit Linux, or 64-bit with gcc-multilib)
./mk/build_linux.sh
or (on OS X, with XCode tools (i.e. clang) installed)
./mk/build_osx.sh
2. RUN INSTRUCTIONS
# Run tests.
s6
# Run tests more verbosely.
s6 --build
# Run tests verbosely, without the codegen phase.
s6 --no-build
# Build modulename.ki and its imports for Windows, => modulename.obj
s6 <modulename>
# Build modulename.ki and its imports, => modulename.o
s6 --linux <modulename>
s6 --osx <modulename>
3. FOR FREEBSD USERS
FreeBSD works out of the box with "--linux" -- you'll probably
need to tweak the mk/linux scripts to use clang.
4. PREREQUISITES
-. An x86 CPU.
-. One of:
a. Windows (MSVC 2013 or 2015)
b. Linux (gcc with 32-bit support, i.e. gcc-multilib)
c. OS X (with clang, i.e. XCode's command line tools, or maybe some GCC)
c. FreeBSD (using the "--linux" option, it makes an ELF .o file)
5. DIRECTORY STRUCTURE
The current directory structure is:
phase1 - s1, implemented in C. Compiles s2.
phase2 - s2, implemented in proto-Kit. Compiles s2 and s3.
phase3 - s3, implemented in proto-Kit. Compiles s3 and s4.
phase4 - s4, implemented in proto-Kit. Compiles s4 and s5.
phase5 - s5, implemented in proto-Kit. Compiles s5 and s6.
src - s6, implemented in proto-Kit. Compiles s6.
examples - examples to run, disorganized junk
ABOUT THE VERSIONS
- s1's language is merely "C, with templates, constructors and
destructors, elementary encapsulation, tagged enum types, no
implicit conversions."
- s2's is very similar to s1's, but with some worthwhile
enhancements that s1 does not support.
- s3 uses s2's quick-return expressions.
- s4 uses s3's generalized indexing expressions.
- s5 uses s4's foreach loops. It defines the same language as s4.
- s6 should be compilable via s4 and s5. s1 will someday be
capable of compiling s6 directly (once quick-return, generalized
indexing, and foreach loops get added).
At some point, the highest-numbered version will use features that
s1 will never support. See FEATURES for more information.
ABOUT THE IMPLEMENTATIONS
s1 can target x86 and, on Linux, amd64. Use --linux64 to target
amd64.
s2, s3, s4, and s5 can only target x86.
These only compile object files. Try `gcc -no-pie` when linking,
which is (for now) necessary on amd64.