Refactoring�Function Name Inference:
�For "consensus awaiting tests"
Author: André Bargull
Presenter: Daniel Ehrenberg
January 2019 TC39
Class name availability in static fields
class C {� static foo = this.name;�}�print(C.name === "C");�print(C.foo === "");
Problem: Class names and a @frozen decorator
function frozen(desc) {� desc.elements.push({� kind: "hook",� finish: Object.freeze� });�}��@frozen�class B { } // TypeError!
Problem: FNI over decorated fields
const id = desc => desc;
class D {� @id fn = () => {};�}
const d = new D;�d.fn.name // ""
Opportunity: Enumeration order web reality
$ eshost -e "Reflect.ownKeys(class C { static method() { } })"
#### V8
length,prototype,method,name
#### JSC
length,name,prototype,method
#### ChakraCore
prototype,name,method,length
#### SpiderMonkey
prototype,method,length,name
anba's solution: NamedEvaluation
https://github.com/tc39/ecma262/pull/1372
Consensus, awaiting tests?