port class
This commit is contained in:
parent
dfa2b7b076
commit
2dc468ca66
|
@ -54,12 +54,14 @@
|
||||||
(remix:#%dot vt v))
|
(remix:#%dot vt v))
|
||||||
...
|
...
|
||||||
(remix:def (remix:#%brackets static-interface int)
|
(remix:def (remix:#%brackets static-interface int)
|
||||||
(remix:#%brackets v obj-v)
|
(remix:def (remix:#%brackets static-interface-member v)
|
||||||
|
obj-v)
|
||||||
...
|
...
|
||||||
#:extensions
|
(remix:def
|
||||||
#:methods gen:interface
|
(remix:#%brackets static-interface-extension)
|
||||||
[(define (interface-vtable _) #'int-vtable)
|
#:methods gen:interface
|
||||||
(define (interface-vtable-id _) #'int-vtable-id)]))))]))]))
|
[(define (interface-vtable _) #'int-vtable)
|
||||||
|
(define (interface-vtable-id _) #'int-vtable-id)])))))]))]))
|
||||||
|
|
||||||
(begin-for-syntax
|
(begin-for-syntax
|
||||||
(define-generics class)
|
(define-generics class)
|
||||||
|
@ -128,19 +130,22 @@
|
||||||
(syntax/loc stx
|
(syntax/loc stx
|
||||||
(cls-alloc* (remix:#%app (remix:#%dot rep #:alloc) . args)))]))
|
(cls-alloc* (remix:#%app (remix:#%dot rep #:alloc) . args)))]))
|
||||||
(remix:def (remix:#%brackets static-interface cls-Current)
|
(remix:def (remix:#%brackets static-interface cls-Current)
|
||||||
(remix:#%brackets #:alloc cls-alloc))
|
(remix:def (remix:#%brackets static-interface-member #:alloc)
|
||||||
|
cls-alloc))
|
||||||
(splicing-syntax-parameterize
|
(splicing-syntax-parameterize
|
||||||
([Current (make-rename-transformer #'cls-Current)])
|
([Current (make-rename-transformer #'cls-Current)])
|
||||||
cls-new-def
|
cls-new-def
|
||||||
cls-int-impl-def ...
|
cls-int-impl-def ...
|
||||||
(remix:def (remix:#%brackets static-interface cls-this))
|
(remix:def (remix:#%brackets static-interface cls-this))
|
||||||
(remix:def (remix:#%brackets static-interface cls)
|
(remix:def (remix:#%brackets static-interface cls)
|
||||||
(remix:#%brackets #:new cls-new)
|
(remix:def (remix:#%brackets static-interface-member #:new)
|
||||||
(remix:#%brackets int cls-int-impl)
|
cls-new)
|
||||||
|
(remix:def (remix:#%brackets static-interface-member int)
|
||||||
|
cls-int-impl)
|
||||||
...
|
...
|
||||||
#:extensions
|
(remix:def (remix:#%brackets static-interface-extension)
|
||||||
#:methods gen:class
|
#:methods gen:class
|
||||||
[]))
|
[])))
|
||||||
(define cls-vtables
|
(define cls-vtables
|
||||||
(make-immutable-hasheq
|
(make-immutable-hasheq
|
||||||
(list (cons int-vtable cls-int-impl)
|
(list (cons int-vtable cls-int-impl)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user