Skip to content

Commit a77ac97

Browse files
committed
Delete accidental file; fix up documentation
1 parent 8b44583 commit a77ac97

File tree

7 files changed

+73
-207
lines changed

7 files changed

+73
-207
lines changed

DIFF

Lines changed: 0 additions & 136 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ doc: src/README.md
8686

8787

8888
# Assemble README markdown source file automatically
89-
src/README.md: src/*.hs Makefile src/README.md.intro src/README.md.outro
89+
src/README.md: src/*.hs Makefile src/README.md.intro src/README.md.outro \
90+
src/Compiler.png src/Detail.png
9091
cat src/README.md.intro > "$@"
9192

9293
printf "The source files in this directory and their purposes are:\n\n" >> "$@"

src/Compiler.ipe

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE ipe SYSTEM "ipe.dtd">
3-
<ipe version="70218" creator="Ipe 7.2.20">
4-
<info created="D:20210204114132" modified="D:20210204143205"/>
3+
<ipe version="70218" creator="Ipe 7.2.24">
4+
<info created="D:20210204114132" modified="D:20241018183341"/>
55
<ipestyle name="basic">
66
<symbol name="arrow/arc(spx)">
77
<path stroke="sym-stroke" fill="sym-stroke" pen="sym-pen">
@@ -238,74 +238,74 @@ h
238238
h
239239
</path>
240240
</symbol>
241-
<pen name="heavier" value="0.8"/>
242-
<pen name="fat" value="1.2"/>
243-
<pen name="ultrafat" value="2"/>
244-
<symbolsize name="large" value="5"/>
245-
<symbolsize name="small" value="2"/>
246-
<symbolsize name="tiny" value="1.1"/>
241+
<anglesize name="22.5 deg" value="22.5"/>
242+
<anglesize name="30 deg" value="30"/>
243+
<anglesize name="45 deg" value="45"/>
244+
<anglesize name="60 deg" value="60"/>
245+
<anglesize name="90 deg" value="90"/>
247246
<arrowsize name="large" value="10"/>
248247
<arrowsize name="small" value="5"/>
249248
<arrowsize name="tiny" value="3"/>
250-
<color name="red" value="1 0 0"/>
251249
<color name="blue" value="0 0 1"/>
252-
<color name="green" value="0 1 0"/>
253-
<color name="yellow" value="1 1 0"/>
254-
<color name="orange" value="1 0.647 0"/>
255-
<color name="gold" value="1 0.843 0"/>
256-
<color name="purple" value="0.627 0.125 0.941"/>
257-
<color name="gray" value="0.745"/>
258250
<color name="brown" value="0.647 0.165 0.165"/>
259-
<color name="navy" value="0 0 0.502"/>
260-
<color name="pink" value="1 0.753 0.796"/>
261-
<color name="seagreen" value="0.18 0.545 0.341"/>
262-
<color name="turquoise" value="0.251 0.878 0.816"/>
263-
<color name="violet" value="0.933 0.51 0.933"/>
264251
<color name="darkblue" value="0 0 0.545"/>
265252
<color name="darkcyan" value="0 0.545 0.545"/>
266253
<color name="darkgray" value="0.663"/>
267254
<color name="darkgreen" value="0 0.392 0"/>
268255
<color name="darkmagenta" value="0.545 0 0.545"/>
269256
<color name="darkorange" value="1 0.549 0"/>
270257
<color name="darkred" value="0.545 0 0"/>
258+
<color name="gold" value="1 0.843 0"/>
259+
<color name="gray" value="0.745"/>
260+
<color name="green" value="0 1 0"/>
271261
<color name="lightblue" value="0.678 0.847 0.902"/>
272262
<color name="lightcyan" value="0.878 1 1"/>
273263
<color name="lightgray" value="0.827"/>
274264
<color name="lightgreen" value="0.565 0.933 0.565"/>
275265
<color name="lightyellow" value="1 1 0.878"/>
276-
<dashstyle name="dotted" value="[1 3] 0"/>
277-
<dashstyle name="dashed" value="[4] 0"/>
278-
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
266+
<color name="navy" value="0 0 0.502"/>
267+
<color name="orange" value="1 0.647 0"/>
268+
<color name="pink" value="1 0.753 0.796"/>
269+
<color name="purple" value="0.627 0.125 0.941"/>
270+
<color name="red" value="1 0 0"/>
271+
<color name="seagreen" value="0.18 0.545 0.341"/>
272+
<color name="turquoise" value="0.251 0.878 0.816"/>
273+
<color name="violet" value="0.933 0.51 0.933"/>
274+
<color name="yellow" value="1 1 0"/>
279275
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
280-
<textsize name="large" value="\large"/>
281-
<textsize name="Large" value="\Large"/>
282-
<textsize name="LARGE" value="\LARGE"/>
283-
<textsize name="huge" value="\huge"/>
284-
<textsize name="Huge" value="\Huge"/>
285-
<textsize name="small" value="\small"/>
286-
<textsize name="footnote" value="\footnotesize"/>
287-
<textsize name="tiny" value="\tiny"/>
288-
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
289-
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
290-
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
291-
<gridsize name="4 pts" value="4"/>
292-
<gridsize name="8 pts (~3 mm)" value="8"/>
293-
<gridsize name="16 pts (~6 mm)" value="16"/>
294-
<gridsize name="32 pts (~12 mm)" value="32"/>
276+
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
277+
<dashstyle name="dashed" value="[4] 0"/>
278+
<dashstyle name="dotted" value="[1 3] 0"/>
295279
<gridsize name="10 pts (~3.5 mm)" value="10"/>
296-
<gridsize name="20 pts (~7 mm)" value="20"/>
297280
<gridsize name="14 pts (~5 mm)" value="14"/>
281+
<gridsize name="16 pts (~6 mm)" value="16"/>
282+
<gridsize name="20 pts (~7 mm)" value="20"/>
298283
<gridsize name="28 pts (~10 mm)" value="28"/>
284+
<gridsize name="32 pts (~12 mm)" value="32"/>
285+
<gridsize name="4 pts" value="4"/>
299286
<gridsize name="56 pts (~20 mm)" value="56"/>
300-
<anglesize name="90 deg" value="90"/>
301-
<anglesize name="60 deg" value="60"/>
302-
<anglesize name="45 deg" value="45"/>
303-
<anglesize name="30 deg" value="30"/>
304-
<anglesize name="22.5 deg" value="22.5"/>
287+
<gridsize name="8 pts (~3 mm)" value="8"/>
305288
<opacity name="10%" value="0.1"/>
306289
<opacity name="30%" value="0.3"/>
307290
<opacity name="50%" value="0.5"/>
308291
<opacity name="75%" value="0.75"/>
292+
<pen name="fat" value="1.2"/>
293+
<pen name="heavier" value="0.8"/>
294+
<pen name="ultrafat" value="2"/>
295+
<symbolsize name="large" value="5"/>
296+
<symbolsize name="small" value="2"/>
297+
<symbolsize name="tiny" value="1.1"/>
298+
<textsize name="Huge" value="\Huge"/>
299+
<textsize name="LARGE" value="\LARGE"/>
300+
<textsize name="Large" value="\Large"/>
301+
<textsize name="footnote" value="\footnotesize"/>
302+
<textsize name="huge" value="\huge"/>
303+
<textsize name="large" value="\large"/>
304+
<textsize name="small" value="\small"/>
305+
<textsize name="tiny" value="\tiny"/>
306+
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
307+
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
308+
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
309309
<tiling name="falling" angle="-60" step="4" width="1"/>
310310
<tiling name="rising" angle="30" step="4" width="1"/>
311311
</ipestyle>
@@ -384,17 +384,8 @@ h
384384
320 672 m
385385
352 672 l
386386
</path>
387-
<path matrix="1 0 0 1 96 0" stroke="black" pen="fat">
388-
352 720 m
389-
352 624 l
390-
416 624 l
391-
416 720 l
392-
h
393-
</path>
394387
<text transformations="translations" pos="480 704" stroke="black" type="label" width="19.649" height="6.918" depth="0" halign="center" valign="center">code</text>
395388
<text transformations="translations" pos="480 688" stroke="black" type="label" width="45.413" height="6.661" depth="1.93" halign="center" valign="center">generation</text>
396-
<text transformations="translations" pos="480 672" stroke="black" type="label" width="40.653" height="6.918" depth="0" halign="center" valign="center">Blocks.hs</text>
397-
<text transformations="translations" pos="480 656" stroke="black" type="label" width="49.592" height="6.926" depth="1.93" halign="center" valign="center">Codegen.hs</text>
398389
<text transformations="translations" pos="480 640" stroke="black" type="label" width="68.439" height="6.23" depth="1.74" halign="center" valign="center" size="small">BinaryFactory.hs</text>
399390
<path matrix="1 0 0 1 0 160" stroke="black" pen="fat">
400391
64 608 m
@@ -416,5 +407,20 @@ h
416407
<text transformations="translations" pos="432 688" stroke="black" type="label" width="29.611" height="6.808" depth="0" halign="center" valign="center">LPVM</text>
417408
<text transformations="translations" pos="384 672" stroke="black" type="label" width="53.688" height="6.926" depth="1.93" halign="center" valign="center">Compilation</text>
418409
<text transformations="translations" pos="384 640" stroke="black" type="label" width="57.064" height="6.815" depth="1.93" halign="center" valign="center">Optimisation</text>
410+
<text transformations="translations" pos="464 672" stroke="black" type="label" width="40.183" height="6.918" depth="0" valign="baseline">LLVM.hs</text>
411+
<path stroke="white">
412+
448 720 m
413+
448 624 l
414+
512 624 l
415+
512 720 l
416+
h
417+
</path>
418+
<path stroke="black" pen="0.4">
419+
448 720 m
420+
448 624 l
421+
512 624 l
422+
512 720 l
423+
h
424+
</path>
419425
</page>
420426
</ipe>

src/Compiler.png

-169 Bytes
Loading

src/LLVM.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import Distribution.TestSuite (TestInstance(name))
4343
-- # Generating LLVM code
4444
--
4545
-- We generate a `.ll` text file directly for each Wybe `.wybe` file, compiling
46-
-- this as necessary to build `.o`, `.bc` or executable files. For each
46+
-- this as necessary to build `.o`, `.bc` `.s`, or executable files. For each
4747
-- generated `.ll` file, we produce the following, in order:
4848
--
4949
-- * **Prologue** — contains an introductory comment and any configuration info

src/README.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ The source files in this directory and their purposes are:
2525
| [AliasAnalysis.hs](#AliasAnalysis) | Alias analysis for a single module |
2626
| [Analysis.hs](#Analysis) | Entry point of all kinds of analysis for a single module |
2727
| [BinaryFactory.hs](#BinaryFactory) | Deriving AST Types to be Binary instances |
28-
| [Blocks.hs](#Blocks) | Transform a clausal form (LPVM) module to LLVM |
2928
| [BodyBuilder.hs](#BodyBuilder) | A monad to build up a procedure Body, with copy propagation |
3029
| [Builder.hs](#Builder) | Handles compilation at the module level. |
31-
| [CConfig.hs](#CConfig) | |
30+
| [CConfig.hs](#CConfig) | Relate C types to Wybe types for foreign interface |
3231
| [Callers.hs](#Callers) | Find all callers for each proc and count static calls per caller |
3332
| [Clause.hs](#Clause) | Convert Wybe code to clausal (LPVM) form |
34-
| [Codegen.hs](#Codegen) | Generate and emit LLVM from basic blocks of a module |
3533
| [Config.hs](#Config) | Configuration for wybe compiler |
3634
| [Emit.hs](#Emit) | Emit LLVM code |
3735
| [Expansion.hs](#Expansion) | Replace certain procedure calls with others |
@@ -69,8 +67,6 @@ The source files in this directory and their purposes are:
6967

7068
## BinaryFactory <a id=BinaryFactory></a>
7169

72-
## Blocks <a id=Blocks></a>
73-
7470
## BodyBuilder <a id=BodyBuilder></a>
7571

7672
## Builder <a id=Builder></a>
@@ -258,8 +254,6 @@ order, we call compileModSCC, which does the following:
258254

259255
## Clause <a id=Clause></a>
260256

261-
## Codegen <a id=Codegen></a>
262-
263257
## Config <a id=Config></a>
264258

265259
## Emit <a id=Emit></a>
@@ -297,27 +291,27 @@ transformed to f(x,y,?t); p(!t,z); f(!x,y,t).
297291
# Generating LLVM code
298292

299293
We generate a `.ll` text file directly for each Wybe `.wybe` file, compiling
300-
this as necessary to build `.o`, `.bc` or executable files. For each
294+
this as necessary to build `.o`, `.bc` `.s`, or executable files. For each
301295
generated `.ll` file, we produce the following, in order:
302296

303297
* **Prologue** — contains an introductory comment and any configuration info
304-
needed for LLVM.
298+
needed for LLVM.
305299

306300
* **Constants** — LLVM definitions of the manifest constants used in this
307-
module; mostly used for strings.
301+
module; mostly used for strings.
308302

309303
* **Global variables** — LLVM declarations of the global variables used to
310-
implement the resources defined in this module.
304+
implement the resources defined in this module.
311305

312-
* **Externs** — Extern declarations for all symbols used, but not defined, in
313-
this module; this includes imported Wybe procedures, C functions, and
314-
global variables.
306+
* **Externs** — Extern declarations for all symbols used, but not defined,
307+
in this module; this includes imported Wybe procedures, C functions, and
308+
global variables.
315309

316310
* **Definitions** — Definitions of the procs of this module.
317311

318312
* **Exports** — Everything needed by the Wybe compiler to compile users of
319-
this module; currently this is represented as a serialisation of the Module
320-
data structure, placed in the LLVM section.
313+
this module; currently this is represented as a serialisation of the
314+
Module data structure, placed in the LLVM section.
321315

322316

323317
## LastCallAnalysis <a id=LastCallAnalysis></a>

src/c_config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ int main() {
2121
char c;
2222
void *p;
2323
printf("-- AUTOMATICALLY GENERATED BY c_config.c\n-- DO NOT EDIT!\n\n");
24+
printf("-- Purpose : Relate C types to Wybe types for foreign interface\n\n");
2425
printf("module CConfig (cTypeRepresentation, cPointerSize) where\n");
2526
printf("\nimport AST (TypeRepresentation(..))\n\n");
2627
printf("cTypeRepresentation :: String -> Maybe TypeRepresentation\n");

0 commit comments

Comments
 (0)