Commit | Line | Data |
---|---|---|
cc9dbd92 JM |
1 | Global Unique: |
2 | ||
3 | Z% : boxed memory values | |
f9f1cec9 JM |
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) | |
cc9dbd92 JM |
8 | ZI : start of unused memory (index into Z%) |
9 | ZK : start of free list (index into Z%) | |
bbab5c5d | 10 | ZT : top of memory after repl env allocations |
cc9dbd92 JM |
11 | |
12 | S$ : string memory storage | |
bbab5c5d | 13 | S : next free index in S$ |
cc9dbd92 | 14 | |
bbab5c5d JM |
15 | X% : logic/call stack (Z% indexes) |
16 | X : top element of X% stack | |
cc9dbd92 | 17 | |
bbab5c5d JM |
18 | Y% : pending release stack [index into Z%, eval level] |
19 | Y : top element of Y% stack | |
cc9dbd92 | 20 | |
bbab5c5d | 21 | D : root repl environment |
cc9dbd92 | 22 | |
f9f1cec9 | 23 | BT : begin time (TI) |
cc9dbd92 | 24 | ER : error type (-2: none, -1: string, >=0: object) |
c756af81 | 25 | E$ : error string (ER=-1) |
037815e0 | 26 | EZ : READLINE EOF return, READ_FILE EOF temp |
cc9dbd92 JM |
27 | |
28 | LV : EVAL stack call level/depth | |
29 | ||
0e508fa5 JM |
30 | RI : reader current string position |
31 | RJ : READ_TOKEN current character index | |
bbab5c5d JM |
32 | |
33 | ||
cc9dbd92 JM |
34 | Calling arguments/temporaries: |
35 | ||
c756af81 JM |
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 | |
0198b7a2 | 39 | B$ : STRING arg (HASHMAP_GET temp), PR_STR_SEQ separator |
037815e0 | 40 | : INIT_CORE_SET_FUNCTION, ENV_SET_S, ASSOC1_S |
f9f1cec9 | 41 | C : common call argument, DO_TCO_FUNCTION temp in DO_APPLY |
cc9dbd92 JM |
42 | E : environment (EVAL, EVAL_AST) |
43 | F : function | |
44 | H : hash map | |
45 | K : hash map key (Z% index) | |
a742287e JM |
46 | L : ALLOC* Z%(R,1) default |
47 | M : ALLOC* Z%(R+1,0) default | |
48 | N : ALLOC* Z%(R+1,1) default | |
cc9dbd92 | 49 | R : common return value |
c756af81 JM |
50 | R$ : common string return value |
51 | T : type arg, common temp | |
93593012 | 52 | Q : PUSH*, POP*, PEEK* return value (and PEEK_Q_Q call arg) |
cc9dbd92 | 53 | |
f9f1cec9 | 54 | AR : APPLY, DO_*_FUNCTION arg list |
c756af81 JM |
55 | AY : RELEASE/FREE arg |
56 | AZ : PR_STR arg | |
e0bcd3fb JM |
57 | P1 : PR_MEMORY*, PR_OBJECT, CHECK_FREE_LIST start |
58 | P2 : PR_MEMORY*, PR_OBJECT, CHECK_FREE_LIST end | |
d7a6c2d6 | 59 | P3 : PR_OBJECT, PR_MEMORY_VALUE |
f9f1cec9 JM |
60 | R1 : REP, RE - MAL_READ result temp |
61 | R2 : REP, RE - EVAL result temp | |
9d59cdb3 | 62 | R3 : HASHMAP_GET, DO_HASH_MAP, DO_KEYS_VALS temp and return value |
f9f1cec9 JM |
63 | R4 : ENV_FIND temp and return value |
64 | R6 : SLICE return value (last element) | |
cc9dbd92 | 65 | SZ : size argument to ALLOC |
c756af81 JM |
66 | S1$ : REPLACE needle |
67 | S2$ : REPLACE replacement | |
cc9dbd92 | 68 | |
f9f1cec9 | 69 | |
c756af81 | 70 | Other temporaries: |
f9f1cec9 | 71 | |
0e508fa5 | 72 | A0 : EVAL ast elements |
4202ef7b JM |
73 | A1 : EVAL ast elements, DO_FUNCTION temp |
74 | A2 : EVAL ast elements, DO_FUNCTION temp | |
0e508fa5 | 75 | A3 : EVAL ast elements |
4202ef7b | 76 | B1 : DO_FUNCTION temp |
01e8850d | 77 | |
c756af81 | 78 | CZ : DO_CONCAT stack position |
01e8850d JM |
79 | ED : EQUAL_Q recursion depth counter |
80 | RD : PR_OBJECT recursion depth | |
81 | SD : READ_STR sequence read recursion depth | |
82 | ||
4fab6aa5 | 83 | C$ : READ_TOKEN, SKIP_SPACES, SKIP_TO_EOL current character |
e0bcd3fb | 84 | D$ : READ_TOKEN/READ_FILE_CHAR temp |
d7a6c2d6 JM |
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 | |
f9f1cec9 | 88 | U : ALLOC, RELEASE, PR_STR temp |
037815e0 | 89 | V : RELEASE, PR_STR_SEQ temp |
9d59cdb3 | 90 | W : SLICE, LAST, QUASIQUOTE, DO_HASH_MAP, DO_KEYS_VALS, step2-3 EVAL temp |
e0bcd3fb | 91 | P : PR_MEMORY_SUMMARY_SMALL |
f9f1cec9 JM |
92 | RC : RELEASE remaining number of elements to release |
93 | RF : reader reading from file flag | |
0e508fa5 JM |
94 | S1 : READ_TOKEN in a string? |
95 | S2 : READ_TOKEN escaped? | |
96 | T$ : READ_* current token string | |
037815e0 | 97 | T1 : EQUAL_Q, PR_STR, DO_KEYS_VALS temp |
c756af81 | 98 | T2 : EQUAL_Q, DO_KEY_VALS, HASH_MAP_GET |
c756af81 | 99 | T3$ : REPLACE temp |
f9f1cec9 | 100 | |
cc9dbd92 JM |
101 | |
102 | Unused: | |
103 | ||
f9f1cec9 JM |
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 |