Allow delay in bytecode
This commit is contained in:
parent
58581d6bf0
commit
5b1a8af4e3
@ -32,6 +32,13 @@ Goal: migrate the compiler so all values live in frames/bytecode, keeping JVM te
|
||||
- [x] Step 9: Module-level bytecode execution.
|
||||
- [x] Compile `Script` bodies to bytecode instead of interpreting at module scope.
|
||||
- [x] Keep import/module slot seeding in frame-only flow.
|
||||
- [ ] Step 10: Bytecode for declaration statements in module scripts.
|
||||
- [ ] Support `ClassDeclStatement`, `FunctionDeclStatement`, `EnumDeclStatement` in bytecode compilation.
|
||||
- [ ] Decide whether to compile declarations into module bytecode or keep a mixed execution path.
|
||||
- [ ] Step 11: Destructuring assignment bytecode.
|
||||
- [ ] Handle `[a, b] = expr` (AssignRef target `ListLiteralRef`) without interpreter fallback.
|
||||
- [ ] Step 12: Optional member assign-ops and inc/dec in bytecode.
|
||||
- [ ] Support `a?.b += 1` and `a?.b++` for `FieldRef` targets.
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@ -1967,11 +1967,9 @@ class Compiler(
|
||||
is LocalSlotRef -> target.name
|
||||
else -> null
|
||||
}
|
||||
if (targetName == "delay") return true
|
||||
containsUnsupportedRef(ref.target) || ref.args.any { containsUnsupportedForBytecode(it.value) }
|
||||
}
|
||||
is MethodCallRef -> {
|
||||
if (ref.name == "delay") return true
|
||||
val receiverClass = resolveReceiverClassForMember(ref.receiver) ?: return true
|
||||
val hasMember = receiverClass.instanceMethodIdMap(includeAbstract = true)[ref.name] != null
|
||||
if (!hasMember && !hasExtensionFor(receiverClass.className, ref.name)) return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user