Context
apps/trace-service/src/server/operations.ts is a single registry: adding an operation is one entry plus its clauses in ecma-spec.html. It currently covers 9 unary conversions (ToNumber, ToNumeric, ToString, ToBoolean, ToPrimitive, ToObject, ToPropertyKey, ToLength, ToIndex) and 3 binary algorithms (IsLooselyEqual, IsStrictlyEqual, AbstractRelationalComparison).
That leaves out most of the operators people actually find confusing.
Proposal
Add, in rough order of payoff:
ApplyStringOrNumericBinaryOperator — + - * / % **, the operator behind [] + {}.
instanceof — InstanceofOperator, OrdinaryHasInstance.
in — HasProperty.
- Iterator protocol:
GetIterator, IteratorStep, IteratorValue — powers destructuring and spread.
- BigInt mixing rules and the TypeError branches.
- Template literals /
ToString on objects with custom Symbol.toPrimitive.
Each entry needs its algos list, its clauses in ecma-spec.html, and a spec URL. Where the engine262 fork needs new instrumentation, that lands in the submodule branch first.
Acceptance criteria
- Each new operation appears in
GET /functions and traces end to end through the worker sandbox.
- The spec panel highlights a real clause for every step the trace emits — no step without a matching anchor.
- Presets and hint text on the relevant page mention the new operators.
Status
ApplyStringOrNumericBinaryOperator is in flight in the working tree and not merged. Remaining work on that first operator: commit the engine262 instrumentation to the fork branch and bump the gitlink, fix operator-splitting for left-associative chains, cover the BigInt branch with a spec clause, and update the hint text and presets on /equality.
Context
apps/trace-service/src/server/operations.tsis a single registry: adding an operation is one entry plus its clauses inecma-spec.html. It currently covers 9 unary conversions (ToNumber, ToNumeric, ToString, ToBoolean, ToPrimitive, ToObject, ToPropertyKey, ToLength, ToIndex) and 3 binary algorithms (IsLooselyEqual, IsStrictlyEqual, AbstractRelationalComparison).That leaves out most of the operators people actually find confusing.
Proposal
Add, in rough order of payoff:
ApplyStringOrNumericBinaryOperator—+ - * / % **, the operator behind[] + {}.instanceof—InstanceofOperator,OrdinaryHasInstance.in—HasProperty.GetIterator,IteratorStep,IteratorValue— powers destructuring and spread.ToStringon objects with customSymbol.toPrimitive.Each entry needs its
algoslist, its clauses inecma-spec.html, and a spec URL. Where the engine262 fork needs new instrumentation, that lands in the submodule branch first.Acceptance criteria
GET /functionsand traces end to end through the worker sandbox.Status
ApplyStringOrNumericBinaryOperatoris in flight in the working tree and not merged. Remaining work on that first operator: commit the engine262 instrumentation to the fork branch and bump the gitlink, fix operator-splitting for left-associative chains, cover the BigInt branch with a spec clause, and update the hint text and presets on/equality.