Bug 1554524 Comment 21 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Jim Blandy :jimb from comment #20)
> If I had my druthers, the stackless, more expression-like API from comment 13 would be my first choice.

Yeah, looking again this does seem better.  It's easier to specify and read the instrumentation and eliminates a several problems that the debugger needs to check for, like instrumentation that leaves the stack unbalanced.  I just updated the patch to use this strategy to specify the instrumentation.  To keep the grammar simple we distinguish between top level operations and the operands to those operations, so for making a call we end up with, for example:

{
  kind: "expression",
  value: {
    kind: "call",
    callee: { kind: "globalName", name: "callback" },
    this: { kind: "value", value: undefined },
    arguments: [{ kind: "value", value: 42 }],
  },
}
(In reply to Jim Blandy :jimb from comment #20)
> If I had my druthers, the stackless, more expression-like API from comment 13 would be my first choice.

Yeah, looking again this does seem better.  It's easier to specify and read the instrumentation and eliminates a several problems that the debugger needs to check for, like instrumentation that leaves the stack unbalanced.  I just updated the patch to use this strategy to specify the instrumentation.  To keep the grammar simple we distinguish between top level operations and the operands to those operations, so for making a call we end up with, for example:

```
{
  kind: "expression",
  value: {
    kind: "call",
    callee: { kind: "globalName", name: "callback" },
    this: { kind: "value", value: undefined },
    arguments: [{ kind: "value", value: 42 }],
  },
}
```

Back to Bug 1554524 Comment 21