mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
Add intrinsics for module operations
* libguile/intrinsics.c (scm_bootstrap_intrinsics): * libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): * module/system/vm/assembler.scm (resolve-module, lookup): New intrinsics. * module/language/cps/compile-bytecode: Add cases for primcalls corresponding to new intrinsics.
This commit is contained in:
parent
16a996f052
commit
fb344a25d5
4 changed files with 51 additions and 0 deletions
|
@ -175,6 +175,10 @@
|
|||
(($ $primcall 'tail-pointer-ref/immediate (annotation . idx) (obj))
|
||||
(emit-tail-pointer-ref/immediate asm (from-sp dst) (from-sp (slot obj))
|
||||
idx))
|
||||
(($ $primcall 'resolve-module public? (name))
|
||||
(emit-resolve-module asm (from-sp dst) (from-sp (slot name)) public?))
|
||||
(($ $primcall 'lookup #f (mod name))
|
||||
(emit-lookup asm (from-sp dst) (from-sp (slot mod)) (from-sp (slot name))))
|
||||
(($ $primcall 'add/immediate y (x))
|
||||
(emit-add/immediate asm (from-sp dst) (from-sp (slot x)) y))
|
||||
(($ $primcall 'sub/immediate y (x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue