optimization: Scope access is now a Kotlin interface, compiler uses direct slot access also for closures
This commit is contained in:
1 parent
43a6a7aaf4
commit
6220e982a0
14 files changed
+438
-165
No files matched your search
@@ -12,3 +12,9 @@
|
||||
- `void` is a singleton of class `Void` (syntax sugar for return type).
|
||||
- Object members are always allowed even on unknown types; non-Object members require explicit casts. Remove `inspect` from Object and use `toInspectString()` instead.
|
||||
- Do not reintroduce bytecode fallback opcodes (e.g., `GET_NAME`, `EVAL_*`, `CALL_FALLBACK`) or runtime name-resolution fallbacks; all symbol resolution must stay compile-time only.
|
||||
|
||||
## Bytecode frame-first migration plan
|
||||
- Treat frame slots as the only storage for locals/temps by default; avoid pre-creating scope slot mappings for compiled functions.
|
||||
- Create closure references only when a capture is detected; use a direct frame+slot reference (foreign slot ref) instead of scope slots.
|
||||
- Keep Scope as a lazy reflection facade: resolve name -> slot only on demand for Kotlin interop (no eager name mapping on every call).
|
||||
- Avoid PUSH_SCOPE/POP_SCOPE in bytecode for loops/functions unless dynamic name access or Kotlin reflection is requested.
|
||||
Reference in new issue
Block a user