|
1 # Tea Language |
|
2 |
|
3 **Tea** is an experimental DSL based on Smalltalk language that compiles |
|
4 statically to (optimized) machine code. It depends on LLVM toolchain to |
|
5 actually optimize and generate target machine code. |
|
6 |
|
7 ## Prerequisites |
|
8 |
|
9 * An x96_64 Linux box |
|
10 * GNU Make & C++ compiler (GCC / Clang would do it) |
|
11 * LLVM *3.8* installation - requires libLLVM.so shared library |
|
12 |
|
13 ## Loading into Smalltalk/X |
|
14 |
|
15 **1.** Get [Smalltalk/X jv-branch](https://swing.fit.cvut.cz/projects/stx-jv/) (preferably a night build). |
|
16 |
|
17 **2.** Clone *Tea*, *Ring* and *LLVM-S* repositories |
|
18 |
|
19 ``` |
|
20 #!bash |
|
21 mkdir -p ~/SmalltalkXProjects/jv |
|
22 mkdir -p ~/SmalltalkXProjects/stx/goodies |
|
23 hg clone https://bitbucket.org/janvrany/stx-goodies-ring ~/SmalltalkXProjects/stx/goodies/ring |
|
24 hg clone https://bitbucket.org/janvrany/jv-llvm-s ~/SmalltalkXProjects/jv/llvm_s |
|
25 hg clone https://bitbucket.org/janvrany/jv-tea ~/SmalltalkXProjects/jv/tea |
|
26 ``` |
|
27 |
|
28 **3.** Compile LLVM C Extension library |
|
29 |
|
30 ``` |
|
31 #!bash |
|
32 cd ~/SmalltalkXProjects/jv/llvm_s/llvm_c_ext |
|
33 make LLVM_CONFIG=~/path/to/llvm-3.8/bin/llvm-config |
|
34 ``` |
|
35 |
|
36 **4.** Load the package into Smalltalk/X |
|
37 ``` |
|
38 #!smalltalk |
|
39 Smalltalk loadPackage: 'stx:goodies/ring'. |
|
40 Smalltalk loadPackage: 'jv:llvm_s'. |
|
41 Smalltalk loadPackage: 'jv:tea/compiler'. |
|
42 Smalltalk loadPackage: 'jv:tea/compiler/cli'. |
|
43 ``` |
|
44 |
|
45 ## Documentation |
|
46 |
|
47 * [Project wiki](https://bitbucket.org/janvrany/jv-tea/wiki/Home) |
|
48 |
|
49 But do not expect much - it's more of an unsorted list of comments and thoughts |
|
50 rather than documentation or even 'language specification'. |
|
51 |
|
52 ## Authors |
|
53 |
|
54 * Jan Vrany |
|
55 |
|
56 ## License |
|
57 |
|
58 This code is not an open-source (yet). You may use this code |
|
59 for your own experiments and projects, given that: |
|
60 |
|
61 * all modification to the code will be sent to the |
|
62 original author for inclusion in future releases |
|
63 * this is not used in any commercial software |
|
64 |
|
65 **This license is provisional and may (will) change in |
|
66 a future.** |