Java: fix escaping of '/'.
[jackhill/mal.git] / basic / variables.txt
1 Global Unique:
2
3 Z% : boxed memory values
4 Z1 : Z% size
5 Z2 : S$ size
6 Z3 : stack start address (cbm) or X% size (qbasic)
7 Z4 : release stack start address (cbm) or Y% size (qbasic)
8 ZI : start of unused memory (index into Z%)
9 ZK : start of free list (index into Z%)
10 ZT : top of memory after repl env allocations
11
12 S$ : string memory storage
13 S : next free index in S$
14
15 X% : logic/call stack (Z% indexes)
16 X : top element of X% stack
17
18 Y% : pending release stack [index into Z%, eval level]
19 Y : top element of Y% stack
20
21 D : root repl environment
22
23 BT : begin time (TI)
24 ER : error type (-2: none, -1: string, >=0: object)
25 E$ : error string (ER=-1)
26 EZ : READLINE EOF return, READ_FILE EOF temp
27
28 LV : EVAL stack call level/depth
29
30 RI : reader current string position
31 RJ : READ_TOKEN current character index
32
33
34 Calling arguments/temporaries:
35
36 A : common call argument (especially EVAL, EVAL_AST)
37 A$ : common call argument (READLINE, reader, string temp, key value)
38 B : common call argument
39 B$ : STRING arg (HASHMAP_GET temp), PR_STR_SEQ separator
40 : INIT_CORE_SET_FUNCTION, ENV_SET_S, ASSOC1_S
41 C : common call argument, DO_TCO_FUNCTION temp in DO_APPLY
42 E : environment (EVAL, EVAL_AST)
43 F : function
44 H : hash map
45 K : hash map key (Z% index)
46 L : ALLOC* Z%(R,1) default
47 M : ALLOC* Z%(R+1,0) default
48 N : ALLOC* Z%(R+1,1) default
49 R : common return value
50 R$ : common string return value
51 T : type arg, common temp
52 Q : PUSH*, POP*, PEEK* return value (and PEEK_Q_Q call arg)
53
54 AR : APPLY, DO_*_FUNCTION arg list
55 AY : RELEASE/FREE arg
56 AZ : PR_STR arg
57 P1 : PR_MEMORY*, PR_OBJECT, CHECK_FREE_LIST start
58 P2 : PR_MEMORY*, PR_OBJECT, CHECK_FREE_LIST end
59 P3 : PR_OBJECT, PR_MEMORY_VALUE
60 R1 : REP, RE - MAL_READ result temp
61 R2 : REP, RE - EVAL result temp
62 R3 : HASHMAP_GET, DO_HASH_MAP, DO_KEYS_VALS temp and return value
63 R4 : ENV_FIND temp and return value
64 R6 : SLICE return value (last element)
65 SZ : size argument to ALLOC
66 S1$ : REPLACE needle
67 S2$ : REPLACE replacement
68
69
70 Other temporaries:
71
72 A0 : EVAL ast elements
73 A1 : EVAL ast elements, DO_FUNCTION temp
74 A2 : EVAL ast elements, DO_FUNCTION temp
75 A3 : EVAL ast elements
76 B1 : DO_FUNCTION temp
77
78 CZ : DO_CONCAT stack position
79 ED : EQUAL_Q recursion depth counter
80 RD : PR_OBJECT recursion depth
81 SD : READ_STR sequence read recursion depth
82
83 C$ : READ_TOKEN, SKIP_SPACES, SKIP_TO_EOL current character
84 D$ : READ_TOKEN/READ_FILE_CHAR temp
85 G : function value ON GOTO switch flag, EVAL_AST changed flag
86 I : STRING, REPLACE, SLICE, PR_MEMORY, PR_OBJECT, PR_MEMORY_VALUE
87 J : REPLACE, PR_MEMORY_VALUE
88 U : ALLOC, RELEASE, PR_STR temp
89 V : RELEASE, PR_STR_SEQ temp
90 W : SLICE, LAST, QUASIQUOTE, DO_HASH_MAP, DO_KEYS_VALS, step2-3 EVAL temp
91 P : PR_MEMORY_SUMMARY_SMALL
92 RC : RELEASE remaining number of elements to release
93 RF : reader reading from file flag
94 S1 : READ_TOKEN in a string?
95 S2 : READ_TOKEN escaped?
96 T$ : READ_* current token string
97 T1 : EQUAL_Q, PR_STR, DO_KEYS_VALS temp
98 T2 : EQUAL_Q, DO_KEY_VALS, HASH_MAP_GET
99 T3$ : REPLACE temp
100
101
102 Unused:
103
104 O
105
106
107 Counting number of times each variable is assigned:
108 sed 's/:/\n /g' readline.in.bas types.in.bas reader.in.bas printer.in.bas env.in.bas core.in.bas stepA_mal.in.bas | grep "[A-Z][A-Z0-9]*[%$]*=" | sed 's/.*[^A-Z]\([A-Z][A-Z0-9]*[%$]*\)=.*/\1/g' | sort | uniq -c | sort -n
109