Message from JavaScript discussions

October 2018

— Ohh, I had an idea, I wonder what happens if I use arrays with magic number indexes

— 

{
type: "call",
functor: [[Function]]
thisArg: null,
args: []
}

versus
["call", [[Function]], null, []]

— That way it is always known where the data is in memory

— Rather than traversing a graph to find it

— HMMMMM

— Https://www.html5rocks.com/tutorials/speed/static-mem-pools/

— Ayyy

— for (const argName of this.argSlots) - is this always ordered?

— Yes, the order is maintained because that array represents the invocation operator's argument list

— 

// Type 1: Invocation Tokens,
// Wrap userland functors and any operands needed to invoke them.
call: new HzToken("call",
"functor",
"thisArg",
"args"
),

Message permanent page

— So those 3 args under the "call" arg (which is just setting the type of the token) are directly taken from the argument list of set

Message permanent page

— token.set(functor, thisArg, args);