archives

« Bugzilla Issues Index

#4421 — There are several confusing notions of function kind


[[FunctionKind]] can be "normal", "classConstructor", or "generator" (a string)

FunctionAllocate accepts a third optional argument, named kind, which can be one of "normal", "non-constructor" or "generator". (Or absent, which is the same as "normal".) This is also a string.

FunctionInitialize accepts a second mandatory argument, named kind, which can be one of Normal, Method, Arrow. The type of this argument seems to be a spec-level constant instead of a string.

---

This is pretty confusing. It would be best if these concepts could either be collapsed (unlikely) or renamed so that at most one of them is using the word "kind".