Revert "object: rename"
This makes things much slower for questionable benefit. A better
version might use a hash table. A better interpreter would use
some form of partial evaluation to optimize the EQ? chain.
This reverts commit 4acea69841
.
This commit is contained in:
parent
4acea69841
commit
625fdfeb39
|
@ -27,7 +27,7 @@
|
||||||
((head '())
|
((head '())
|
||||||
(tail '())
|
(tail '())
|
||||||
(this
|
(this
|
||||||
(object/abstract
|
(object/immutable-attributes
|
||||||
'push!
|
'push!
|
||||||
(lambda (val)
|
(lambda (val)
|
||||||
(set! head (cons val head))
|
(set! head (cons val head))
|
||||||
|
|
14
object.scm
14
object.scm
|
@ -41,7 +41,6 @@
|
||||||
(if (not proc)
|
(if (not proc)
|
||||||
(error 'object 'invalid-op op args)
|
(error 'object 'invalid-op op args)
|
||||||
(apply proc args))))))
|
(apply proc args))))))
|
||||||
|
|
||||||
(lambda (op . args)
|
(lambda (op . args)
|
||||||
(let ((proc (table 'get op)))
|
(let ((proc (table 'get op)))
|
||||||
(if (not proc)
|
(if (not proc)
|
||||||
|
@ -65,14 +64,11 @@
|
||||||
(apply process-args args)))))
|
(apply process-args args)))))
|
||||||
(apply check-args args)))))
|
(apply check-args args)))))
|
||||||
|
|
||||||
(define object-make-abstract!
|
;;; Like OBJECT/ATTRIBUTES, but with SET!, GET, and DELETE! removed.
|
||||||
(lambda (obj)
|
(define object/immutable-attributes
|
||||||
|
(lambda args
|
||||||
|
(let ((obj (apply object/attributes args)))
|
||||||
(obj 'delete! 'set!)
|
(obj 'delete! 'set!)
|
||||||
(obj 'delete! 'get)
|
(obj 'delete! 'get)
|
||||||
(obj 'delete! 'delete!)
|
(obj 'delete! 'delete!)
|
||||||
obj))
|
obj)))
|
||||||
|
|
||||||
;;; Like OBJECT/ATTRIBUTES, but with SET!, GET, and DELETE! removed.
|
|
||||||
(define object/abstract
|
|
||||||
(lambda args
|
|
||||||
(object-make-abstract! (apply object/attributes args))))
|
|
||||||
|
|
Loading…
Reference in New Issue