That does seem to be the case:
(
Interpreter.instVarNames.do { |name, i|
// funny: "{ a }".compile is a function returning a function
// because 'compile' wraps in a function,
// we can just compile the name directly
var func = name.asString.compile;
[i, name, func.def.code].postln;
}; ""
)
[ 0, cmdLine, Int8Array[ 16, -14 ] ]
[ 1, context, Int8Array[ 17, -14 ] ]
[ 2, a, Int8Array[ 18, -14 ] ]
[ 3, b, Int8Array[ 19, -14 ] ]
[ 4, c, Int8Array[ 20, -14 ] ]
[ 5, d, Int8Array[ 21, -14 ] ]
[ 6, e, Int8Array[ 22, -14 ] ]
[ 7, f, Int8Array[ 23, -14 ] ]
[ 8, g, Int8Array[ 24, -14 ] ]
[ 9, h, Int8Array[ 25, -14 ] ]
[ 10, i, Int8Array[ 26, -14 ] ]
[ 11, j, Int8Array[ 27, -14 ] ]
[ 12, k, Int8Array[ 28, -14 ] ]
[ 13, l, Int8Array[ 29, -14 ] ]
[ 14, m, Int8Array[ 30, -14 ] ]
[ 15, n, Int8Array[ 31, -14 ] ]
[ 16, o, Int8Array[ 1, 16, -14 ] ]
[ 17, p, Int8Array[ 1, 17, -14 ] ]
[ 18, q, Int8Array[ 1, 18, -14 ] ]
[ 19, r, Int8Array[ 1, 19, -14 ] ]
[ 20, s, Int8Array[ 1, 20, -14 ] ]
[ 21, t, Int8Array[ 1, 21, -14 ] ]
[ 22, u, Int8Array[ 1, 22, -14 ] ]
[ 23, v, Int8Array[ 1, 23, -14 ] ]
[ 24, w, Int8Array[ 1, 24, -14 ] ]
[ 25, x, Int8Array[ 1, 25, -14 ] ]
[ 26, y, Int8Array[ 1, 26, -14 ] ]
[ 27, z, Int8Array[ 1, 27, -14 ] ]
[ 28, codeDump, Int8Array[ 1, 28, -14 ] ]
[ 29, preProcessor, Int8Array[ 1, 29, -14 ] ]
And the byte codes follow a strict numeric sequence (with overflow at o
).
OK, then – documentation issue – though one could make a case that context
is especially dangerous, and the compiler should probably fail if that keyword is not declared as a variable. (Even cmdLine = 4
won’t break anything, but context = \x
and you’re crashing. It is reasonable to try to prevent accidental crashes.)
Yes, there are several classes marked as “intrinsic” in the C++ sources.
hjh