You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2020. It is now read-only.
Part of the discussion was about a communication channel opened by import.meta. It centers on the cached object being reused in a second evaluation of the module as part of Steps3 and 4.f.
However, the module that this object is cached on is not reused another evaluation of the module. GetActiveScriptOrModule() grabs the active module from the execution context. I don't believe there can ever be a second evaluation of the same module that would reuse this execution context.
With that, I don't see import.meta being any different than a module-scoped const declaration at the beginning of the module. Something like:
I'm also confused why any callsite-based mechanism to produce a mutable object is problematic.
In fact, the current semantics of tagged template literal arrays - being cached per callsite and not per realm - seems to suggest that they don't, in fact, need to be frozen.
Before the Tagged Template Literal revision, there was an absolute need to freeze the shared literal. This is because it could be retrieved (with the same identity) from any module at any point:
Part of the discussion was about a communication channel opened by
import.meta
. It centers on the cached object being reused in a second evaluation of the module as part of Steps3
and4.f
.However, the
module
that this object is cached on is not reused another evaluation of the module.GetActiveScriptOrModule()
grabs the active module from the execution context. I don't believe there can ever be a second evaluation of the same module that would reuse this execution context.With that, I don't see
import.meta
being any different than a module-scoped const declaration at the beginning of the module. Something like:I don't think there are any communication channels opened by this proposal.
/cc @erights
The text was updated successfully, but these errors were encountered: