mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
Five gaps in the shape analysis let values escape or change unnoticed: - A store to a named property of an array was dropped, so a value read back from it and leaked did not escape. - Named loads on instances, classes and functions ignored values written under unknown keys. They now read that field once it exists, without creating it for atoms that have none. - JSON.parse never ran its reviver, and JSON.stringify never ran its replacer or the toJSON methods of the values it serializes. The reviver now runs with untracked values, the replacer with every serialized value (the holder as `this`), and toJSON on each value that has one. Their results are serialized in turn. - `new Proxy` and `Proxy.revocable` record a proxy operation on the target, and Reflect.deleteProperty records a delete, so those literals are G. - A tagged template now calls its tag with the strings array (with its `raw` array) and the substitutions, which were not evaluated before.