On 2015/04/27 16:01:39, wingo wrote:
Updated patchset to apply to master. Unfortunately we are now failing
this
test, which oddly is caught only by the mozilla tests:
eval("with({}) this;")
It seems that DYNAMIC "this" lookups inside eval fail, but static ones
succeed.
Indeed in this example the script has no context and thus there is
no "this"
binding in the context chain. It seems actually that "this" is getting
accessed
from the stack in the eval, perhaps via the copy from
ResolvePossiblyDirectEvalCall. I tried forcing context allocation
for "this"
bindings of script code, but that fails to bootstrap; probably there is an
invariant somewhere being violated.
A useful short-term step would be to resolve "this" statically, even
within a
"with", which would lead to loading the copied receiver from the eval
code's
stack. Then we could clean up ResolvePossiblyDirectEvalCall.
I ran into this as I was playing with lexical this a few weeks ago. What
happens
with your cl in this case?
with ({this: 42}) {
print(this);
}
https://codereview.chromium.org/1097283003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.