~ chicken-core (chicken-5) 870c28d83f0ae2ca91e7181aee848bc406d5b391
commit 870c28d83f0ae2ca91e7181aee848bc406d5b391 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Wed Sep 8 06:10:01 2010 -0400 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Wed Sep 8 06:10:01 2010 -0400 deprecated lolevel operations for accessing globals diff --git a/lolevel.import.scm b/lolevel.import.scm index 16380043..a61d5ae7 100644 --- a/lolevel.import.scm +++ b/lolevel.import.scm @@ -34,10 +34,10 @@ extend-procedure extended-procedure? free - global-bound? - global-make-unbound! - global-ref - global-set! + global-bound? ;DEPRECATED + global-make-unbound! ;DEPRECATED + global-ref ;DEPRECATED + global-set! ;DEPRECATED locative->object locative-ref locative-set! diff --git a/lolevel.scm b/lolevel.scm index 5e6309e3..a5f20737 100644 --- a/lolevel.scm +++ b/lolevel.scm @@ -625,20 +625,24 @@ EOF new ) ) -;;; Access computed globals: +;;; Access computed globals: +;;DEPRECATED (define (global-ref sym) (##sys#check-symbol sym 'global-ref) (##core#inline "C_retrieve" sym) ) +;;DEPRECATED (define (global-set! sym x) (##sys#check-symbol sym 'global-set!) (##sys#setslot sym 0 x) ) +;;DEPRECATED (define (global-bound? sym) (##sys#check-symbol sym 'global-bound?) (##sys#symbol-has-toplevel-binding? sym) ) +;;DEPRECATED (define (global-make-unbound! sym) (##sys#check-symbol sym 'global-make-unbound!) (##sys#setslot sym 0 (##sys#slot '##sys#arbitrary-unbound-symbol 0)) diff --git a/manual/Unit lolevel b/manual/Unit lolevel index 0d5d6c2d..49cbd051 100644 --- a/manual/Unit lolevel +++ b/manual/Unit lolevel @@ -585,38 +585,6 @@ Returns the number of bytes that would be needed to evict the data object -=== Accessing toplevel variables - - -==== global-bound? - -<procedure>(global-bound? SYMBOL)</procedure> - -Returns {{#t}}, if the global (''toplevel'') variable with the name {{SYMBOL}} -is bound to a value, or {{#f}} otherwise. - - -==== global-ref - -<procedure>(global-ref SYMBOL)</procedure> - -Returns the value of the global variable {{SYMBOL}}. -If no variable under that name is bound, an error is signalled. - -Note that it is not possible to access a toplevel binding with {{global-ref}} or -{{global-set!}} if it has been hidden in compiled code via {{(declare (hide ...))}}, -or if the code has been compiled in {{block}} mode. - - -==== global-set! - -<procedure>(global-set! SYMBOL X)</procedure><br> -<procedure>(set! (global-ref SYMBOL) X)</procedure> - -Sets the global variable named {{SYMBOL}} to the value {{X}}. - - - === Record instance diff --git a/types.db b/types.db index eb71adbd..1200d696 100644 --- a/types.db +++ b/types.db @@ -574,10 +574,10 @@ (extend-procedure (procedure extend-procedure (procedure *) procedure)) (extended-procedure? (procedure extended-procedure? (*) boolean)) (free (procedure free (pointer) *)) -(global-bound? (procedure global-bound? (symbol) boolean)) -(global-make-unbound! (procedure global-make-unbound! (symbol) symbol)) -(global-ref (procedure global-ref (symbol) *)) -(global-set! (procedure global-set! (symbol *) *)) +(global-bound? deprecated) +(global-make-unbound! deprecated) +(global-ref deprecated) +(global-set! deprecated) (invalid-procedure-call-handler (procedure invalid-procedure-call-handler () procedure)) (locative->object (procedure locative->object (locative) *)) (locative-ref (procedure locative-ref (locative) *))Trap