Come up with a more fleshed out plan for lexically scoped this

NEW
Unassigned

Status

()

Core
JavaScript Engine
3 years ago
3 years ago

People

(Reporter: efaust, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
The current, very hazy plan is:

- reimplement 'this'*
    - as a binding with aliasing and TDZ support
        - change JSOP_SETTHIS to JSOP_INIT(ALIASED)LEXICAL or something very similar
        - test:
            var g;
            class D extends B { constructor() { g = x => super(x); } }
            try { new D } catch (x) {}
            g(0) // should "work", setting 'this', the first call only
    - change computeThis() to be more dynamic (in eval and arrow-function frames)
    - remove JSOP_THIS

This is not a fully flushed out solution, but it's a start.
(Reporter)

Comment 1

3 years ago
h/t sfink
Summary: Come up with a more flushed out plan for lexically scoped this → Come up with a more fleshed out plan for lexically scoped this
You need to log in before you can comment on or make changes to this bug.