Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 93 lines (73 sloc) 3.638 kB
c8a35b0 @Benabik Use more obvious header formatting
Benabik authored
1 PACT TODO List
2 ==============
8e34f71 @Benabik Organization: TODO
Benabik authored
3
c8a35b0 @Benabik Use more obvious header formatting
Benabik authored
4 Short Term
5 ----------
8e34f71 @Benabik Organization: TODO
Benabik authored
6
3195755 @Benabik Update TODO
Benabik authored
7 * Flesh out design docs where needed <br />
8 Input from HLL authors _very_ welcome!
8e34f71 @Benabik Organization: TODO
Benabik authored
9 * But don't get caught up designing things we aren't implementing
3195755 @Benabik Update TODO
Benabik authored
10 * Decide on some coding standards (package names, etc)
8e34f71 @Benabik Organization: TODO
Benabik authored
11
eb98173 @Benabik TODO: Update for GSoC
Benabik authored
12 The following portions of the project are early code, and are planned to be
13 replaced this summer:
14
15 * `src/packfile/` contains the beginning of a set of classes to handle PBC
16 files in a structured way. It's mostly full of design notes and ideas.
17 * `src/disasm.winxed` contains the beginnings of a PBC -> PACT disassembler.
18
19 Summer of Code 2012
20 -------------------
21
22 Writing the lowest levels of PACT is a GSoC 2012 project by benabik. Here's a
23 short list of what will be done:
e86ad44 @Benabik Add disasm to TODO
Benabik authored
24
eb98173 @Benabik TODO: Update for GSoC
Benabik authored
25 * Build framework: Makefile, test harness, etc.
26 * Classes for the lowest layer of PACT (Packfile).
27 * Disassembler for those classes (based on `src/disasm.winxed`)
28 * Design a low-level assembly language
29 * Implement that language
e86ad44 @Benabik Add disasm to TODO
Benabik authored
30
eb98173 @Benabik TODO: Update for GSoC
Benabik authored
31 This roughly corresponds to the first three points on the long-term plan.
262c35d @Benabik Update TODO with recent news
Benabik authored
32
c8a35b0 @Benabik Use more obvious header formatting
Benabik authored
33 Long Term
34 ---------
8e34f71 @Benabik Organization: TODO
Benabik authored
35
36 One of the main motivations of PACT is generating bytecode. Instead of
37 starting at the top and trying to ensure we keep everything we'll need
38 around, starting from the bytecode and working our way up seems far more
39 useful. The implementation plan looks a little like this:
40
41 * Build a set of classes that mirror packfile layout.
509afea @Benabik Typo/whitespace fixes
Benabik authored
42 * Populated with PACT classes like Sub, Op, etc instead of
43 PackfileConstantTable, etc
8e34f71 @Benabik Organization: TODO
Benabik authored
44 * Make that able to produce bytecode and PIR
45 * Register allocation
46 * Stage structure
ee35404 @Benabik Death to POST, long live CFGs
Benabik authored
47 * Build simple assembly language on top of that
8e34f71 @Benabik Organization: TODO
Benabik authored
48 * assembler and disassembler
ee35404 @Benabik Death to POST, long live CFGs
Benabik authored
49 * Primarily for machine consumption and production
50 * PASM replacement
340008c @Benabik TODO: Add notes about PACT languages
Benabik authored
51 * Add control-flow graph primitives (basic blocks linked by conditionals)
ee35404 @Benabik Death to POST, long live CFGs
Benabik authored
52 * Build complex assembly language on top of that
53 * PIR replacement
54 * More human useful features
55 * Build AST that compiles to CFG
56 * Build simple language on top of that
57 * Example / Squaak replacement
58 * Sanity check
8e34f71 @Benabik Organization: TODO
Benabik authored
59
60 Share as much across layers as possible. (We want only one
61 implementation/type for things like registers, variables, symbol
62 tables, location information, etc.)
63
64 Maintain as much type information as possible. If we start off with an
65 integer constant, remember that all the way down to the bytecode.
66
ee35404 @Benabik Death to POST, long live CFGs
Benabik authored
67 After that, start building top-down. Add features to the AST and see if
68 any additional CFG/bytecode features are needed to support it.
340008c @Benabik TODO: Add notes about PACT languages
Benabik authored
69
c8a35b0 @Benabik Use more obvious header formatting
Benabik authored
70 Languages
71 ---------
340008c @Benabik TODO: Add notes about PACT languages
Benabik authored
72
73 Both as a sanity check and as a kind of textual IR, it would be extremely
74 useful to build extremely simple languages on top of several layers of
75 PACT.
76
77 An assembly-esque language directly on top of our bytecode support classes
78 allows for easy introspection of the output of the compiler. In addition,
79 once a PACT assembly format stabilizes, it would be possible (and likely
80 encouraged) to create a version of the assembler in C to function as a
81 replacement for PIR/IMCC as the de facto standard for bootstrapping.
82
ee35404 @Benabik Death to POST, long live CFGs
Benabik authored
83 An extended assembly language on top of the control flow graphs would be
340008c @Benabik TODO: Add notes about PACT languages
Benabik authored
84 easier for human production and let them use the same standard shortcuts
85 the compiler tends to. Alternatively, this could be a viable target for a
86 system-level language like Winxed.
87
88 A full language that exposes the high level AST as directly as possible is
89 an excellent tool for testing new features and showing an example for new
90 implementers. Ideally there will be many languages at this level, so an
91 official in-core language is less vital but having some language use it as
92 it is being developed will be key to creating a sane API.
Something went wrong with that request. Please try again.