Closed littledan closed 8 years ago
I think arguments
is addressed for eval via the arguments
implicit binding added here (in that arguments
is always undefined
). I'm not sure how we should do something similar for new.target
?
This returns undefined
for arguments
or new.target
in a direct eval call, unfortunately.
Ok, I tweaked this PR to set [[NewTarget]]
in the envRec
over here: https://github.com/jeffmo/es-class-public-fields/compare/ban_initializer_stuff?expand=1
Will merge in just a second (once everyone's had a chance to skim the new diff)
You don't need to set [[NewTarget]] to undefined; it's already set as that because of the second argument to NewFunctionEnvironment.
Ah. Cool -- will fix
Does this cover the cases of
arguments
ornew.target
in a direct call toeval
in the way we like? Just want to make sure we've considered it.