forked from defunkt/ReefVM
no continue
This commit is contained in:
parent
0e387fcfe1
commit
c0ef5f55eb
3
SPEC.md
3
SPEC.md
|
|
@ -100,7 +100,6 @@ type CallFrame = {
|
|||
returnAddress: number // Where to resume after RETURN
|
||||
returnScope: Scope // Scope to restore after RETURN
|
||||
isBreakTarget: boolean // Can be targeted by BREAK
|
||||
continueAddress?: number // Where to jump for CONTINUE
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -602,7 +601,7 @@ All of these should throw errors:
|
|||
### Break/Continue Semantics
|
||||
- BREAK unwinds to frame that called the iterator function
|
||||
- Multiple nested function calls: break exits all of them until reaching marked frame
|
||||
- CONTINUE requires explicit continueAddress in frame (set by compiler for loops)
|
||||
- CONTINUE is implemented by the compiler using JUMPs
|
||||
|
||||
### Exception Unwinding
|
||||
- THROW unwinds call stack to handler's depth, not just to handler
|
||||
|
|
|
|||
|
|
@ -4,5 +4,4 @@ export type Frame = {
|
|||
returnAddress: number
|
||||
returnScope: Scope
|
||||
isBreakTarget: boolean
|
||||
continueAddress?: number
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user