summaryrefslogtreecommitdiffstats
path: root/TODO_DONE
blob: 6e59acf8dd2eaaa4bb2aabf30bbc20806024951b (plain)
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
*************************************************************************
**** TODO ***************************************************************
*************************************************************************

* review the whole interp/execEnv relationship - who's boss?

* improve local var handling in tebc? restrict, etc

* optimize proc setup and teardown - any gains to be had in there?

* mod NRE api - nreProc with the same sig as Tcl_NRPostProc (callbacks)?
  Should be a win on the sibling jumps model: direct jump on 'diving in',
  to complement the indirect jumps on rewinding

* mig-alloc-reform: what can be brought in? At least forget -DPURIFY, make
  it usable from normal builds.

*************************************************************************
**** DONE ***************************************************************
*************************************************************************

* changes to compiler and engine: old .tbc will not run, except with a
  "sufficiently clever" tbcload. The compiler and tbcload will probably
  need some work to adapt to the changes. This branch completely ignores
  these issues.

* tclAssembly.c and related are gone; it was an added burden adapting them
  while modifying the bytecodes and tebc, the decision was taken to remove
  it and do the work again "at the end"

* INCOMPATIBILITY - no more cmdCount
  There is no more [info cmdcount], or cmdCount based interpreter limits

* the compiler was simplified a bit, removing quite a few "premature"
  optimizations; these are now handled by the optimizer. In particular: all
  instructions are issued in the 4-byte variant (so that the optimizer can
  use the extra space), break/continue are not optimized to jumps until
  later, etc.

* there is a new optimizer that produces better bytecodes, especially in
  the handling of logic and exceptions. The optimizer itself is extremely
  suboptimal, the way it works can definitely be improved.

* INCOMPATIBILITY (?) - NRE stack is a real stack
  Tcl_NRAddCallback now OVERWRITES the currently executing callback!! Users
  now have to make sure that they save the received data[] in local vars if
  they plan to use them after pushing a new callback!

* remove [case]

* remove interp->result and all supporting code; remove other deprecated
  apis 

* remove [info frame] and [info errortsack], as well as all supporting
  code. These should be recoded using the data that NRE is
  keeping. Anything additional should ALWAYS choose to recompute on demand
  over precomputing things during normal operation

* NRE mods - reduce trampoline jumps: indirect jumps on rewinding. Replace
  NRRunCallbacks with optimized sibling calls. Tests nre-0.1 and stack-3.1
  should fail if the compiler is not optimizing the indirect calls between
  NRE_callback to jumps.

* INCOMPATIBILITY ... or at least, no attention paid to windows: we are
  just assuming that __thread works (and using it in the memory allocator),
  which is __declspec(thread) on windows, and thread_local in C11.
  This is done by defining HAVE_FAST_TSD in the defaut build; can remove it
  later on for the default - handy while developing. FIXME!!

* mod the callback struct: make it have only 3 data fields, 4 in
  total. This will reduce the size, possible improvements due to cache and 
  memory alignment issues.

* INCOMPATIBILITY ... or at least, no attention paid to windows. We are
  using __atribute__ to insure good cache alignment of NRE_callback, this
  is certainly not portable.