mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
goops moving away from evaluator opcodes, and a primitive compilation fix
* module/oop/goops.scm (@slot-ref, @slot-set!): Define "primitives" for these. Probably should do something more general, though, allowing @struct-ref. * module/language/tree-il/primitives.scm (add-interesting-primitive!): Error if the primitive isn't bound.
This commit is contained in:
parent
c58b8c5aed
commit
83c7655002
2 changed files with 6 additions and 1 deletions
|
@ -84,6 +84,10 @@
|
|||
(eval-when (eval load compile)
|
||||
(use-modules ((language tree-il primitives) :select (add-interesting-primitive!)))
|
||||
(add-interesting-primitive! 'class-of)
|
||||
(define (@slot-ref o n)
|
||||
(struct-ref o n))
|
||||
(define (@slot-set! o n v)
|
||||
(struct-set! o n v))
|
||||
(add-interesting-primitive! '@slot-ref)
|
||||
(add-interesting-primitive! '@slot-set!))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue