Bug 1535804 - Part 7: Parse and process static class fields. r=arai!
Parser:
- Instead of unconditionally throwing an exception for static class fields,
only throw an exception when the static class field is named "prototype" per
the early error restriction for static class fields.
ObjectEmitter:
- Split `ClassEmitter::emitBinding` from `ClassEmitter::emitEnd` to install the
static class fields after installing the inner binding, but before the outer
class binding.
BytecodeEmitter:
- `emitInitializeStaticFields` is modelled after `emitInitializeInstanceFields`
except that the this-binding for the initialiser function isn't `dotThis`,
but instead the class constructor (which is dup'ed from the stack).
- To ensure the static class fields keys and initialiser aren't kept alive
indefinitely, `emitInitializeStaticFields` overwrites both arrays with
`undefined` after installing the static class fields.
Differential Revision: https://phabricator.services.mozilla.com/D53640