-
Notifications
You must be signed in to change notification settings - Fork 2
/
todo
103 lines (95 loc) · 5.42 KB
/
todo
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
Before M0 is considered "final", the following need to happen:
TODO:
* make M0 more closely match how real-world CPUs work to minimize the mistmatch when generating code
- lots of instructions is fine
- requiring a jit or optimizer isn't
- a bunch of control flow variants would be a good starting point
* think about how type information needs to flow from HLLs to M0
* add goto_unless (opposite of goto_if)
* add bitwise NOT
* move spilling discussion closer to description of registers
- in general, the pdd needs a reorg
* update prototype with recent spec changes
- out-of-range conversions I/N
- conversion semantics (drop fractional part)
- variable register sizes (SP == void*, I = platform word, N = 8B)
* update semantics of get_word and set_word. Define how big a word is.
* add chunk tags
- decide if tags should maps to a value or just be present/absent
- e.g. .tag "libmain"
- vs .tag "src_file" "/home/jimbob/src/parrot-quux/m0/string/api.m0"
- or both
* be certain that M0 can provide solid lvalue semantics
- http://trac.parrot.org/parrot/wiki/WhyDoesNQPGenerateInefficientCode
- probably a function of 6model support, so not an M0 issue
* look into stealing Go's concept of arrays, slices and pointers
* there's some good discussion about pointers in M0 on http://irclog.perlgeek.de/parrot/2011-07-04
- distil the relevant bits, decide on something, stick it into the spec
- there was some discussion about a hack to enable registers pointing to
unique values, though I couldn't find it just now
* figure out how much fanciness can be done with registers
- iwbn to have them be space-efficient
- iwbn to enable mapping of N registers to machine-specific registers
- iwbn to somehow map M0 registers to hardware registers in general
- iwbn to enable precise GC, i.e. no stack walking
* support mmapping
- this means that you don't need to mutate from the file at runtime
- this is a characteristic that we need to revisit regularly as the spec solidifies
* complete coverage of the interp and assembler according to Devel::Cover
- an occasional weird error condition can be uncovered, but everything that
reasonably can be covered should be
- this also means we're confident that any implementation that passes all tests is complete
TODO (requires C implementation):
* get some kind of ffi implementation working *and tested* in the Perl interp, if possible
- candidate Perl modules:
- FFI - probably abandoned, can "fix" test failures, doesn't seem to be commonly used
- C::Dynalib - tests fail gloriously, probably abandoned, doesn't seem to be commonly used
- perl-ctypes - test fail gloriously in an infinite loop, doesn't look very usable
- syscall and pack - ???
TODO (requires Mole implementation):
* nail down calling conventions recommendations
- this means that we have working example code for whatever we're recommending
- putting the calling conventions burden on the callee is preferable
- become knowledgeable enough to make sure that the calling conventions
don't make useful optimizations impossible
- polymorphic inline caching, prototypes with multiple dispatch, JIT, others
* figure out exception recommendations
IN PROGRESS:
* write a glossy brochure about M0
- integrate feedback from kid51
* blog about the long-term plan for M0 integration into Parrot
* define the workflow for loading an external m0b library
- library-friendly chunk name constants are implemented and tested
- the op and its semantics need to be defined
* define how string/character manipulation will work
- will have 8-byte header of size and encoding
- what's a good way to deal with individual characters when registers are word-sized?
- currently have get/set x word/byte. not sure if this is optimal but it seems to work ok
- this task is no longer IN PROGRESS when I decide there's nothing better or
something better gets implemented
COMPLETED:
* make it possible to have something like C's function pointers
* re-sync the spec with the latest changes to the p5 prototype
- all ints are now signed
* decide on itoa or afromi ("convert")
* figure out endianness and word size for m0b
* find a better name for deref and/or set_ref (existing names wfm)
* decide whether goto_chunk should be just goto or if it should also update
* CHUNK, BCS, etc (it updates CHUNK, etc. Doing so is sane, not magical.)
* decide whether the M0 interp should install a default exception handler to puke to stderr
* decide if there'll be support for non-uniform-sized call frames
- this drops some optimizations, but it's very likely a Good Idea
- make sure it's not impossible for an implementation to support this while
still complying with the spec
* unTODO m0_poke_caller.t, make it run, make it output TAP
- it runs and has TODO comments for desired TAP output. adding proper TAP
output shouldn't take more than 20 minutes from start to push
* test metadata and annotations (very basic metadata tests are done, annotations
are a use case for metadata)
* add internal string layout to the spec
* carefully define the conversion semantics for convert_*
* replace 'x' with '_' as ignored op argument
- have local stashed commit. not sure if this is actually better. AFAIU _
usually means "default argument", not "ignored", and I don't want to
conflate the concepts.
* explicitly specify that copy_mem can poke into GC'd mem