-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathHACKING
141 lines (100 loc) · 3.42 KB
/
HACKING
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
HACKING
=======
This file is for those who want s to hask the cutting-edge Sagittarius
sources from the Git repository. If you just want to compile
from the distribution, you don't need to read any further.
How to check out from the repository
------------------------------------
This section is for those who are not fimiliar with Git commands. As a
preconditions, Git is installed on your environment.
### Basic commands for Git
#### Clone
```shell
git clone https://bitbucket.org/ktakashi/sagittarius-scheme sagittarius
```
The last `sagittarius` is destination directory name.
#### Checkout
Following command switches between branches.
```shell
git checkout ${branch name}
```
If you don't specify any branch name, then current branch will be used.
#### Commit
```shell
git commit -am 'comment'
```
It's better to use interactive mode:
```shell
git commit --interactive
```
How to build HEAD code
----------------------
To build HEAD code, you need the latest release of Sagittarius
Scheme. So first please install it.
### Provided developer tool
We provide `dist.sh` for developer and it generates boot code, VM
instructions and generated code from stub file.
### Generate code
To generate code you need to execute following commands;
```shell
./dist.sh stub
./dist.sh precomp
./dist.sh srfi
./dist.sh tz
./dist.sh unicode
./dist.sh html
```
Or this command does the same;
```shell
./dist.sh gen
```
These commands generate C files from stub files and Scheme files
respectively. This must be run *before* CMake command otherwise CMake
process will fail.
If you set the path to Sagittarius executable to the environment
variable `SASH` with, then `dist.sh` will use that executable file.
```shell
env SASH=/opt/bin/sagittarius ./dist.sh gen
```
To clean the generated code, you need to execute following command;
```shell
./dist.sh clean
```
#### Using local TZ database and Unicode files
If you want to use local TZ database file or Unicode files, you can
locate the following files into `tzdata` and `unicode/data`
directories respectively. If there is no such directory yet, then you
can create them manually.
##### For TZ database
- tzdata-latest.tar.gz [Download](ftp://iana.org/tz/tzdata-latest.tar.gz)
- windowsZones.xml [Download](http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml)
NOTE: all of above files are removed when `./dist.sh tz` command is
executed. If you want to reuse them, make sure you copy them before
you run the command.
##### Unicode files
- CaseFolding.txt
- CompositionExclusions.txt
- DerivedCoreProperties.txt
- GraphemeBreakProperty.txt
- PropList.txt
- SpecialCasing.txt
- UnicodeData.txt
- WordBreakProperty.txt
Above Unicode files can be downloaded from the Unicode FTP site:
[ftp.unicode.org](ftp://ftp.unicode.org/Public/12.1.0/). Currently,
Sagittarius uses version 12.1.0, if you want to use newer/older
version, you can also use them. (May break some of test cases,
especially if you use unicode version older than 6.3.0)
Performance optimisation
------------------------
There are two parts of performance optimisation, C and Scheme world.
For C, we recommend to use `gperftools` (at least I'm using it, please
let me know if you have better options). Due to the limitation of the
tool, you may want to comment out `dlclose` call in `src/dl_dlopen.c`
so that the tool can emit proper names instead of hex addresses.
<!-- end of file
Local Variables:
mode: markdown
fill-column: 70
End:
-->