mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 11:10:25 +02:00
Instruction explosion for struct-ref, struct-set!
* module/language/cps/effects-analysis.scm (&memory-kind-mask): Add &bitmask, for the bitmask in vtables. (annotation->memory-kind): Add 'bitmask case. * module/language/tree-il/compile-cps.scm (ensure-struct-index-in-range): (prepare-struct-scm-access): New helpers. (struct-ref/immediate, struct-set!/immediate): New exploded lowering routines. (struct-ref, struct-set!): New lowering routines that just do a call. (canonicalize): Remove struct-ref hack; lowering procedures will handle it. * module/language/tree-il/cps-primitives.scm (bytevector-length): Define struct-set! as returning a value.
This commit is contained in:
parent
310c34e112
commit
557acdbbba
3 changed files with 131 additions and 13 deletions
|
@ -185,7 +185,10 @@
|
|||
&bytevector
|
||||
|
||||
;; Indicates a dependency on a free variable of a closure.
|
||||
&closure)
|
||||
&closure
|
||||
|
||||
;; Indicates a dependency on a raw bitmask, measured in 32-bit units.
|
||||
&bitmask)
|
||||
|
||||
(define-inlinable (&field kind field)
|
||||
(ash (logior (ash field &memory-kind-bits) kind) &effect-kind-bits))
|
||||
|
@ -344,6 +347,7 @@ the LABELS that are clobbered by the effects of LABEL."
|
|||
('pair &pair)
|
||||
('vector &vector)
|
||||
('bytevector &bytevector)
|
||||
('bitmask &bitmask)
|
||||
('box &box)
|
||||
('closure &closure)
|
||||
('struct &struct)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue