1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 17:20:29 +02:00

Add allocate-struct, struct-ref, struct-set! instructions

* libguile/vm-engine.c (allocate-struct, struct-ref, struct-set!): New
  instructions, to complement their "immediate" variants.

* module/language/cps/compile-bytecode.scm (compile-fun):
* module/system/vm/assembler.scm (system): Wire up the new instructions.
This commit is contained in:
Andy Wingo 2015-01-19 10:37:34 +01:00
parent 678995ff79
commit 27b3b5b92d
3 changed files with 99 additions and 6 deletions

View file

@ -1,6 +1,6 @@
;;; Guile bytecode assembler
;;; Copyright (C) 2001, 2009, 2010, 2012, 2013, 2014 Free Software Foundation, Inc.
;;; Copyright (C) 2001, 2009, 2010, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
;;;
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
@ -149,6 +149,9 @@
(emit-allocate-struct/immediate* . emit-allocate-struct/immediate)
(emit-struct-ref/immediate* . emit-struct-ref/immediate)
(emit-struct-set!/immediate* . emit-struct-set!/immediate)
(emit-allocate-struct* . emit-allocate-struct)
(emit-struct-ref* . emit-struct-ref)
(emit-struct-set!* . emit-struct-set!)
(emit-class-of* . emit-class-of)
(emit-make-array* . emit-make-array)
(emit-bv-u8-ref* . emit-bv-u8-ref)