forth/locals-runtime.ss
#lang scheme/base

;; Support for forth-tx.ss

(require
 "../scat.ss"
 "../coma.ss"
 (lib "match.ss"))

(provide
 (all-defined-out))


;; Return all vals as values next to updated state. Makes the 'locals'
;; macro in forth-tx.ss a bit simpler, since we know at compile time
;; how many values will be popped.

(define (state-pop-unquote/locals state nvals tag)
  (let-values
      (((asm vals)
        (state-pop-unquote state nvals tag)))
    (apply values asm vals)))