Skip to content

Commit f706c2f

Browse files
committed
add surfacing ScopeCeiling to open questions
1 parent 39bfefe commit f706c2f

4 files changed

Lines changed: 16 additions & 270 deletions

File tree

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
package-lock=false
2+
ignore-scripts=true
3+
git=false
4+
allow-git=none

refactor.html

Lines changed: 0 additions & 268 deletions
This file was deleted.

slides/2026-05-update.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,25 @@ would depend on the provider of `ScopeCeiling` adding them.
129129

130130
## Open questions
131131

132-
- Is `NewModuleEnvironment` a spec fiction? Can we verify that `ModuleEnvironmentRecord` points to its `OuterEnv` explicitly as opposed to it being looked up by default in the end?
132+
1. Is `NewModuleEnvironment` a spec fiction? Can we verify that `ModuleEnvironmentRecord` points to its `OuterEnv` explicitly as opposed to it being looked up by default in the end?
133133

134134
- This [area in Firefox](https://searchfox.org/firefox-main/source/js/src/builtin/ModuleObject.cpp#1598) seems related and [this line](https://searchfox.org/firefox-main/source/js/src/vm/EnvironmentObject.cpp#408) looks like a match for spec setting `OuterEnv`
135135
- This [line in V8](https://github.com/v8/v8/blob/main/src/heap/factory.cc#L1709) mentions `outer` in the context of `ModuleContext` - might be related
136136

137-
- Depends on an umbrella proposal to have an entrypoint to defining a ScopeCeiling, so likely will be folded into a Compartment proposal or its subset.
137+
---
138138

139+
## Open questions
140+
141+
2. `ScopeCeiling` needs means to be associated with a module.
142+
143+
- We are open to exploring exposing it independently of Compartment, as some of the motivating usec-ases (e.g. DSLs) do not require an importHook to also be present.
144+
- Is `import('specifier', { scope: {} })` an option?
145+
- An entity encapsulating a pair: `ModuleSource`, `ScopeCeiling` and also be acceptable as input whereever ModuleSource is?
146+
- Open to fedback and suggestions.
147+
148+
- Regardless, the Compartment proposal would define a common `ScopeCeiling` for all modules loaded in a `Compartment`
139149

150+
- If we don't find a useful way to surface `ScopeCeiling` on its own, we will fold this proposal into refreshed Compartment proposal.
140151

141152

142153
---

slides/2026-05-update.pdf

4.56 KB
Binary file not shown.

0 commit comments

Comments
 (0)