name
expressions)))))
+(define (raw-indexed-memory-reference index-locative)
+ (lambda (name base-type value-type generator)
+ (lambda (combination expressions finish)
+ (index-locative (car expressions) (cadr expressions)
+ (lambda (locative)
+ (generator locative expressions finish))))))
+
(define (index-locative-generator make-constant-locative
make-variable-locative
header-length-in-units
(unknown-index)))
(unknown-index)))))
\f
-(define object-memory-reference
- (indexed-memory-reference
- (lambda (expression) expression false)
+(define raw-object-memory-reference
+ (raw-indexed-memory-reference
(index-locative-generator rtl:locative-object-offset
rtl:locative-object-index
0
scfg*scfg->scfg!)))
+(define raw-byte-memory-reference
+ (raw-indexed-memory-reference
+ (index-locative-generator rtl:locative-byte-offset
+ rtl:locative-byte-index
+ 0
+ scfg*scfg->scfg!)))
+
(define vector-memory-reference
(indexed-memory-reference
(lambda (expression) (rtl:make-fetch (rtl:locative-offset expression 0)))
(define-open-coder/value 'PRIMITIVE-OBJECT-REF
(simple-open-coder
- (object-memory-reference 'PRIMITIVE-OBJECT-REF false false
+ (raw-object-memory-reference 'PRIMITIVE-OBJECT-REF false false
(lambda (locative expressions finish)
expressions
(finish (rtl:make-fetch locative))))
(define-open-coder/value 'PRIMITIVE-BYTE-REF
(simple-open-coder
- (byte-memory-reference 'PRIMITIVE-BYTE-REF false false
+ (raw-byte-memory-reference 'PRIMITIVE-BYTE-REF false false
(lambda (locative expressions finish)
expressions
(finish (rtl:make-fetch locative))))
(define-open-coder/effect 'PRIMITIVE-OBJECT-SET!
(simple-open-coder
- (object-memory-reference 'PRIMITIVE-OBJECT-SET! false false
+ (raw-object-memory-reference 'PRIMITIVE-OBJECT-SET! false false
(lambda (locative expressions finish)
(finish-vector-assignment locative
(caddr expressions)
(define-open-coder/effect 'PRIMITIVE-BYTE-SET!
(simple-open-coder
- (byte-memory-reference 'PRIMITIVE-BYTE-SET! false false
+ (raw-byte-memory-reference 'PRIMITIVE-BYTE-SET! false false
(lambda (locative expressions finish)
(finish-vector-assignment locative
(caddr expressions)