mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
cache-current-module, etc use immediate primcall parameters
* module/language/bytecode.scm (*macro-instruction-arities*): * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/effects-analysis.scm (current-module): * module/language/cps/primitives.scm (*macro-instruction-arities*): * module/language/cps/prune-top-level-scopes.scm (compute-used-scopes): (prune-top-level-scopes): * module/language/cps/reify-primitives.scm (module-box): * module/language/cps/slot-allocation.scm (compute-needs-slot): * module/language/tree-il/compile-cps.scm (toplevel-box): (module-box, capture-toplevel-scope): Move the primcalls that deal with top-level references to use immediate parameters.
This commit is contained in:
parent
c54c151eb6
commit
4fb538e90e
8 changed files with 48 additions and 72 deletions
|
@ -143,19 +143,14 @@
|
|||
(emit-current-module asm (from-sp dst)))
|
||||
(($ $primcall 'current-thread)
|
||||
(emit-current-thread asm (from-sp dst)))
|
||||
(($ $primcall 'cached-toplevel-box #f (scope name bound?))
|
||||
(emit-cached-toplevel-box asm (from-sp dst)
|
||||
(constant scope) (constant name)
|
||||
(constant bound?)))
|
||||
(($ $primcall 'cached-module-box #f (mod name public? bound?))
|
||||
(emit-cached-module-box asm (from-sp dst)
|
||||
(constant mod) (constant name)
|
||||
(constant public?) (constant bound?)))
|
||||
(($ $primcall 'cached-toplevel-box (scope name bound?))
|
||||
(emit-cached-toplevel-box asm (from-sp dst) scope name bound?))
|
||||
(($ $primcall 'cached-module-box (mod name public? bound?) ())
|
||||
(emit-cached-module-box asm (from-sp dst) mod name public? bound?))
|
||||
(($ $primcall 'define! #f (sym))
|
||||
(emit-define! asm (from-sp dst) (from-sp (slot sym))))
|
||||
(($ $primcall 'resolve #f (name bound?))
|
||||
(emit-resolve asm (from-sp dst) (constant bound?)
|
||||
(from-sp (slot name))))
|
||||
(($ $primcall 'resolve (bound?) (name))
|
||||
(emit-resolve asm (from-sp dst) bound? (from-sp (slot name))))
|
||||
(($ $primcall 'free-ref #f (closure idx))
|
||||
(emit-free-ref asm (from-sp dst) (from-sp (slot closure))
|
||||
(constant idx)))
|
||||
|
@ -305,8 +300,8 @@
|
|||
(lookup-parallel-moves handler allocation))
|
||||
(emit-reset-frame asm frame-size)
|
||||
(emit-j asm (forward-label khandler-body))))))
|
||||
(($ $primcall 'cache-current-module! #f (sym scope))
|
||||
(emit-cache-current-module! asm (from-sp (slot sym)) (constant scope)))
|
||||
(($ $primcall 'cache-current-module! (scope) (mod))
|
||||
(emit-cache-current-module! asm (from-sp (slot mod)) scope))
|
||||
(($ $primcall 'free-set! #f (closure idx value))
|
||||
(emit-free-set! asm (from-sp (slot closure)) (from-sp (slot value))
|
||||
(constant idx)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue