Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function.name #1348

Open
gfwilliams opened this issue Feb 20, 2018 · 0 comments
Open

Function.name #1348

gfwilliams opened this issue Feb 20, 2018 · 0 comments

Comments

@gfwilliams
Copy link
Member

> function Bob() {
... }
undefined
> Bob.name
'Bob'

Also:

> String.name
'String'
> "Hello".name
undefined
> "Hello".__proto__.constructor.name
'String'

Problem is it's unlikely we want to use up space to store a name for every function, so we could look it up in the hard-coded symbol table for built-in stuff, and actually do a search of all JsVars to find one that names the given function. It's not ideal, but would be better than nothing.

This is probably one for #1288 and the real_prototype_chain branch though, since those would make symbol table lookups much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant