fixed bug in disasm engine
[k8lst.git] / NOTES
blobc6d3b5b9bd521fb16abe1e3149799fefdde84037
1 all classes with class variables should be created in image builder, so
2 we can allocate space for class variables.
5 binary message '/' always returns integers. to get float result one
6 should do something like (3 asFloat / 5).
9 LST has funny special form of inline array:
10   #{ + / * }
11 this array will be treated as list of symbols separated by spaces.
14 for primitive handlers:
15 remember, that any allocation except lstNewInt() can trigger GC
16 and invalidate all non-static object pointers (except arguments).
17 to avoid this you can keep your values in lstRootStack.
18 VM will clear all pushed stack values when primitive handler returns.
19 see lstRootPush() and lstRootPop().
22 this will not work:
23   class: Test | fac | [
24   ^init [
25     fac := [:n :r |
26       'n: ' print. n printNl.
27       n > 1
28         ifTrue: [ r := n * (fac value: n - 1) ]
29         ifFalse: [ r := 1 ].
30       'r: ' print. r printNl.
31       r
32     ].
33     (fac value: 5) printNl.
34   ]
35   ]
36   { Test init }
37 blocks are not real closures, and running block can't be
38 invoked from the same (or another) running block. sorry.
41 remember that inter-group block returns WILL NOT work.
42 such return will probably break the interpreter.
45 doesNotUnderstand message
46 doesNotUnderstand: selector arg: argarray
47 argarray is the full argument array (note that 1st item is 'self')
50 note, that simple getters and setters (and simple 'constant returns')
51 are virtually painless, as they will be inlined by the MyCoolAnalyzer.