On 2015/02/20 17:08:55, marja wrote:
I was staring at this change for a long time and I don't understand it. Why
does
it work? Because there's some other code somewhere which says that consts are
not put to the global object?

How does const (or function) resolution across scripts work? Obviously it
works
somehow since consts work :) (But how can we add a paranoid test that we don't
break function resolution across scripts?)

The CONST and LET variable kinds already implement lexical scoping, and lexical
scoping works across script (covered by tests). Otherwise we wouldn't have
shipped that. :)  So this works out of the box -- it would have been rather
alarming if it didn't.

(Currently we also have CONST_LEGACY, which is not lexical, and puts bindings on
the global object instead. That is going to go away eventually.)

https://codereview.chromium.org/932283003/

--
--
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.

Reply via email to