\f
(define (bundle? object)
(and (entity? object)
- (bundle-metadata? (entity-extra object))))
-
-(add-boot-init!
- (lambda ()
- (register-predicate! bundle? 'bundle '<= entity?)))
+ (let ((extra (entity-extra object)))
+ (and (vector? extra)
+ (fix:= 2 (vector-length extra))
+ (bundle-interface-tag? (vector-ref extra 0))))))
(define (%make-bundle tag values)
(make-entity (lambda (self operator . args)
(apply (bundle-ref self operator) args))
- (make-bundle-metadata tag values)))
-
-(define-record-type <bundle-metadata>
- (make-bundle-metadata tag values)
- bundle-metadata?
- (tag bundle-metadata-tag)
- (values bundle-metadata-values))
+ (vector tag values)))
-(define (%bundle-tag bundle)
- (bundle-metadata-tag (entity-extra bundle)))
+(define-integrable (%bundle-tag bundle)
+ (vector-ref (entity-extra bundle) 0))
-(define (%bundle-values bundle)
- (bundle-metadata-values (entity-extra bundle)))
+(define-integrable (%bundle-values bundle)
+ (vector-ref (entity-extra bundle) 1))
(define (bundle-interface bundle)
(guarantee bundle? bundle 'bundle-interface)
("gentag" . (runtime tagged-dispatch))
("thread-low" . (RUNTIME THREAD))
("poplat" . (RUNTIME POPULATION))
- ("record" . (RUNTIME RECORD))))
+ ("record" . (RUNTIME RECORD))
+ ("bundle" . (runtime bundle))))
(files2
'(("syntax-items" . (RUNTIME SYNTAX ITEMS))
("syntax-transforms" . (RUNTIME SYNTAX TRANSFORMS))
(package-initialize '(runtime tagged-dispatch) #f #t)
(package-initialize '(RUNTIME POPULATION) #f #t)
(package-initialize '(runtime record) #f #t)
+ (package-initialize '(runtime bundle) #f #t)
(load-files-with-boot-inits files2)
(package-initialize '(RUNTIME 1D-PROPERTY) #f #t) ;First population.
(RUNTIME HASH)
(RUNTIME DYNAMIC)
(RUNTIME REGULAR-SEXPRESSION)
- (RUNTIME BUNDLE)
;; Microcode data structures
(RUNTIME HISTORY)
(RUNTIME SCODE)
(register-predicate! procedure-arity? 'procedure-arity)
(register-predicate! thunk? 'thunk '<= procedure?)
(register-predicate! unary-procedure? 'unary-procedure '<= procedure?)
- (register-predicate! unparser-method? 'unparser-method '<= procedure?)))
+ (register-predicate! unparser-method? 'unparser-method '<= procedure?)
+ (register-predicate! bundle? 'bundle '<= entity?)))
\f
(add-boot-init!
(lambda ()