about summary refs log tree commit diff stats
path: root/todo
blob: 0dc4736d724639c59d622542c57d1b81a89417bf (plain) (blame)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - 999spaces.cc</title>
<meta name="Generator" content="Vim/7.4">
<meta name="plugin-version" content="vim7.4_v1">
<meta name="syntax" content="cpp">
<meta name="settings" content="use_css,pre_wrap,no_foldcolumn,expand_tabs,prevent_copy=">
<meta name="colorscheme" content="minimal">
<style type="text/css">
<!--
pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
body { font-family: 
span class="mh">#080808; } * { font-size: 1.05em; } .Delimiter { color: #a04060; } .Constant { color: #00a0a0; } .Comment { color: #9090ff; } .SalientComment { color: #00ffff; } --> </style> <script type='text/javascript'> <!-- --> </script> </head> <body> <pre id='vimCodeElement'> <span class="Comment">//: Since different layers all carve out different parts of various namespaces</span> <span class="Comment">//: (recipes, memory, etc.) for their own use, there's no previous place where</span> <span class="Comment">//: we can lay out the big picture of what uses what. So we'll do that here</span> <span class="Comment">//: and just have to manually remember to update it when we move boundaries</span> <span class="Comment">//: around.</span> <span class="Comment">//:</span> <span class="SalientComment">//:: Memory</span> <span class="Comment">//:</span> <span class="Comment">//: Location 0 - unused (since it can help uncover bugs)</span> <span class="Comment">//: Locations 1-899 - reserved for tests</span> <span class="Comment">//: Locations 900-999 - reserved for predefined globals in mu scenarios, like keyboard, screen, etc.</span> <span class="Delimiter">:(before &quot;End Setup&quot;)</span> assert<span class="Delimiter">(</span>Max_variables_in_scenarios == <span class="Constant">900</span><span class="Delimiter">);</span> <span class="Comment">//: Locations 1000 ('Reserved_for_tests') onward - available to the allocator in chunks of size Initial_memory_per_routine.</span> assert<span class="Delimiter">(</span>Reserved_for_tests == <span class="Constant">1000</span><span class="Delimiter">);</span> <span class="SalientComment">//:: Recipes</span> <span class="Comment">//:</span> <span class="Comment">//: 0 - unused (IDLE; do nothing)</span> <span class="Comment">//: 1-199 - primitives</span> assert<span class="Delimiter">(</span>MAX_PRIMITIVE_RECIPES &lt; <span class="Constant">200</span><span class="Delimiter">);</span> <span class="Comment">//: 200-999 - defined in .mu files as sequences of primitives</span> assert<span class="Delimiter">(</span>Next_recipe_ordinal == <span class="Constant">1000</span><span class="Delimiter">);</span> <span class="Comment">//: 1000 onwards - reserved for tests, cleared between tests</span> <span class="SalientComment">//:: Depths for tracing</span> <span class="Comment">//:</span> <span class="Comment">//: 0 - unused</span> <span class="Comment">//: 1-99 - app-level trace statements in mu</span> <span class="Comment">//: 100 - schedule</span> assert<span class="Delimiter">(</span>Scheduling_depth == <span class="Constant">100</span><span class="Delimiter">);</span> <span class="Comment">//: 101-9998 - call-stack statements (mostly label run)</span> assert<span class="Delimiter">(</span>Initial_callstack_depth == <span class="Constant">101</span><span class="Delimiter">);</span> assert<span class="Delimiter">(</span>Max_callstack_depth == <span class="Constant">9998</span><span class="Delimiter">);</span> <span class="Comment">//: 9999 - intra-instruction lines (mostly label mem)</span> assert<span class="Delimiter">(</span>Primitive_recipe_depth == <span class="Constant">9999</span><span class="Delimiter">);</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->