NameDateSize

..23-Mar-202058

auxmap.eclH A D25-Jul-2019714

compiler_analysis.eclH A D25-Jul-201918.6 KiB

compiler_builtins.eclH A D25-Jul-201929 KiB

compiler_codegen.eclH A D25-Jul-201951 KiB

compiler_common.eclH A D25-Jul-201940.6 KiB

compiler_compound.eclH A D25-Jul-201929.9 KiB

compiler_indexing.eclH A D25-Jul-201926.8 KiB

compiler_map.eclH A D25-Jul-20196.9 KiB

compiler_normalise.eclH A D25-Jul-201940.4 KiB

compiler_peephole.eclH A D25-Jul-201967.2 KiB

compiler_regassign.eclH A D25-Jul-201929.2 KiB

compiler_test.eclH A D25-Jul-201944.9 KiB

compiler_varclass.eclH A D25-Jul-201930.8 KiB

ecl_compiler.eclH A D25-Jul-201938.7 KiB

Makefile.inH A D25-Jul-20199 KiB

READMEH A D25-Jul-20194.6 KiB

source_processor.eclH A D25-Jul-201940.2 KiB

test.refH A D25-Jul-2019344.8 KiB

testo.refH A D25-Jul-2019311.9 KiB

README

1Standard installation
2---------------------
3
4If you are just building ECLiPSe from the repository sources,
5there is no need to (re)build the compiler - the corresponding
6.eco files are already in the repository as "bootfiles" (Kernel/lib/*.eco).
7
8The 'make -f Makefile.$ARCH install' command here just builds the
9compiler documentation.
10
11
12
13Making changes to the compiler
14------------------------------
15
16Before you start changing the compiler, build an aux_compiler, which
17is needed for compiling your modified compiler.  This aux_compiler
18is just a normal compiler, but with all its modules renamed to aux_...
19You need to do this only once, and it should be done from stable
20compiler sources (the build is done using the stable compiler/runtime
21in ../bin)
22
23    % make -f Makefile.$ARCH aux_eco
24
25Now you can edit the compiler sources and compile the result:
26(this compile is done using the stable runtime in ../bin and the aux_compiler)
27If you want the compiler to be debuggable, set DEBUG=on in Makefile.$ARCH.
28
29    % make -f Makefile.$ARCH eco
30
31This creates local compiler_XXX.eco files which can be used for testing.
32(testing the stable runtime plus the modified compiler)
33To run the test suite:
34
35    % make -f Makefile.$ARCH test 
36    % make -f Makefile.$ARCH testo
37
38Or, to test this compiler manually:
39
40    % ../bin/$ARCH/eclipse
41
42    ?- use_module(ecl_compiler).
43    ?- ...<you are now working with your modified compiler>...
44
45If this works, and if you had set DEBUG=on in Makefile.$ARCH, set it
46to DEBUG=off now and re-make the eco files in nodebug mode:
47
48    % make -f Makefile.$ARCH ecoclean
49    % make -f Makefile.$ARCH eco
50
51Then, add the tested compiler to the kernel by copying the .eco files:
52
53    % make -f Makefile.$ARCH bootfiles
54
55Do not forget to check-in the modified bootfiles along with your
56modified sources!!!!  They are in <eclipsedir>/Kernel/lib/*.eco
57
58
59
60Making changes to the compiler AND the runtime system
61-----------------------------------------------------
62
63Edit/build/copy the compiler sources as above.  Then go to
64
65    % cd ../Kernel/$ARCH
66
67Here, edit the runtime, e.g. emulator sources and build it
68
69    % make
70
71You can then run the local sepia executable, giving you the modified
72runtime (assuming the modified runtime can still boot the old .eco files)
73and the modified compiler
74
75    % ./sepia -D ..
76    ?- ...<you are now working with your modified compiler>...
77
78Once things seem to work:
79
80    % make install
81
82The updated system is now in <eclipsedir>/...
83Test the new runtime with the new compiler:
84
85    % cd <eclipsedir>/Compiler
86    % make -f Makefile.$ARCH test
87    % make -f Makefile.$ARCH testo
88
89
90Updating everything else with your new compiler
91-----------------------------------------------
92
93You now have in <eclipsedir> a preliminary system that has:
94- compiler eco files (the new compiler compiled with the old compiler)
95- kernel eco files (still compiled with the old compiler)
96- library eco files (still compiled with the old compiler)
97Update these now, step by step.
98
99First, build a new aux-compiler in <eclipsedir>/Compiler, use this
100to rebuild the new compiler, and install the compiler bootfiles:
101
102    % cd <eclipsedir>/Compiler
103    % rm *.eco
104    % make -f Makefile.$ARCH aux_eco
105    % make -f Makefile.$ARCH eco	(optional)
106    % make -f Makefile.$ARCH test	(optional)
107    % make -f Makefile.$ARCH testo	(optional)
108    % make -f Makefile.$ARCH bootfiles
109
110Second, rebuild the kernel bootfiles:
111
112    % cd <eclipsedir>/Kernel/$ARCH
113    % make new_bootfiles
114
115Now we have rebuilt all eco files that need to be checked in!
116
117Third, rebuild all the libray eco files:
118
119    % cd <eclipsedir>/Kernel/$ARCH
120    % make ecoclean
121    % make install
122
123Do the same in all other subdirectories (icparc_solvers, etc) that
124create eco files.
125
126Now we should have a completely updated system - run the tests!
127If everything is fine, check in the changes to
128- compiler sources in <eclipsedir>/Compiler
129- kernel sources in <eclipsedir>/Kernel/{src,lib}
130- boot eco files in <eclipsedir>/Kernel/lib
131
132
133Mutually dependent changes to compiler/runtime
134----------------------------------------------
135
136It is tricky to make mutually dependent changes to compiler and runtime
137(i.e. when the modified runtime does not run old eco files, or the new
138compiler does not work with the old assembler, or the like).
139In that case, proceed in two steps:
140
1411. make a runtime that can handle old AND new compiler output.
1422. once that works and everything has been recompiled with the new
143   compiler, strip the old functionality from the runtime.
144
145
146Merging
147-------
148
149Do not try to merge nontrivial changes to eco files.  Instead,
150remove the eco bootfiles in Kernel/lib and remake them using the
151merged sources.
152
153