Gauche:YAGHG:VM:Insn:PRE-CALL
概要
;; PRE-CALL(nargs) <cont> ;; Prepare for a normal call. Push a continuation that resumes ;; execution from <cont>. ;; (define-insn PRE-CALL 1 addr)
関数呼び出しのためのコンティニュエーションフレームを作成する。
- パラメータ
未使用?
- オペランド
復帰時のPC
動作
BEFORE AFTER cont ---->+=========+ +=========+<-------------+ | | | | | | C#0 | | C#0 | | | | | | | env ---->+=========+ env ---->+=========+<--------+ | | | | | | | | E#0 | | E#0 | | | | | | | | | argp ---->+=========+ +=========+<---+ | | | arg#1 | | arg#1 | | | | +---------+ +---------+ | | | : : : : | | | +---------+ +---------+ | | | | arg#N | | arg#N | | | | sp ---->+---------+ cont ---->+=========+ | | | | | prev | --+----+----+----+ | | env | --+----+----+ argp | --+----+ size | N | pc | OPERAND | base | [base] | sp, argp ---->+=========+ | | | |
コード例
(compile-p3 '(begin (boolean? #f) #f)) 0 PRE-CALL(1) 5 2 CONSTF-PUSH 3 GREF-CALL(1) #<identifier user#boolean?>; (boolean? #f) 5 CONSTF-RET