free-id=? propagation through module exports; add 'not-free-identifier=? syntax property to disable free-id=? propagation; add prop:rename-transformer and prop:set-transformer; fix scheme/local so that local syntax bindings are visible to later definitions (v4.1.5.3)
svn: r14191
This commit is contained in:
parent
04e2fb9118
commit
2109cec2f4
|
@ -14,9 +14,7 @@
|
|||
|
||||
@title{@bold{Objective-C} FFI}
|
||||
|
||||
@declare-exporting[ffi/private/objc-doc-unsafe #:use-sources (ffi/objc)]
|
||||
|
||||
@defmodule*/no-declare[(ffi/objc)]{The @schememodname[ffi/objc] library builds on
|
||||
@defmodule[ffi/objc]{The @schememodname[ffi/objc] library builds on
|
||||
@schememodname[scheme/foreign] to support interaction with
|
||||
@link["http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/"]{Objective-C}.}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -7,47 +7,60 @@
|
|||
(define-for-syntax (do-local stx letrec-syntaxes+values-id)
|
||||
(syntax-case stx ()
|
||||
[(_ (defn ...) body1 body ...)
|
||||
(let ([defs (let ([expand-context (generate-expand-context)])
|
||||
(let loop ([defns (syntax->list (syntax (defn ...)))])
|
||||
(apply
|
||||
append
|
||||
(map
|
||||
(lambda (defn)
|
||||
(let ([d (local-expand
|
||||
defn
|
||||
expand-context
|
||||
(kernel-form-identifier-list))]
|
||||
[check-ids (lambda (ids)
|
||||
(for-each
|
||||
(lambda (id)
|
||||
(unless (identifier? id)
|
||||
(raise-syntax-error
|
||||
#f
|
||||
"not an identifier for definition"
|
||||
stx
|
||||
id)))
|
||||
ids))])
|
||||
(syntax-case d (define-values define-syntaxes begin)
|
||||
[(begin defn ...)
|
||||
(loop (syntax->list (syntax (defn ...))))]
|
||||
[(define-values (id ...) body)
|
||||
(begin
|
||||
(check-ids (syntax->list (syntax (id ...))))
|
||||
(list d))]
|
||||
[(define-values . rest)
|
||||
(raise-syntax-error
|
||||
#f "ill-formed definition" stx d)]
|
||||
[(define-syntaxes (id ...) body)
|
||||
(begin
|
||||
(check-ids (syntax->list (syntax (id ...))))
|
||||
(list d))]
|
||||
[(define-syntaxes . rest)
|
||||
(raise-syntax-error
|
||||
#f "ill-formed definition" stx d)]
|
||||
[_else
|
||||
(raise-syntax-error
|
||||
#f "not a definition" stx defn)])))
|
||||
defns))))])
|
||||
(let* ([def-ctx (syntax-local-make-definition-context)]
|
||||
[defs (let ([expand-context (cons (gensym 'intdef)
|
||||
(let ([orig-ctx (syntax-local-context)])
|
||||
(if (pair? orig-ctx)
|
||||
orig-ctx
|
||||
null)))])
|
||||
(let loop ([defns (syntax->list (syntax (defn ...)))])
|
||||
(apply
|
||||
append
|
||||
(map
|
||||
(lambda (defn)
|
||||
(let ([d (local-expand
|
||||
defn
|
||||
expand-context
|
||||
(kernel-form-identifier-list)
|
||||
def-ctx)]
|
||||
[check-ids (lambda (defn ids)
|
||||
(for-each
|
||||
(lambda (id)
|
||||
(unless (identifier? id)
|
||||
(raise-syntax-error
|
||||
#f
|
||||
"not an identifier for definition"
|
||||
defn
|
||||
id)))
|
||||
ids))])
|
||||
(syntax-case d (define-values define-syntaxes begin)
|
||||
[(begin defn ...)
|
||||
(loop (syntax->list (syntax (defn ...))))]
|
||||
[(define-values (id ...) body)
|
||||
(let ([ids (syntax->list (syntax (id ...)))])
|
||||
(check-ids d ids)
|
||||
(syntax-local-bind-syntaxes ids #f def-ctx)
|
||||
(list d))]
|
||||
[(define-values . rest)
|
||||
(raise-syntax-error
|
||||
#f "ill-formed definition" stx d)]
|
||||
[(define-syntaxes (id ...) rhs)
|
||||
(let ([ids (syntax->list (syntax (id ...)))])
|
||||
(check-ids d ids)
|
||||
(with-syntax ([rhs (local-transformer-expand
|
||||
#'rhs
|
||||
'expression
|
||||
null)])
|
||||
(syntax-local-bind-syntaxes ids #'rhs def-ctx)
|
||||
(list (quasisyntax/loc d (define-syntaxes #,ids rhs)))))]
|
||||
[(define-syntaxes . rest)
|
||||
(raise-syntax-error
|
||||
#f "ill-formed definition" stx d)]
|
||||
[_else
|
||||
(raise-syntax-error
|
||||
#f "not a definition" stx defn)])))
|
||||
defns))))])
|
||||
(internal-definition-context-seal def-ctx)
|
||||
(let ([ids (apply append
|
||||
(map
|
||||
(lambda (d)
|
||||
|
@ -73,9 +86,19 @@
|
|||
(raise-syntax-error #f "duplicate identifier" stx dup)))
|
||||
(with-syntax ([sbindings sbindings]
|
||||
[vbindings vbindings]
|
||||
[LSV letrec-syntaxes+values-id])
|
||||
[LSV letrec-syntaxes+values-id]
|
||||
[(body ...)
|
||||
(map (lambda (stx)
|
||||
;; add def-ctx:
|
||||
(let ([q (local-expand #`(quote #,stx)
|
||||
'expression
|
||||
(list #'quote)
|
||||
def-ctx)])
|
||||
(syntax-case q ()
|
||||
[(_ stx) #'stx])))
|
||||
(syntax->list #'(body1 body ...)))])
|
||||
(syntax/loc stx
|
||||
(LSV sbindings vbindings
|
||||
body1 body ...)))))]
|
||||
body ...)))))]
|
||||
[(_ x body1 body ...)
|
||||
(raise-syntax-error #f "not a definition sequence" stx (syntax x))]))
|
||||
|
|
|
@ -21,7 +21,6 @@ Returns @scheme[#t] if @scheme[v] is the result of @scheme[ffi-lib],
|
|||
|
||||
@declare-exporting[scribblings/foreign/unsafe-foreign]
|
||||
|
||||
|
||||
@defproc[(ffi-lib [path (or/c path-string? #f)]
|
||||
[version (or/c string? (listof string?) #f) #f]) any]{
|
||||
|
||||
|
|
|
@ -256,7 +256,9 @@ the module's explicit imports.}
|
|||
Returns two association lists mapping @tech{phase level} values (where
|
||||
@scheme[#f] corresponds to the @tech{label phase level}) to exports at
|
||||
the corresponding phase. The first association list is for exported
|
||||
variables, and the second is for exported syntax.
|
||||
variables, and the second is for exported syntax. Beware however, that
|
||||
value bindings re-exported though a @tech{rename transformer} are in
|
||||
the syntax list instead of the value list.
|
||||
|
||||
Each associated list, which is represented by @scheme[list?] in the
|
||||
result contracts above, more precisely matches the contract
|
||||
|
|
|
@ -16,15 +16,22 @@ expander, otherwise the @exnraise[exn:fail:contract].})
|
|||
|
||||
@title[#:tag "stxtrans"]{Syntax Transformers}
|
||||
|
||||
@defproc[(set!-transformer? [v any/c]) boolean?]{
|
||||
|
||||
Returns @scheme[#t] if @scheme[v] is a value created by
|
||||
@scheme[make-set!-transformer] or an instance of a structure type with
|
||||
the @scheme[prop:set!-transformer] property, @scheme[#f] otherwise.}
|
||||
|
||||
|
||||
@defproc[(make-set!-transformer [proc (syntax? . -> . syntax?)])
|
||||
set!-transformer?]{
|
||||
|
||||
Creates a @tech{syntax transformer} that cooperates with
|
||||
Creates an @tech{assignment transformer} that cooperates with
|
||||
@scheme[set!]. If the result of @scheme[make-set!-transformer] is
|
||||
bound to @scheme[identifier] as a @tech{transformer binding}, then
|
||||
@scheme[proc] is applied as a transformer when @scheme[identifier] is
|
||||
bound to @scheme[_id] as a @tech{transformer binding}, then
|
||||
@scheme[proc] is applied as a transformer when @scheme[_id] is
|
||||
used in an expression position, or when it is used as the target of a
|
||||
@scheme[set!] assignment as @scheme[(set! identifier _expr)]. When the
|
||||
@scheme[set!] assignment as @scheme[(set! _id _expr)]. When the
|
||||
identifier appears as a @scheme[set!] target, the entire @scheme[set!]
|
||||
expression is provided to the transformer.
|
||||
|
||||
|
@ -45,17 +52,48 @@ expression is provided to the transformer.
|
|||
]}
|
||||
|
||||
|
||||
@defproc[(set!-transformer? [v any/c]) boolean?]{
|
||||
|
||||
Returns @scheme[#t] if @scheme[v] is a value created by
|
||||
@scheme[make-set!-transformer], @scheme[#f] otherwise.}
|
||||
|
||||
|
||||
@defproc[(set!-transformer-procedure [transformer set!-transformer?])
|
||||
(syntax? . -> . syntax?)]{
|
||||
|
||||
Returns the procedure that was passed to
|
||||
@scheme[make-set!-transformer] to create @scheme[transformer].}
|
||||
@scheme[make-set!-transformer] to create @scheme[transformer] or that
|
||||
is identified by the @scheme[prop:set!-transformer] property of
|
||||
@scheme[transformer].}
|
||||
|
||||
|
||||
@defthing[prop:set!-transformer struct-type-property?]{
|
||||
|
||||
A @tech{structure type property} to indentify structure types that act
|
||||
as @tech{assignment transformers} like the ones created by
|
||||
@scheme[make-set!-transformer].
|
||||
|
||||
The property value must be an exact integer or procedure of one
|
||||
argument. In the former case, the integer designates a field within
|
||||
the structure that should contain a procedure; the integer must be
|
||||
between @scheme[0] (inclusive) and the number of non-automatic fields
|
||||
in the structure type (exclusive, not counting supertype fields), and
|
||||
the designated field must also be specified as immutable.
|
||||
|
||||
If the property value is an procedure, then the procedure serves as a
|
||||
@tech{syntax transformer} and for @scheme[set!] transformations. If
|
||||
the property value is an integer, the target identifier is extracted
|
||||
from the structure instance; if the field value is not a procedure of
|
||||
one argument, then a procedure that always calls
|
||||
@scheme[raise-syntax-error] is used, instead.
|
||||
|
||||
If a value has both the @scheme[prop:set!-transformer] and
|
||||
@scheme[prop:rename-transformer] properties, then the latter takes
|
||||
precedence. If a structure type has the @scheme[prop:set!-transformer]
|
||||
and @scheme[prop:procedure] properties, then the former takes
|
||||
precedence for the purposes of macro expansion.}
|
||||
|
||||
|
||||
@defproc[(rename-transformer? [v any/c]) boolean?]{
|
||||
|
||||
Returns @scheme[#t] if @scheme[v] is a value created by
|
||||
@scheme[make-rename-transformer] or an instance of a structure type
|
||||
with the @scheme[prop:rename-transformer] property, @scheme[#f]
|
||||
otherwise.}
|
||||
|
||||
|
||||
@defproc[(make-rename-transformer [id-stx syntax?]
|
||||
|
@ -64,28 +102,49 @@ Returns the procedure that was passed to
|
|||
rename-transformer?]{
|
||||
|
||||
Creates a @tech{rename transformer} that, when used as a
|
||||
@tech{transformer binding}, acts as a transformer that insert the
|
||||
@tech{transformer binding}, acts as a transformer that inserts the
|
||||
identifier @scheme[id-stx] in place of whatever identifier binds the
|
||||
transformer, including in non-application positions, in @scheme[set!]
|
||||
expressions. Such a transformer could be written manually, but the one
|
||||
created by @scheme[make-rename-transformer] also causes the parser to
|
||||
install a @scheme[free-identifier=?] and @scheme[identifier-binding]
|
||||
equivalence, and it cooperates specially with
|
||||
expressions.
|
||||
|
||||
Such a transformer could be written manually, but the one created by
|
||||
@scheme[make-rename-transformer] also causes the parser to install a
|
||||
@scheme[free-identifier=?] and @scheme[identifier-binding]
|
||||
equivalence, as long as @scheme[id-stx] does not have a true value for the
|
||||
@indexed-scheme['not-free-identifier=?] @tech{syntax property}.
|
||||
In addition, the rename transformer cooperates specially with
|
||||
@scheme[syntax-local-value] and
|
||||
@scheme[syntax-local-make-delta-introducer].}
|
||||
|
||||
|
||||
@defproc[(rename-transformer? [v any/c]) boolean?]{
|
||||
|
||||
Returns @scheme[#t] if @scheme[v] is a value created by
|
||||
@scheme[make-rename-transformer], @scheme[#f] otherwise.}
|
||||
|
||||
|
||||
@defproc[(rename-transformer-target [transformer rename-transformer?])
|
||||
syntax?]{
|
||||
identifier?]{
|
||||
|
||||
Returns the identifier passed to @scheme[make-rename-transformer] to
|
||||
create @scheme[transformer].}
|
||||
create @scheme[transformer] or as indicated by a
|
||||
@scheme[prop:rename-transformer] property on @scheme[transformer].}
|
||||
|
||||
|
||||
@defthing[prop:rename-transformer struct-type-property?]{
|
||||
|
||||
A @tech{structure type property} to indentify structure types that act
|
||||
as @tech{rename transformers} like the ones created by
|
||||
@scheme[make-rename-transformer].
|
||||
|
||||
The property value must be an exact integer or an identifier
|
||||
@tech{syntax object}. In the former case, the integer designates a
|
||||
field within the structure that should contain an identifier; the
|
||||
integer must be between @scheme[0] (inclusive) and the number of
|
||||
non-automatic fields in the structure type (exclusive, not counting
|
||||
supertype fields), and the designated field must also be specified as
|
||||
immutable.
|
||||
|
||||
If the property value is an identifier, the identifier serves as the
|
||||
target for renaming, just like the first argument to
|
||||
@scheme[make-rename-transformer]. If the property value is an integer,
|
||||
the target identifier is extracted from the structure instance; if the
|
||||
field value is not an identifier, then an identifier @schemeidfont{?}
|
||||
with an empty context is used, instead.}
|
||||
|
||||
|
||||
@defproc[(local-expand [stx syntax?]
|
||||
|
@ -309,6 +368,28 @@ being expanded for the body of a module, then resolving
|
|||
@transform-time[]}
|
||||
|
||||
|
||||
@defproc[(syntax-local-value/immediate [id-stx syntax?]
|
||||
[failure-thunk (or/c (-> any) #f)
|
||||
#f]
|
||||
[intdef-ctx (or/c internal-definition-context?
|
||||
#f)
|
||||
#f])
|
||||
any]{
|
||||
|
||||
Like @scheme[syntax-local-value], but the result is normally two
|
||||
values. If @scheme[id-stx] is bound to a @tech{rename transformer},
|
||||
the results are the rename transformer and the identifier in the
|
||||
transformer augmented with certificates from @scheme[id-stx]. If
|
||||
@scheme[id-stx] is not bound to a @tech{rename transformer}, then the
|
||||
results are the value that @scheme[syntax-local-value] would produce
|
||||
and @scheme[#f].
|
||||
|
||||
If @scheme[id-stx] has no transformer biding, then
|
||||
@scheme[failure-thunk] is called (and it can return any number of
|
||||
values), or an exception is raised if @scheme[failure-thunk] is
|
||||
@scheme[#f].}
|
||||
|
||||
|
||||
@defproc[(syntax-local-lift-expression [stx syntax?])
|
||||
identifier?]{
|
||||
|
||||
|
|
|
@ -531,23 +531,27 @@ is the one left with a mark, and the reference @scheme[x] has no mark,
|
|||
so the binding @scheme[x] is not @scheme[bound-identifier=?] to the
|
||||
body @scheme[x].
|
||||
|
||||
The @scheme[set!] form and the @scheme[make-set!-transformer]
|
||||
procedure work together to support @deftech{assignment transformers}
|
||||
that transformer @scheme[set!] expression. @tech{Assignment
|
||||
transformers} are applied by @scheme[set!] in the same way as a normal
|
||||
The @scheme[set!] form works with the @scheme[make-set!-transformer]
|
||||
and @scheme[prop:set!-transformer] property to support
|
||||
@deftech{assignment transformers} that transform @scheme[set!]
|
||||
expressions. An @tech{assignment transformer} contains a procedure
|
||||
that is applied by @scheme[set!] in the same way as a normal
|
||||
transformer by the expander.
|
||||
|
||||
The @scheme[make-rename-transformer] procedure creates a value that is
|
||||
also handled specially by the expander and by @scheme[set!] as a
|
||||
The @scheme[make-rename-transformer] procedure or
|
||||
@scheme[prop:rename-transformer] property creates a value that is also
|
||||
handled specially by the expander and by @scheme[set!] as a
|
||||
transformer binding's value. When @scheme[_id] is bound to a
|
||||
@deftech{rename transformer} produced by
|
||||
@scheme[make-rename-transformer], it is replaced with the identifier
|
||||
passed to @scheme[make-rename-transformer]. In addition, the lexical
|
||||
information that contains the binding of @scheme[_id] is also enriched
|
||||
so that @scheme[_id] is @scheme[free-identifier=?] to the identifier
|
||||
passed to @scheme[make-rename-transformer], and
|
||||
@scheme[make-rename-transformer], it is replaced with the target
|
||||
identifier passed to @scheme[make-rename-transformer]. In addition, as
|
||||
long as the target identifier does not have a true value for the
|
||||
@scheme['not-free-identifier=?] @tech{syntax property}, the lexical information that
|
||||
contains the binding of @scheme[_id] is also enriched so that
|
||||
@scheme[_id] is @scheme[free-identifier=?] to the target identifier,
|
||||
@scheme[identifier-binding] returns the same results for both
|
||||
identifiers. Finally, the binding is treated specially by
|
||||
identifiers, and @scheme[provide] exports @scheme[_id] as the target
|
||||
identifier. Finally, the binding is treated specially by
|
||||
@scheme[syntax-local-value], and
|
||||
@scheme[syntax-local-make-delta-introducer] as used by @tech{syntax
|
||||
transformer}s.
|
||||
|
|
|
@ -702,7 +702,13 @@ follows.
|
|||
(define foo 2))
|
||||
(require 'test)
|
||||
foo
|
||||
]}
|
||||
]
|
||||
|
||||
If @scheme[id] has a transformer binding to a @tech{rename
|
||||
transformer}, then the exported binding is the target identifier of
|
||||
the @tech{rename transformer}, instead of @scheme[id], unless the
|
||||
target identifier has a true value for the
|
||||
@scheme['not-free-identifier=?] @tech{syntax property}.}
|
||||
|
||||
@defsubform[(all-defined-out)]{ Exports all identifiers that are
|
||||
defined at @tech{phase level} 0 or @tech{phase level} 1 within the
|
||||
|
@ -2109,14 +2115,19 @@ Equivalent to @scheme[(when (not test-expr) expr ...)].
|
|||
|
||||
@defform[(set! id expr)]{
|
||||
|
||||
If @scheme[id] has a @tech{transformer binding} to an
|
||||
@tech{assignment transformer}, as produced by
|
||||
@scheme[make-set!-transformer], then this form is expanded by calling
|
||||
the assignment transformer with the full expressions. If @scheme[id]
|
||||
has a @tech{transformer binding} to a @tech{rename transformer} as
|
||||
produced by @scheme[make-rename-transformer], then this form is
|
||||
expanded by replacing @scheme[id] with the one provided to
|
||||
@scheme[make-rename-transformer].
|
||||
If @scheme[id] has a @tech{transformer binding} to an @tech{assignment
|
||||
transformer}, as produced by @scheme[make-set!-transformer] or as an
|
||||
instance of a structure type with the @scheme[prop:set!-transformer]
|
||||
property, then this form is expanded by calling the assignment
|
||||
transformer with the full expressions. If @scheme[id] has a
|
||||
@tech{transformer binding} to a @tech{rename transformer} as produced
|
||||
by @scheme[make-rename-transformer] or as an instance of a structure
|
||||
type with the @scheme[prop:rename-transformer] property, then this
|
||||
form is expanded by replacing @scheme[id] with the target identifier
|
||||
(e.g., the one provided to @scheme[make-rename-transformer]). If a
|
||||
transformer binding has both @scheme[prop:set!-transformer] ad
|
||||
@scheme[prop:rename-transformer] properties, the latter takes
|
||||
precedence.
|
||||
|
||||
Otherwise, evaluates @scheme[expr] and installs the result into the
|
||||
location for @scheme[id], which must be bound as a local variable or
|
||||
|
|
|
@ -144,6 +144,32 @@
|
|||
(set! f 7)
|
||||
x)))
|
||||
|
||||
(test 77 'set!-transformer-prop
|
||||
(let ([x 3])
|
||||
(let-syntax ([f (let ()
|
||||
(define-struct s!t (proc)
|
||||
#:property prop:set!-transformer 0)
|
||||
(make-s!t
|
||||
(lambda (stx)
|
||||
(syntax-case stx ()
|
||||
[(_ __ val)
|
||||
#'(set! x val)]))))])
|
||||
(set! f 77)
|
||||
x)))
|
||||
|
||||
(test 777 'set!-transformer-prop2
|
||||
(let ([x 3])
|
||||
(let-syntax ([f (let ()
|
||||
(define-struct s!t ()
|
||||
#:property prop:set!-transformer
|
||||
(lambda (stx)
|
||||
(syntax-case stx ()
|
||||
[(_ __ val)
|
||||
#'(set! x val)])))
|
||||
(make-s!t))])
|
||||
(set! f 777)
|
||||
x)))
|
||||
|
||||
(test 7 'rename-transformer
|
||||
(let ([x 3])
|
||||
(let-syntax ([f (make-rename-transformer #'x)])
|
||||
|
@ -431,6 +457,85 @@
|
|||
(define q 8)
|
||||
(nab h))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(module rename-transformer-tests scheme/base
|
||||
(require (for-syntax scheme/base))
|
||||
|
||||
(define x 12)
|
||||
(define-syntax bar (let ([x 10])
|
||||
(make-rename-transformer #'x)))
|
||||
(define-syntax foo (make-rename-transformer #'x))
|
||||
(list foo
|
||||
(identifier-binding #'foo)
|
||||
(free-identifier=? #'x #'foo))
|
||||
(identifier-binding #'bar)
|
||||
|
||||
(begin-for-syntax
|
||||
(define-struct rt (id)
|
||||
#:property prop:rename-transformer 0
|
||||
#:omit-define-syntaxes))
|
||||
|
||||
(let-syntax ([q (make-rt #'x)])
|
||||
(list q
|
||||
(identifier-binding #'q)
|
||||
(free-identifier=? #'q #'x)))
|
||||
|
||||
(let ([w 11])
|
||||
(letrec-syntax ([q (let ()
|
||||
(define-struct rt ()
|
||||
#:property prop:rename-transformer #'w)
|
||||
(make-rt))])
|
||||
(list q
|
||||
(identifier-binding #'q)
|
||||
(free-identifier=? #'q #'w))))
|
||||
|
||||
(letrec-syntax ([n (make-rename-transformer #'glob)])
|
||||
(list (identifier-binding #'n)
|
||||
(free-identifier=? #'n #'glob)))
|
||||
|
||||
(letrec-syntax ([i (make-rename-transformer #'glob)])
|
||||
(letrec-syntax ([n (make-rename-transformer (syntax-property #'i 'not-free-identifier=? #f))])
|
||||
(list (identifier-binding #'n)
|
||||
(free-identifier=? #'n #'glob)))))
|
||||
|
||||
(let ([accum null])
|
||||
(parameterize ([current-print (lambda (v)
|
||||
(set! accum (cons (let loop ([v v])
|
||||
(cond
|
||||
[(module-path-index? v) 'mpi]
|
||||
[(pair? v) (cons (loop (car v))
|
||||
(loop (cdr v)))]
|
||||
[else v]))
|
||||
accum)))])
|
||||
(dynamic-require ''rename-transformer-tests #f))
|
||||
(test '((#f #t)
|
||||
(#f #t)
|
||||
(11 lexical #t)
|
||||
(12 (mpi x mpi x 0 0 0) #t)
|
||||
lexical
|
||||
(12 (mpi x mpi x 0 0 0) #t))
|
||||
values accum))
|
||||
|
||||
(module rename-transformer-tests:m scheme/base
|
||||
(require (for-syntax scheme/base))
|
||||
(define-syntax x 1)
|
||||
(define-syntax x* (make-rename-transformer #'x))
|
||||
(define-syntax x** (make-rename-transformer (syntax-property #'x 'not-free-identifier=? #t)))
|
||||
(define-syntax (get stx)
|
||||
(syntax-case stx ()
|
||||
[(_ i)
|
||||
#`#,(free-identifier=? #'i #'x)]))
|
||||
(provide get x* x**))
|
||||
|
||||
(module rename-transformer-tests:n scheme
|
||||
(require 'rename-transformer-tests:m)
|
||||
(provide go)
|
||||
(define (go)
|
||||
(list (get x*) (get x**))))
|
||||
|
||||
(test '(#t #f) (dynamic-require ''rename-transformer-tests:n 'go))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
(report-errs)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,50,50,0,0,0,1,0,0,3,0,12,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,51,50,0,0,0,1,0,0,3,0,12,0,
|
||||
17,0,20,0,27,0,40,0,47,0,51,0,58,0,63,0,68,0,72,0,78,
|
||||
0,92,0,106,0,109,0,115,0,119,0,121,0,132,0,134,0,148,0,155,0,
|
||||
177,0,179,0,193,0,253,0,23,1,32,1,41,1,51,1,87,1,126,1,165,
|
||||
|
@ -100,7 +100,7 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 2045);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,50,59,0,0,0,1,0,0,13,0,18,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,51,59,0,0,0,1,0,0,13,0,18,0,
|
||||
35,0,50,0,68,0,84,0,94,0,112,0,132,0,148,0,166,0,197,0,226,
|
||||
0,248,0,6,1,12,1,26,1,31,1,41,1,49,1,77,1,109,1,154,1,
|
||||
199,1,223,1,6,2,8,2,65,2,155,3,196,3,31,5,135,5,239,5,100,
|
||||
|
@ -132,173 +132,173 @@
|
|||
116,101,32,115,116,114,105,110,103,6,36,36,99,97,110,110,111,116,32,97,100,
|
||||
100,32,97,32,115,117,102,102,105,120,32,116,111,32,97,32,114,111,111,116,32,
|
||||
112,97,116,104,58,32,5,0,27,20,14,159,80,158,36,50,250,80,158,39,51,
|
||||
249,22,27,11,80,158,41,50,22,182,12,10,248,22,157,5,23,196,2,28,248,
|
||||
249,22,27,11,80,158,41,50,22,184,12,10,248,22,157,5,23,196,2,28,248,
|
||||
22,154,6,23,194,2,12,87,94,248,22,168,8,23,194,1,248,80,159,37,53,
|
||||
36,195,28,248,22,73,23,195,2,9,27,248,22,66,23,196,2,27,28,248,22,
|
||||
163,13,23,195,2,23,194,1,28,248,22,162,13,23,195,2,249,22,164,13,23,
|
||||
196,1,250,80,158,42,48,248,22,178,13,2,19,11,10,250,80,158,40,48,248,
|
||||
22,178,13,2,19,23,197,1,10,28,23,193,2,249,22,65,248,22,166,13,249,
|
||||
22,164,13,23,198,1,247,22,179,13,27,248,22,67,23,200,1,28,248,22,73,
|
||||
23,194,2,9,27,248,22,66,23,195,2,27,28,248,22,163,13,23,195,2,23,
|
||||
194,1,28,248,22,162,13,23,195,2,249,22,164,13,23,196,1,250,80,158,47,
|
||||
48,248,22,178,13,2,19,11,10,250,80,158,45,48,248,22,178,13,2,19,23,
|
||||
197,1,10,28,23,193,2,249,22,65,248,22,166,13,249,22,164,13,23,198,1,
|
||||
247,22,179,13,248,80,159,45,52,36,248,22,67,23,199,1,87,94,23,193,1,
|
||||
165,13,23,195,2,23,194,1,28,248,22,164,13,23,195,2,249,22,166,13,23,
|
||||
196,1,250,80,158,42,48,248,22,180,13,2,19,11,10,250,80,158,40,48,248,
|
||||
22,180,13,2,19,23,197,1,10,28,23,193,2,249,22,65,248,22,168,13,249,
|
||||
22,166,13,23,198,1,247,22,181,13,27,248,22,67,23,200,1,28,248,22,73,
|
||||
23,194,2,9,27,248,22,66,23,195,2,27,28,248,22,165,13,23,195,2,23,
|
||||
194,1,28,248,22,164,13,23,195,2,249,22,166,13,23,196,1,250,80,158,47,
|
||||
48,248,22,180,13,2,19,11,10,250,80,158,45,48,248,22,180,13,2,19,23,
|
||||
197,1,10,28,23,193,2,249,22,65,248,22,168,13,249,22,166,13,23,198,1,
|
||||
247,22,181,13,248,80,159,45,52,36,248,22,67,23,199,1,87,94,23,193,1,
|
||||
248,80,159,43,52,36,248,22,67,23,197,1,87,94,23,193,1,27,248,22,67,
|
||||
23,198,1,28,248,22,73,23,194,2,9,27,248,22,66,23,195,2,27,28,248,
|
||||
22,163,13,23,195,2,23,194,1,28,248,22,162,13,23,195,2,249,22,164,13,
|
||||
23,196,1,250,80,158,45,48,248,22,178,13,2,19,11,10,250,80,158,43,48,
|
||||
248,22,178,13,2,19,23,197,1,10,28,23,193,2,249,22,65,248,22,166,13,
|
||||
249,22,164,13,23,198,1,247,22,179,13,248,80,159,43,52,36,248,22,67,23,
|
||||
199,1,248,80,159,41,52,36,248,22,67,196,27,248,22,139,13,23,195,2,28,
|
||||
23,193,2,192,87,94,23,193,1,28,248,22,159,6,23,195,2,27,248,22,161,
|
||||
13,195,28,192,192,248,22,162,13,195,11,87,94,28,28,248,22,140,13,23,195,
|
||||
2,10,27,248,22,139,13,23,196,2,28,23,193,2,192,87,94,23,193,1,28,
|
||||
248,22,159,6,23,196,2,27,248,22,161,13,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,248,22,162,13,23,197,2,11,12,250,22,132,9,76,110,111,114,
|
||||
22,165,13,23,195,2,23,194,1,28,248,22,164,13,23,195,2,249,22,166,13,
|
||||
23,196,1,250,80,158,45,48,248,22,180,13,2,19,11,10,250,80,158,43,48,
|
||||
248,22,180,13,2,19,23,197,1,10,28,23,193,2,249,22,65,248,22,168,13,
|
||||
249,22,166,13,23,198,1,247,22,181,13,248,80,159,43,52,36,248,22,67,23,
|
||||
199,1,248,80,159,41,52,36,248,22,67,196,27,248,22,141,13,23,195,2,28,
|
||||
23,193,2,192,87,94,23,193,1,28,248,22,159,6,23,195,2,27,248,22,163,
|
||||
13,195,28,192,192,248,22,164,13,195,11,87,94,28,28,248,22,142,13,23,195,
|
||||
2,10,27,248,22,141,13,23,196,2,28,23,193,2,192,87,94,23,193,1,28,
|
||||
248,22,159,6,23,196,2,27,248,22,163,13,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,248,22,164,13,23,197,2,11,12,250,22,132,9,76,110,111,114,
|
||||
109,97,108,45,112,97,116,104,45,99,97,115,101,6,42,42,112,97,116,104,32,
|
||||
40,102,111,114,32,97,110,121,32,115,121,115,116,101,109,41,32,111,114,32,118,
|
||||
97,108,105,100,45,112,97,116,104,32,115,116,114,105,110,103,23,197,2,28,28,
|
||||
248,22,140,13,23,195,2,249,22,164,8,248,22,141,13,23,197,2,2,20,249,
|
||||
248,22,142,13,23,195,2,249,22,164,8,248,22,143,13,23,197,2,2,20,249,
|
||||
22,164,8,247,22,178,7,2,20,27,28,248,22,159,6,23,196,2,23,195,2,
|
||||
248,22,168,7,248,22,144,13,23,197,2,28,249,22,191,13,0,21,35,114,120,
|
||||
248,22,168,7,248,22,146,13,23,197,2,28,249,22,129,14,0,21,35,114,120,
|
||||
34,94,91,92,92,93,91,92,92,93,91,63,93,91,92,92,93,34,23,195,2,
|
||||
28,248,22,159,6,195,248,22,147,13,195,194,27,248,22,134,7,23,195,1,249,
|
||||
22,148,13,248,22,171,7,250,22,133,14,0,6,35,114,120,34,47,34,28,249,
|
||||
22,191,13,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47,
|
||||
92,92,93,42,36,34,23,201,2,23,199,1,250,22,133,14,0,19,35,114,120,
|
||||
28,248,22,159,6,195,248,22,149,13,195,194,27,248,22,134,7,23,195,1,249,
|
||||
22,150,13,248,22,171,7,250,22,135,14,0,6,35,114,120,34,47,34,28,249,
|
||||
22,129,14,0,22,35,114,120,34,91,47,92,92,93,91,46,32,93,43,91,47,
|
||||
92,92,93,42,36,34,23,201,2,23,199,1,250,22,135,14,0,19,35,114,120,
|
||||
34,91,32,46,93,43,40,91,47,92,92,93,42,41,36,34,23,202,1,6,2,
|
||||
2,92,49,80,159,43,36,37,2,20,28,248,22,159,6,194,248,22,147,13,194,
|
||||
193,87,94,28,27,248,22,139,13,23,196,2,28,23,193,2,192,87,94,23,193,
|
||||
1,28,248,22,159,6,23,196,2,27,248,22,161,13,23,197,2,28,23,193,2,
|
||||
192,87,94,23,193,1,248,22,162,13,23,197,2,11,12,250,22,132,9,23,196,
|
||||
2,2,21,23,197,2,28,248,22,161,13,23,195,2,12,248,22,158,11,249,22,
|
||||
167,10,248,22,188,6,250,22,143,7,2,22,23,200,1,23,201,1,247,22,23,
|
||||
87,94,28,27,248,22,139,13,23,196,2,28,23,193,2,192,87,94,23,193,1,
|
||||
28,248,22,159,6,23,196,2,27,248,22,161,13,23,197,2,28,23,193,2,192,
|
||||
87,94,23,193,1,248,22,162,13,23,197,2,11,12,250,22,132,9,23,196,2,
|
||||
2,21,23,197,2,28,248,22,161,13,23,195,2,12,248,22,158,11,249,22,167,
|
||||
2,92,49,80,159,43,36,37,2,20,28,248,22,159,6,194,248,22,149,13,194,
|
||||
193,87,94,28,27,248,22,141,13,23,196,2,28,23,193,2,192,87,94,23,193,
|
||||
1,28,248,22,159,6,23,196,2,27,248,22,163,13,23,197,2,28,23,193,2,
|
||||
192,87,94,23,193,1,248,22,164,13,23,197,2,11,12,250,22,132,9,23,196,
|
||||
2,2,21,23,197,2,28,248,22,163,13,23,195,2,12,248,22,160,11,249,22,
|
||||
169,10,248,22,188,6,250,22,143,7,2,22,23,200,1,23,201,1,247,22,23,
|
||||
87,94,28,27,248,22,141,13,23,196,2,28,23,193,2,192,87,94,23,193,1,
|
||||
28,248,22,159,6,23,196,2,27,248,22,163,13,23,197,2,28,23,193,2,192,
|
||||
87,94,23,193,1,248,22,164,13,23,197,2,11,12,250,22,132,9,23,196,2,
|
||||
2,21,23,197,2,28,248,22,163,13,23,195,2,12,248,22,160,11,249,22,169,
|
||||
10,248,22,188,6,250,22,143,7,2,22,23,200,1,23,201,1,247,22,23,87,
|
||||
94,87,94,28,27,248,22,139,13,23,196,2,28,23,193,2,192,87,94,23,193,
|
||||
1,28,248,22,159,6,23,196,2,27,248,22,161,13,23,197,2,28,23,193,2,
|
||||
192,87,94,23,193,1,248,22,162,13,23,197,2,11,12,250,22,132,9,195,2,
|
||||
21,23,197,2,28,248,22,161,13,23,195,2,12,248,22,158,11,249,22,167,10,
|
||||
94,87,94,28,27,248,22,141,13,23,196,2,28,23,193,2,192,87,94,23,193,
|
||||
1,28,248,22,159,6,23,196,2,27,248,22,163,13,23,197,2,28,23,193,2,
|
||||
192,87,94,23,193,1,248,22,164,13,23,197,2,11,12,250,22,132,9,195,2,
|
||||
21,23,197,2,28,248,22,163,13,23,195,2,12,248,22,160,11,249,22,169,10,
|
||||
248,22,188,6,250,22,143,7,2,22,199,23,201,1,247,22,23,249,22,3,89,
|
||||
162,8,44,36,49,9,223,2,33,33,196,248,22,158,11,249,22,133,11,23,196,
|
||||
162,8,44,36,49,9,223,2,33,33,196,248,22,160,11,249,22,135,11,23,196,
|
||||
1,247,22,23,87,94,250,80,159,38,39,36,2,6,196,197,251,80,159,39,41,
|
||||
36,2,6,32,0,89,162,8,44,36,44,9,222,33,35,197,198,32,37,89,162,
|
||||
43,41,58,65,99,108,111,111,112,222,33,38,28,248,22,73,23,199,2,87,94,
|
||||
23,198,1,248,23,196,1,251,22,143,7,2,23,23,199,1,28,248,22,73,23,
|
||||
203,2,87,94,23,202,1,23,201,1,250,22,1,22,157,13,23,204,1,23,205,
|
||||
1,23,198,1,27,249,22,157,13,248,22,66,23,202,2,23,199,2,28,248,22,
|
||||
152,13,23,194,2,27,250,22,1,22,157,13,23,197,1,23,202,2,28,248,22,
|
||||
152,13,23,194,2,192,87,94,23,193,1,27,248,22,67,23,202,1,28,248,22,
|
||||
203,2,87,94,23,202,1,23,201,1,250,22,1,22,159,13,23,204,1,23,205,
|
||||
1,23,198,1,27,249,22,159,13,248,22,66,23,202,2,23,199,2,28,248,22,
|
||||
154,13,23,194,2,27,250,22,1,22,159,13,23,197,1,23,202,2,28,248,22,
|
||||
154,13,23,194,2,192,87,94,23,193,1,27,248,22,67,23,202,1,28,248,22,
|
||||
73,23,194,2,87,94,23,193,1,248,23,199,1,251,22,143,7,2,23,23,202,
|
||||
1,28,248,22,73,23,206,2,87,94,23,205,1,23,204,1,250,22,1,22,157,
|
||||
13,23,207,1,23,208,1,23,201,1,27,249,22,157,13,248,22,66,23,197,2,
|
||||
23,202,2,28,248,22,152,13,23,194,2,27,250,22,1,22,157,13,23,197,1,
|
||||
204,28,248,22,152,13,193,192,253,2,37,203,204,205,206,23,15,248,22,67,201,
|
||||
1,28,248,22,73,23,206,2,87,94,23,205,1,23,204,1,250,22,1,22,159,
|
||||
13,23,207,1,23,208,1,23,201,1,27,249,22,159,13,248,22,66,23,197,2,
|
||||
23,202,2,28,248,22,154,13,23,194,2,27,250,22,1,22,159,13,23,197,1,
|
||||
204,28,248,22,154,13,193,192,253,2,37,203,204,205,206,23,15,248,22,67,201,
|
||||
253,2,37,202,203,204,205,206,248,22,67,200,87,94,23,193,1,27,248,22,67,
|
||||
23,201,1,28,248,22,73,23,194,2,87,94,23,193,1,248,23,198,1,251,22,
|
||||
143,7,2,23,23,201,1,28,248,22,73,23,205,2,87,94,23,204,1,23,203,
|
||||
1,250,22,1,22,157,13,23,206,1,23,207,1,23,200,1,27,249,22,157,13,
|
||||
248,22,66,23,197,2,23,201,2,28,248,22,152,13,23,194,2,27,250,22,1,
|
||||
22,157,13,23,197,1,203,28,248,22,152,13,193,192,253,2,37,202,203,204,205,
|
||||
206,248,22,67,201,253,2,37,201,202,203,204,205,248,22,67,200,27,247,22,180,
|
||||
13,253,2,37,198,199,200,201,202,198,87,95,28,28,248,22,140,13,23,194,2,
|
||||
10,27,248,22,139,13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248,
|
||||
22,159,6,23,195,2,27,248,22,161,13,23,196,2,28,23,193,2,192,87,94,
|
||||
23,193,1,248,22,162,13,23,196,2,11,12,252,22,132,9,23,200,2,2,24,
|
||||
1,250,22,1,22,159,13,23,206,1,23,207,1,23,200,1,27,249,22,159,13,
|
||||
248,22,66,23,197,2,23,201,2,28,248,22,154,13,23,194,2,27,250,22,1,
|
||||
22,159,13,23,197,1,203,28,248,22,154,13,193,192,253,2,37,202,203,204,205,
|
||||
206,248,22,67,201,253,2,37,201,202,203,204,205,248,22,67,200,27,247,22,182,
|
||||
13,253,2,37,198,199,200,201,202,198,87,95,28,28,248,22,142,13,23,194,2,
|
||||
10,27,248,22,141,13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248,
|
||||
22,159,6,23,195,2,27,248,22,163,13,23,196,2,28,23,193,2,192,87,94,
|
||||
23,193,1,248,22,164,13,23,196,2,11,12,252,22,132,9,23,200,2,2,24,
|
||||
35,23,198,2,23,199,2,28,28,248,22,159,6,23,195,2,10,248,22,147,7,
|
||||
23,195,2,87,94,23,194,1,12,252,22,132,9,23,200,2,2,25,36,23,198,
|
||||
2,23,199,1,91,159,38,11,90,161,38,35,11,248,22,160,13,23,197,2,87,
|
||||
2,23,199,1,91,159,38,11,90,161,38,35,11,248,22,162,13,23,197,2,87,
|
||||
94,23,195,1,87,94,28,192,12,250,22,133,9,23,201,1,2,26,23,199,1,
|
||||
249,22,7,194,195,91,159,37,11,90,161,37,35,11,87,95,28,28,248,22,140,
|
||||
13,23,196,2,10,27,248,22,139,13,23,197,2,28,23,193,2,192,87,94,23,
|
||||
193,1,28,248,22,159,6,23,197,2,27,248,22,161,13,23,198,2,28,23,193,
|
||||
2,192,87,94,23,193,1,248,22,162,13,23,198,2,11,12,252,22,132,9,2,
|
||||
249,22,7,194,195,91,159,37,11,90,161,37,35,11,87,95,28,28,248,22,142,
|
||||
13,23,196,2,10,27,248,22,141,13,23,197,2,28,23,193,2,192,87,94,23,
|
||||
193,1,28,248,22,159,6,23,197,2,27,248,22,163,13,23,198,2,28,23,193,
|
||||
2,192,87,94,23,193,1,248,22,164,13,23,198,2,11,12,252,22,132,9,2,
|
||||
9,2,24,35,23,200,2,23,201,2,28,28,248,22,159,6,23,197,2,10,248,
|
||||
22,147,7,23,197,2,12,252,22,132,9,2,9,2,25,36,23,200,2,23,201,
|
||||
2,91,159,38,11,90,161,38,35,11,248,22,160,13,23,199,2,87,94,23,195,
|
||||
2,91,159,38,11,90,161,38,35,11,248,22,162,13,23,199,2,87,94,23,195,
|
||||
1,87,94,28,192,12,250,22,133,9,2,9,2,26,23,201,2,249,22,7,194,
|
||||
195,27,249,22,149,13,250,22,132,14,0,18,35,114,120,35,34,40,91,46,93,
|
||||
91,94,46,93,42,124,41,36,34,248,22,145,13,23,201,1,28,248,22,159,6,
|
||||
23,203,2,249,22,171,7,23,204,1,8,63,23,202,1,28,248,22,140,13,23,
|
||||
199,2,248,22,141,13,23,199,1,87,94,23,198,1,247,22,142,13,28,248,22,
|
||||
139,13,194,249,22,157,13,195,194,192,91,159,37,11,90,161,37,35,11,87,95,
|
||||
28,28,248,22,140,13,23,196,2,10,27,248,22,139,13,23,197,2,28,23,193,
|
||||
2,192,87,94,23,193,1,28,248,22,159,6,23,197,2,27,248,22,161,13,23,
|
||||
198,2,28,23,193,2,192,87,94,23,193,1,248,22,162,13,23,198,2,11,12,
|
||||
195,27,249,22,151,13,250,22,134,14,0,18,35,114,120,35,34,40,91,46,93,
|
||||
91,94,46,93,42,124,41,36,34,248,22,147,13,23,201,1,28,248,22,159,6,
|
||||
23,203,2,249,22,171,7,23,204,1,8,63,23,202,1,28,248,22,142,13,23,
|
||||
199,2,248,22,143,13,23,199,1,87,94,23,198,1,247,22,144,13,28,248,22,
|
||||
141,13,194,249,22,159,13,195,194,192,91,159,37,11,90,161,37,35,11,87,95,
|
||||
28,28,248,22,142,13,23,196,2,10,27,248,22,141,13,23,197,2,28,23,193,
|
||||
2,192,87,94,23,193,1,28,248,22,159,6,23,197,2,27,248,22,163,13,23,
|
||||
198,2,28,23,193,2,192,87,94,23,193,1,248,22,164,13,23,198,2,11,12,
|
||||
252,22,132,9,2,10,2,24,35,23,200,2,23,201,2,28,28,248,22,159,6,
|
||||
23,197,2,10,248,22,147,7,23,197,2,12,252,22,132,9,2,10,2,25,36,
|
||||
23,200,2,23,201,2,91,159,38,11,90,161,38,35,11,248,22,160,13,23,199,
|
||||
23,200,2,23,201,2,91,159,38,11,90,161,38,35,11,248,22,162,13,23,199,
|
||||
2,87,94,23,195,1,87,94,28,192,12,250,22,133,9,2,10,2,26,23,201,
|
||||
2,249,22,7,194,195,27,249,22,149,13,249,22,157,7,250,22,133,14,0,9,
|
||||
35,114,120,35,34,91,46,93,34,248,22,145,13,23,203,1,6,1,1,95,28,
|
||||
2,249,22,7,194,195,27,249,22,151,13,249,22,157,7,250,22,135,14,0,9,
|
||||
35,114,120,35,34,91,46,93,34,248,22,147,13,23,203,1,6,1,1,95,28,
|
||||
248,22,159,6,23,202,2,249,22,171,7,23,203,1,8,63,23,201,1,28,248,
|
||||
22,140,13,23,199,2,248,22,141,13,23,199,1,87,94,23,198,1,247,22,142,
|
||||
13,28,248,22,139,13,194,249,22,157,13,195,194,192,249,247,22,190,4,194,11,
|
||||
249,80,158,37,46,9,9,249,80,158,37,46,195,9,27,247,22,182,13,249,80,
|
||||
22,142,13,23,199,2,248,22,143,13,23,199,1,87,94,23,198,1,247,22,144,
|
||||
13,28,248,22,141,13,194,249,22,159,13,195,194,192,249,247,22,190,4,194,11,
|
||||
249,80,158,37,46,9,9,249,80,158,37,46,195,9,27,247,22,184,13,249,80,
|
||||
158,38,47,28,23,195,2,27,248,22,176,7,6,11,11,80,76,84,67,79,76,
|
||||
76,69,67,84,83,28,192,192,6,0,0,6,0,0,27,28,23,196,1,250,22,
|
||||
157,13,248,22,178,13,69,97,100,100,111,110,45,100,105,114,247,22,174,7,6,
|
||||
159,13,248,22,180,13,69,97,100,100,111,110,45,100,105,114,247,22,174,7,6,
|
||||
8,8,99,111,108,108,101,99,116,115,11,27,248,80,159,41,52,36,250,22,79,
|
||||
23,203,1,248,22,75,248,22,178,13,72,99,111,108,108,101,99,116,115,45,100,
|
||||
23,203,1,248,22,75,248,22,180,13,72,99,111,108,108,101,99,116,115,45,100,
|
||||
105,114,23,204,1,28,23,194,2,249,22,65,23,196,1,23,195,1,192,32,47,
|
||||
89,162,8,44,38,54,2,18,222,33,48,27,249,22,189,13,23,197,2,23,198,
|
||||
89,162,8,44,38,54,2,18,222,33,48,27,249,22,191,13,23,197,2,23,198,
|
||||
2,28,23,193,2,87,94,23,196,1,27,248,22,90,23,195,2,27,27,248,22,
|
||||
99,23,197,1,27,249,22,189,13,23,201,2,23,196,2,28,23,193,2,87,94,
|
||||
99,23,197,1,27,249,22,191,13,23,201,2,23,196,2,28,23,193,2,87,94,
|
||||
23,194,1,27,248,22,90,23,195,2,27,250,2,47,23,203,2,23,204,1,248,
|
||||
22,99,23,199,1,28,249,22,153,7,23,196,2,2,27,249,22,79,23,202,2,
|
||||
194,249,22,65,248,22,148,13,23,197,1,23,195,1,87,95,23,199,1,23,193,
|
||||
194,249,22,65,248,22,150,13,23,197,1,23,195,1,87,95,23,199,1,23,193,
|
||||
1,28,249,22,153,7,23,196,2,2,27,249,22,79,23,200,2,9,249,22,65,
|
||||
248,22,148,13,23,197,1,9,28,249,22,153,7,23,196,2,2,27,249,22,79,
|
||||
197,194,87,94,23,196,1,249,22,65,248,22,148,13,23,197,1,194,87,94,23,
|
||||
248,22,150,13,23,197,1,9,28,249,22,153,7,23,196,2,2,27,249,22,79,
|
||||
197,194,87,94,23,196,1,249,22,65,248,22,150,13,23,197,1,194,87,94,23,
|
||||
193,1,28,249,22,153,7,23,198,2,2,27,249,22,79,195,9,87,94,23,194,
|
||||
1,249,22,65,248,22,148,13,23,199,1,9,87,95,28,28,248,22,147,7,194,
|
||||
1,249,22,65,248,22,150,13,23,199,1,9,87,95,28,28,248,22,147,7,194,
|
||||
10,248,22,159,6,194,12,250,22,132,9,2,13,6,21,21,98,121,116,101,32,
|
||||
115,116,114,105,110,103,32,111,114,32,115,116,114,105,110,103,196,28,28,248,22,
|
||||
74,195,249,22,4,22,139,13,196,11,12,250,22,132,9,2,13,6,13,13,108,
|
||||
74,195,249,22,4,22,141,13,196,11,12,250,22,132,9,2,13,6,13,13,108,
|
||||
105,115,116,32,111,102,32,112,97,116,104,115,197,250,2,47,197,195,28,248,22,
|
||||
159,6,197,248,22,170,7,197,196,32,50,89,162,8,44,39,57,2,18,222,33,
|
||||
53,32,51,89,162,8,44,38,54,70,102,111,117,110,100,45,101,120,101,99,222,
|
||||
33,52,28,23,193,2,91,159,38,11,90,161,38,35,11,248,22,160,13,23,199,
|
||||
2,87,95,23,195,1,23,194,1,27,28,23,198,2,27,248,22,165,13,23,201,
|
||||
2,28,249,22,166,8,23,195,2,23,202,2,11,28,248,22,161,13,23,194,2,
|
||||
250,2,51,23,201,2,23,202,2,249,22,157,13,23,200,2,23,198,1,250,2,
|
||||
33,52,28,23,193,2,91,159,38,11,90,161,38,35,11,248,22,162,13,23,199,
|
||||
2,87,95,23,195,1,23,194,1,27,28,23,198,2,27,248,22,167,13,23,201,
|
||||
2,28,249,22,166,8,23,195,2,23,202,2,11,28,248,22,163,13,23,194,2,
|
||||
250,2,51,23,201,2,23,202,2,249,22,159,13,23,200,2,23,198,1,250,2,
|
||||
51,23,201,2,23,202,2,23,196,1,11,28,23,193,2,192,87,94,23,193,1,
|
||||
27,28,248,22,139,13,23,196,2,27,249,22,157,13,23,198,2,23,201,2,28,
|
||||
28,248,22,152,13,193,10,248,22,151,13,193,192,11,11,28,23,193,2,192,87,
|
||||
94,23,193,1,28,23,199,2,11,27,248,22,165,13,23,202,2,28,249,22,166,
|
||||
8,23,195,2,23,203,1,11,28,248,22,161,13,23,194,2,250,2,51,23,202,
|
||||
1,23,203,1,249,22,157,13,23,201,1,23,198,1,250,2,51,201,202,195,194,
|
||||
28,248,22,73,23,197,2,11,27,248,22,164,13,248,22,66,23,199,2,27,249,
|
||||
22,157,13,23,196,1,23,197,2,28,248,22,151,13,23,194,2,250,2,51,198,
|
||||
27,28,248,22,141,13,23,196,2,27,249,22,159,13,23,198,2,23,201,2,28,
|
||||
28,248,22,154,13,193,10,248,22,153,13,193,192,11,11,28,23,193,2,192,87,
|
||||
94,23,193,1,28,23,199,2,11,27,248,22,167,13,23,202,2,28,249,22,166,
|
||||
8,23,195,2,23,203,1,11,28,248,22,163,13,23,194,2,250,2,51,23,202,
|
||||
1,23,203,1,249,22,159,13,23,201,1,23,198,1,250,2,51,201,202,195,194,
|
||||
28,248,22,73,23,197,2,11,27,248,22,166,13,248,22,66,23,199,2,27,249,
|
||||
22,159,13,23,196,1,23,197,2,28,248,22,153,13,23,194,2,250,2,51,198,
|
||||
199,195,87,94,23,193,1,27,248,22,67,23,200,1,28,248,22,73,23,194,2,
|
||||
11,27,248,22,164,13,248,22,66,23,196,2,27,249,22,157,13,23,196,1,23,
|
||||
200,2,28,248,22,151,13,23,194,2,250,2,51,201,202,195,87,94,23,193,1,
|
||||
27,248,22,67,23,197,1,28,248,22,73,23,194,2,11,27,248,22,164,13,248,
|
||||
22,66,195,27,249,22,157,13,23,196,1,202,28,248,22,151,13,193,250,2,51,
|
||||
204,205,195,251,2,50,204,205,206,248,22,67,199,87,95,28,27,248,22,139,13,
|
||||
11,27,248,22,166,13,248,22,66,23,196,2,27,249,22,159,13,23,196,1,23,
|
||||
200,2,28,248,22,153,13,23,194,2,250,2,51,201,202,195,87,94,23,193,1,
|
||||
27,248,22,67,23,197,1,28,248,22,73,23,194,2,11,27,248,22,166,13,248,
|
||||
22,66,195,27,249,22,159,13,23,196,1,202,28,248,22,153,13,193,250,2,51,
|
||||
204,205,195,251,2,50,204,205,206,248,22,67,199,87,95,28,27,248,22,141,13,
|
||||
23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,159,6,23,196,2,
|
||||
27,248,22,161,13,23,197,2,28,23,193,2,192,87,94,23,193,1,248,22,162,
|
||||
27,248,22,163,13,23,197,2,28,23,193,2,192,87,94,23,193,1,248,22,164,
|
||||
13,23,197,2,11,12,250,22,132,9,2,14,6,25,25,112,97,116,104,32,111,
|
||||
114,32,115,116,114,105,110,103,32,40,115,97,110,115,32,110,117,108,41,23,197,
|
||||
2,28,28,23,195,2,28,27,248,22,139,13,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,28,248,22,159,6,23,197,2,27,248,22,161,13,23,198,2,28,
|
||||
23,193,2,192,87,94,23,193,1,248,22,162,13,23,198,2,11,248,22,161,13,
|
||||
2,28,28,23,195,2,28,27,248,22,141,13,23,197,2,28,23,193,2,192,87,
|
||||
94,23,193,1,28,248,22,159,6,23,197,2,27,248,22,163,13,23,198,2,28,
|
||||
23,193,2,192,87,94,23,193,1,248,22,164,13,23,198,2,11,248,22,163,13,
|
||||
23,196,2,11,10,12,250,22,132,9,2,14,6,29,29,35,102,32,111,114,32,
|
||||
114,101,108,97,116,105,118,101,32,112,97,116,104,32,111,114,32,115,116,114,105,
|
||||
110,103,23,198,2,28,28,248,22,161,13,23,195,2,91,159,38,11,90,161,38,
|
||||
35,11,248,22,160,13,23,198,2,249,22,164,8,194,68,114,101,108,97,116,105,
|
||||
110,103,23,198,2,28,28,248,22,163,13,23,195,2,91,159,38,11,90,161,38,
|
||||
35,11,248,22,162,13,23,198,2,249,22,164,8,194,68,114,101,108,97,116,105,
|
||||
118,101,11,27,248,22,176,7,6,4,4,80,65,84,72,251,2,50,23,199,1,
|
||||
23,200,1,23,201,1,28,23,197,2,27,249,80,159,43,47,37,23,200,1,9,
|
||||
28,249,22,164,8,247,22,178,7,2,20,249,22,65,248,22,148,13,5,1,46,
|
||||
23,195,1,192,9,27,248,22,164,13,23,196,1,28,248,22,151,13,193,250,2,
|
||||
28,249,22,164,8,247,22,178,7,2,20,249,22,65,248,22,150,13,5,1,46,
|
||||
23,195,1,192,9,27,248,22,166,13,23,196,1,28,248,22,153,13,193,250,2,
|
||||
51,198,199,195,11,250,80,158,38,48,196,197,11,250,80,158,38,48,196,11,11,
|
||||
87,94,249,22,150,6,247,22,186,4,195,248,22,176,5,249,22,172,3,35,249,
|
||||
22,156,3,197,198,27,28,23,197,2,87,95,23,196,1,23,195,1,23,197,1,
|
||||
87,94,23,197,1,27,248,22,178,13,2,19,27,249,80,159,40,48,37,23,196,
|
||||
87,94,23,197,1,27,248,22,180,13,2,19,27,249,80,159,40,48,37,23,196,
|
||||
1,11,27,27,248,22,175,3,23,200,1,28,192,192,35,27,27,248,22,175,3,
|
||||
23,202,1,28,192,192,35,249,22,153,5,23,197,1,83,158,39,20,97,95,89,
|
||||
162,8,44,35,47,9,224,3,2,33,57,23,195,1,23,196,1,27,248,22,138,
|
||||
|
@ -330,7 +330,7 @@
|
|||
36,43,2,11,222,33,43,80,159,35,45,36,83,158,35,16,2,83,158,38,20,
|
||||
96,96,2,12,89,162,43,35,43,9,223,0,33,44,89,162,43,36,44,9,223,
|
||||
0,33,45,89,162,43,37,54,9,223,0,33,46,80,159,35,46,36,83,158,35,
|
||||
16,2,27,248,22,185,13,248,22,170,7,27,28,249,22,164,8,247,22,178,7,
|
||||
16,2,27,248,22,187,13,248,22,170,7,27,28,249,22,164,8,247,22,178,7,
|
||||
2,20,6,1,1,59,6,1,1,58,250,22,143,7,6,14,14,40,91,94,126,
|
||||
97,93,42,41,126,97,40,46,42,41,23,196,2,23,196,1,89,162,8,44,37,
|
||||
47,2,13,223,0,33,49,80,159,35,47,36,83,158,35,16,2,83,158,38,20,
|
||||
|
@ -342,7 +342,7 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 5009);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,50,8,0,0,0,1,0,0,6,0,19,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,51,8,0,0,0,1,0,0,6,0,19,0,
|
||||
34,0,48,0,62,0,76,0,111,0,0,0,1,1,0,0,65,113,117,111,116,
|
||||
101,29,94,2,1,67,35,37,117,116,105,108,115,11,29,94,2,1,69,35,37,
|
||||
110,101,116,119,111,114,107,11,29,94,2,1,68,35,37,112,97,114,97,109,122,
|
||||
|
@ -360,7 +360,7 @@
|
|||
EVAL_ONE_SIZED_STR((char *)expr, 294);
|
||||
}
|
||||
{
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,50,52,0,0,0,1,0,0,11,0,38,0,
|
||||
static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,53,46,51,52,0,0,0,1,0,0,11,0,38,0,
|
||||
44,0,57,0,71,0,93,0,119,0,131,0,149,0,169,0,181,0,197,0,220,
|
||||
0,0,1,5,1,10,1,15,1,24,1,29,1,60,1,64,1,72,1,81,1,
|
||||
89,1,192,1,237,1,1,2,30,2,61,2,117,2,127,2,174,2,184,2,191,
|
||||
|
@ -384,30 +384,30 @@
|
|||
63,108,105,98,67,105,103,110,111,114,101,100,249,22,14,195,80,159,37,45,37,
|
||||
249,80,159,37,48,36,195,10,27,28,23,195,2,28,249,22,164,8,23,197,2,
|
||||
80,158,38,46,87,94,23,195,1,80,158,36,47,27,248,22,173,4,23,197,2,
|
||||
28,248,22,139,13,23,194,2,91,159,38,11,90,161,38,35,11,248,22,160,13,
|
||||
28,248,22,141,13,23,194,2,91,159,38,11,90,161,38,35,11,248,22,162,13,
|
||||
23,197,1,87,95,83,160,37,11,80,158,40,46,198,83,160,37,11,80,158,40,
|
||||
47,192,192,11,11,28,23,193,2,192,87,94,23,193,1,27,247,22,191,4,28,
|
||||
192,192,247,22,179,13,20,14,159,80,158,35,39,250,80,158,38,40,249,22,27,
|
||||
11,80,158,40,39,22,191,4,28,248,22,139,13,23,198,2,23,197,1,87,94,
|
||||
23,197,1,247,22,179,13,247,194,250,22,157,13,23,197,1,23,199,1,249,80,
|
||||
158,42,38,23,198,1,2,17,252,22,157,13,23,199,1,23,201,1,2,18,247,
|
||||
192,192,247,22,181,13,20,14,159,80,158,35,39,250,80,158,38,40,249,22,27,
|
||||
11,80,158,40,39,22,191,4,28,248,22,141,13,23,198,2,23,197,1,87,94,
|
||||
23,197,1,247,22,181,13,247,194,250,22,159,13,23,197,1,23,199,1,249,80,
|
||||
158,42,38,23,198,1,2,17,252,22,159,13,23,199,1,23,201,1,2,18,247,
|
||||
22,179,7,249,80,158,44,38,23,200,1,80,159,44,35,37,87,94,23,194,1,
|
||||
27,250,22,174,13,196,11,32,0,89,162,8,44,35,40,9,222,11,28,192,249,
|
||||
22,65,195,194,11,27,252,22,157,13,23,200,1,23,202,1,2,18,247,22,179,
|
||||
7,249,80,158,45,38,23,201,1,80,159,45,35,37,27,250,22,174,13,196,11,
|
||||
27,250,22,176,13,196,11,32,0,89,162,8,44,35,40,9,222,11,28,192,249,
|
||||
22,65,195,194,11,27,252,22,159,13,23,200,1,23,202,1,2,18,247,22,179,
|
||||
7,249,80,158,45,38,23,201,1,80,159,45,35,37,27,250,22,176,13,196,11,
|
||||
32,0,89,162,8,44,35,40,9,222,11,28,192,249,22,65,195,194,11,249,247,
|
||||
22,184,13,248,22,66,195,195,27,250,22,157,13,23,198,1,23,200,1,249,80,
|
||||
158,43,38,23,199,1,2,17,27,250,22,174,13,196,11,32,0,89,162,8,44,
|
||||
22,186,13,248,22,66,195,195,27,250,22,159,13,23,198,1,23,200,1,249,80,
|
||||
158,43,38,23,199,1,2,17,27,250,22,176,13,196,11,32,0,89,162,8,44,
|
||||
35,40,9,222,11,28,192,249,22,65,195,194,11,249,247,22,189,4,248,22,66,
|
||||
195,195,249,247,22,189,4,194,195,87,94,28,248,80,158,36,37,23,195,2,12,
|
||||
250,22,132,9,77,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,
|
||||
100,6,25,25,112,97,116,104,32,111,114,32,118,97,108,105,100,45,112,97,116,
|
||||
104,32,115,116,114,105,110,103,23,197,2,91,159,41,11,90,161,36,35,11,28,
|
||||
248,22,163,13,23,201,2,23,200,1,27,247,22,191,4,28,23,193,2,249,22,
|
||||
164,13,23,203,1,23,195,1,200,90,161,38,36,11,248,22,160,13,23,194,2,
|
||||
248,22,165,13,23,201,2,23,200,1,27,247,22,191,4,28,23,193,2,249,22,
|
||||
166,13,23,203,1,23,195,1,200,90,161,38,36,11,248,22,162,13,23,194,2,
|
||||
87,94,23,196,1,90,161,36,39,11,28,249,22,164,8,23,196,2,68,114,101,
|
||||
108,97,116,105,118,101,87,94,23,194,1,2,16,23,194,1,90,161,36,40,11,
|
||||
247,22,181,13,27,89,162,43,36,49,62,122,111,225,7,5,3,33,27,27,89,
|
||||
247,22,183,13,27,89,162,43,36,49,62,122,111,225,7,5,3,33,27,27,89,
|
||||
162,43,36,51,9,225,8,6,4,33,28,27,249,22,5,89,162,8,44,36,46,
|
||||
9,223,5,33,29,23,203,2,27,28,23,195,1,27,249,22,5,89,162,8,44,
|
||||
36,52,9,225,13,11,9,33,30,23,205,2,27,28,23,196,2,11,193,28,192,
|
||||
|
@ -420,10 +420,10 @@
|
|||
203,89,162,43,35,45,9,224,15,2,33,33,249,80,159,48,54,36,203,89,162,
|
||||
43,35,44,9,224,15,7,33,34,32,36,89,162,8,44,36,54,2,19,222,33,
|
||||
38,0,17,35,114,120,34,94,40,46,42,63,41,47,40,46,42,41,36,34,27,
|
||||
249,22,189,13,2,37,23,196,2,28,23,193,2,87,94,23,194,1,249,22,65,
|
||||
248,22,90,23,196,2,27,248,22,99,23,197,1,27,249,22,189,13,2,37,23,
|
||||
249,22,191,13,2,37,23,196,2,28,23,193,2,87,94,23,194,1,249,22,65,
|
||||
248,22,90,23,196,2,27,248,22,99,23,197,1,27,249,22,191,13,2,37,23,
|
||||
196,2,28,23,193,2,87,94,23,194,1,249,22,65,248,22,90,23,196,2,27,
|
||||
248,22,99,23,197,1,27,249,22,189,13,2,37,23,196,2,28,23,193,2,87,
|
||||
248,22,99,23,197,1,27,249,22,191,13,2,37,23,196,2,28,23,193,2,87,
|
||||
94,23,194,1,249,22,65,248,22,90,23,196,2,248,2,36,248,22,99,23,197,
|
||||
1,248,22,75,194,248,22,75,194,248,22,75,194,32,39,89,162,43,36,54,2,
|
||||
19,222,33,40,28,248,22,73,248,22,67,23,195,2,249,22,7,9,248,22,66,
|
||||
|
@ -437,19 +437,19 @@
|
|||
39,193,87,95,28,248,22,171,4,195,12,250,22,132,9,2,20,6,20,20,114,
|
||||
101,115,111,108,118,101,100,45,109,111,100,117,108,101,45,112,97,116,104,197,28,
|
||||
24,193,2,248,24,194,1,195,87,94,23,193,1,12,27,27,250,22,139,2,80,
|
||||
159,41,42,37,248,22,145,14,247,22,186,11,11,28,23,193,2,192,87,94,23,
|
||||
193,1,27,247,22,123,87,94,250,22,137,2,80,159,42,42,37,248,22,145,14,
|
||||
247,22,186,11,195,192,250,22,137,2,195,198,66,97,116,116,97,99,104,251,211,
|
||||
159,41,42,37,248,22,147,14,247,22,188,11,11,28,23,193,2,192,87,94,23,
|
||||
193,1,27,247,22,123,87,94,250,22,137,2,80,159,42,42,37,248,22,147,14,
|
||||
247,22,188,11,195,192,250,22,137,2,195,198,66,97,116,116,97,99,104,251,211,
|
||||
197,198,199,10,28,192,250,22,131,9,11,196,195,248,22,129,9,194,28,249,22,
|
||||
165,6,194,6,1,1,46,2,16,28,249,22,165,6,194,6,2,2,46,46,62,
|
||||
117,112,192,28,249,22,166,8,248,22,67,23,200,2,23,197,1,28,249,22,164,
|
||||
8,248,22,66,23,200,2,23,196,1,251,22,129,9,2,20,6,26,26,99,121,
|
||||
99,108,101,32,105,110,32,108,111,97,100,105,110,103,32,97,116,32,126,101,58,
|
||||
32,126,101,23,200,1,249,22,2,22,67,248,22,80,249,22,65,23,206,1,23,
|
||||
202,1,12,12,247,192,20,14,159,80,159,39,44,37,249,22,65,248,22,145,14,
|
||||
247,22,186,11,23,197,1,20,14,159,80,158,39,39,250,80,158,42,40,249,22,
|
||||
202,1,12,12,247,192,20,14,159,80,159,39,44,37,249,22,65,248,22,147,14,
|
||||
247,22,188,11,23,197,1,20,14,159,80,158,39,39,250,80,158,42,40,249,22,
|
||||
27,11,80,158,44,39,22,153,4,23,196,1,249,247,22,190,4,23,198,1,248,
|
||||
22,54,248,22,143,13,23,198,1,87,94,28,28,248,22,139,13,23,197,2,10,
|
||||
22,54,248,22,145,13,23,198,1,87,94,28,28,248,22,141,13,23,197,2,10,
|
||||
248,22,177,4,23,197,2,12,28,23,198,2,250,22,131,9,11,6,15,15,98,
|
||||
97,100,32,109,111,100,117,108,101,32,112,97,116,104,23,201,2,250,22,132,9,
|
||||
2,20,6,19,19,109,111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,
|
||||
|
@ -457,74 +457,74 @@
|
|||
23,199,2,2,3,11,248,22,172,4,248,22,90,197,28,28,248,22,63,23,197,
|
||||
2,249,22,164,8,248,22,66,23,199,2,66,112,108,97,110,101,116,11,87,94,
|
||||
28,207,12,20,14,159,80,158,37,39,250,80,158,40,40,249,22,27,11,80,158,
|
||||
42,39,22,186,11,23,197,1,90,161,36,35,10,249,22,154,4,21,94,2,21,
|
||||
42,39,22,188,11,23,197,1,90,161,36,35,10,249,22,154,4,21,94,2,21,
|
||||
6,18,18,112,108,97,110,101,116,47,114,101,115,111,108,118,101,114,46,115,115,
|
||||
1,27,112,108,97,110,101,116,45,109,111,100,117,108,101,45,110,97,109,101,45,
|
||||
114,101,115,111,108,118,101,114,12,251,211,199,200,201,202,87,94,23,193,1,27,
|
||||
89,162,8,44,36,45,79,115,104,111,119,45,99,111,108,108,101,99,116,105,111,
|
||||
110,45,101,114,114,223,6,33,44,27,28,248,22,53,23,199,2,27,250,22,139,
|
||||
2,80,159,43,43,37,249,22,65,23,204,2,247,22,180,13,11,28,23,193,2,
|
||||
2,80,159,43,43,37,249,22,65,23,204,2,247,22,182,13,11,28,23,193,2,
|
||||
192,87,94,23,193,1,91,159,37,11,90,161,37,35,11,249,80,159,44,48,36,
|
||||
248,22,56,23,204,2,11,27,251,80,158,47,50,2,20,23,202,1,28,248,22,
|
||||
73,23,199,2,23,199,2,248,22,66,23,199,2,28,248,22,73,23,199,2,9,
|
||||
248,22,67,23,199,2,249,22,157,13,23,195,1,28,248,22,73,23,197,1,87,
|
||||
248,22,67,23,199,2,249,22,159,13,23,195,1,28,248,22,73,23,197,1,87,
|
||||
94,23,197,1,6,7,7,109,97,105,110,46,115,115,249,22,182,6,23,199,1,
|
||||
6,3,3,46,115,115,28,248,22,159,6,23,199,2,87,94,23,194,1,27,248,
|
||||
80,159,41,55,36,23,201,2,27,250,22,139,2,80,159,44,43,37,249,22,65,
|
||||
23,205,2,23,199,2,11,28,23,193,2,192,87,94,23,193,1,91,159,37,11,
|
||||
90,161,37,35,11,249,80,159,45,48,36,23,204,2,11,250,22,1,22,157,13,
|
||||
90,161,37,35,11,249,80,159,45,48,36,23,204,2,11,250,22,1,22,159,13,
|
||||
23,199,1,249,22,79,249,22,2,32,0,89,162,8,44,36,43,9,222,33,45,
|
||||
23,200,1,248,22,75,23,200,1,28,248,22,139,13,23,199,2,87,94,23,194,
|
||||
1,28,248,22,162,13,23,199,2,23,198,2,248,22,75,6,26,26,32,40,97,
|
||||
23,200,1,248,22,75,23,200,1,28,248,22,141,13,23,199,2,87,94,23,194,
|
||||
1,28,248,22,164,13,23,199,2,23,198,2,248,22,75,6,26,26,32,40,97,
|
||||
32,112,97,116,104,32,109,117,115,116,32,98,101,32,97,98,115,111,108,117,116,
|
||||
101,41,28,249,22,164,8,248,22,66,23,201,2,2,21,27,250,22,139,2,80,
|
||||
159,43,43,37,249,22,65,23,204,2,247,22,180,13,11,28,23,193,2,192,87,
|
||||
159,43,43,37,249,22,65,23,204,2,247,22,182,13,11,28,23,193,2,192,87,
|
||||
94,23,193,1,91,159,38,11,90,161,37,35,11,249,80,159,45,48,36,248,22,
|
||||
90,23,205,2,11,90,161,36,37,11,28,248,22,73,248,22,92,23,204,2,28,
|
||||
248,22,73,23,194,2,249,22,191,13,0,8,35,114,120,34,91,46,93,34,23,
|
||||
248,22,73,23,194,2,249,22,129,14,0,8,35,114,120,34,91,46,93,34,23,
|
||||
196,2,11,10,27,27,28,23,197,2,249,22,79,28,248,22,73,248,22,92,23,
|
||||
208,2,21,93,6,5,5,109,122,108,105,98,249,22,1,22,79,249,22,2,80,
|
||||
159,51,56,36,248,22,92,23,211,2,23,197,2,28,248,22,73,23,196,2,248,
|
||||
22,75,23,197,2,23,195,2,251,80,158,49,50,2,20,23,204,1,248,22,66,
|
||||
23,198,2,248,22,67,23,198,1,249,22,157,13,23,195,1,28,23,198,1,87,
|
||||
23,198,2,248,22,67,23,198,1,249,22,159,13,23,195,1,28,23,198,1,87,
|
||||
94,23,196,1,23,197,1,28,248,22,73,23,197,1,87,94,23,197,1,6,7,
|
||||
7,109,97,105,110,46,115,115,28,249,22,191,13,0,8,35,114,120,34,91,46,
|
||||
7,109,97,105,110,46,115,115,28,249,22,129,14,0,8,35,114,120,34,91,46,
|
||||
93,34,23,199,2,23,197,1,249,22,182,6,23,199,1,6,3,3,46,115,115,
|
||||
28,249,22,164,8,248,22,66,23,201,2,64,102,105,108,101,249,22,164,13,248,
|
||||
22,168,13,248,22,90,23,202,2,248,80,159,42,55,36,23,202,2,12,87,94,
|
||||
28,28,248,22,139,13,23,194,2,10,248,22,181,7,23,194,2,87,94,23,200,
|
||||
28,249,22,164,8,248,22,66,23,201,2,64,102,105,108,101,249,22,166,13,248,
|
||||
22,170,13,248,22,90,23,202,2,248,80,159,42,55,36,23,202,2,12,87,94,
|
||||
28,28,248,22,141,13,23,194,2,10,248,22,181,7,23,194,2,87,94,23,200,
|
||||
1,12,28,23,200,2,250,22,131,9,67,114,101,113,117,105,114,101,249,22,143,
|
||||
7,6,17,17,98,97,100,32,109,111,100,117,108,101,32,112,97,116,104,126,97,
|
||||
28,23,198,2,248,22,66,23,199,2,6,0,0,23,203,1,87,94,23,200,1,
|
||||
250,22,132,9,2,20,249,22,143,7,6,13,13,109,111,100,117,108,101,32,112,
|
||||
97,116,104,126,97,28,23,198,2,248,22,66,23,199,2,6,0,0,23,201,2,
|
||||
27,28,248,22,181,7,23,195,2,249,22,186,7,23,196,2,35,249,22,166,13,
|
||||
248,22,167,13,23,197,2,11,27,28,248,22,181,7,23,196,2,249,22,186,7,
|
||||
27,28,248,22,181,7,23,195,2,249,22,186,7,23,196,2,35,249,22,168,13,
|
||||
248,22,169,13,23,197,2,11,27,28,248,22,181,7,23,196,2,249,22,186,7,
|
||||
23,197,2,36,248,80,158,42,51,23,195,2,91,159,38,11,90,161,38,35,11,
|
||||
28,248,22,181,7,23,199,2,250,22,7,2,22,249,22,186,7,23,203,2,37,
|
||||
2,22,248,22,160,13,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,
|
||||
2,22,248,22,162,13,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,
|
||||
181,7,23,200,2,249,22,186,7,23,201,2,38,249,80,158,47,52,23,197,2,
|
||||
5,0,27,28,248,22,181,7,23,201,2,249,22,186,7,23,202,2,39,248,22,
|
||||
172,4,23,200,2,27,27,250,22,139,2,80,159,51,42,37,248,22,145,14,247,
|
||||
22,186,11,11,28,23,193,2,192,87,94,23,193,1,27,247,22,123,87,94,250,
|
||||
22,137,2,80,159,52,42,37,248,22,145,14,247,22,186,11,195,192,87,95,28,
|
||||
172,4,23,200,2,27,27,250,22,139,2,80,159,51,42,37,248,22,147,14,247,
|
||||
22,188,11,11,28,23,193,2,192,87,94,23,193,1,27,247,22,123,87,94,250,
|
||||
22,137,2,80,159,52,42,37,248,22,147,14,247,22,188,11,195,192,87,95,28,
|
||||
23,209,1,27,250,22,139,2,23,197,2,197,11,28,23,193,1,12,87,95,27,
|
||||
27,28,248,22,17,80,159,51,45,37,80,159,50,45,37,247,22,19,250,22,25,
|
||||
248,22,23,23,197,2,80,159,53,44,37,23,196,1,27,248,22,145,14,247,22,
|
||||
186,11,249,22,3,83,158,39,20,97,94,89,162,8,44,36,54,9,226,12,11,
|
||||
248,22,23,23,197,2,80,159,53,44,37,23,196,1,27,248,22,147,14,247,22,
|
||||
188,11,249,22,3,83,158,39,20,97,94,89,162,8,44,36,54,9,226,12,11,
|
||||
2,3,33,46,23,195,1,23,196,1,248,28,248,22,17,80,159,50,45,37,32,
|
||||
0,89,162,43,36,41,9,222,33,47,80,159,49,57,36,89,162,43,35,50,9,
|
||||
227,14,9,8,4,3,33,48,250,22,137,2,23,197,1,197,10,12,28,28,248,
|
||||
22,181,7,23,202,1,11,27,248,22,159,6,23,208,2,28,192,192,28,248,22,
|
||||
63,23,208,2,249,22,164,8,248,22,66,23,210,2,2,21,11,250,22,137,2,
|
||||
80,159,50,43,37,28,248,22,159,6,23,210,2,249,22,65,23,211,1,248,80,
|
||||
159,53,55,36,23,213,1,87,94,23,210,1,249,22,65,23,211,1,247,22,180,
|
||||
159,53,55,36,23,213,1,87,94,23,210,1,249,22,65,23,211,1,247,22,182,
|
||||
13,252,22,183,7,23,208,1,23,207,1,23,205,1,23,203,1,201,12,193,91,
|
||||
159,37,10,90,161,36,35,10,11,90,161,36,36,10,83,158,38,20,96,96,2,
|
||||
20,89,162,8,44,36,50,9,224,2,0,33,42,89,162,43,38,48,9,223,1,
|
||||
33,43,89,162,43,39,8,30,9,225,2,3,0,33,49,208,87,95,248,22,152,
|
||||
4,248,80,159,37,49,37,247,22,186,11,248,22,190,4,80,159,36,36,37,248,
|
||||
22,177,12,80,159,36,41,36,159,35,20,103,159,35,16,1,11,16,0,83,158,
|
||||
4,248,80,159,37,49,37,247,22,188,11,248,22,190,4,80,159,36,36,37,248,
|
||||
22,179,12,80,159,36,41,36,159,35,20,103,159,35,16,1,11,16,0,83,158,
|
||||
41,20,100,143,66,35,37,98,111,111,116,29,11,11,11,11,10,10,36,80,158,
|
||||
35,35,20,103,159,39,16,19,2,1,2,2,30,2,4,72,112,97,116,104,45,
|
||||
115,116,114,105,110,103,63,10,30,2,4,75,112,97,116,104,45,97,100,100,45,
|
||||
|
|
|
@ -92,6 +92,7 @@ static Scheme_Object *variable_top_level_namespace(int, Scheme_Object *[]);
|
|||
static Scheme_Object *variable_phase(int, Scheme_Object *[]);
|
||||
static Scheme_Object *now_transforming(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_exp_time_value(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_exp_time_value_one(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_exp_time_name(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_context(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *local_phase_level(int argc, Scheme_Object *argv[]);
|
||||
|
@ -522,6 +523,7 @@ static void make_kernel_env(void)
|
|||
|
||||
GLOBAL_PRIM_W_ARITY("syntax-transforming?", now_transforming, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-value", local_exp_time_value, 1, 3, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-value/immediate", local_exp_time_value_one, 1, 3, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-name", local_exp_time_name, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-context", local_context, 0, 0, env);
|
||||
GLOBAL_PRIM_W_ARITY("syntax-local-phase-level", local_phase_level, 0, 0, env);
|
||||
|
@ -1179,9 +1181,9 @@ void scheme_shadow(Scheme_Env *env, Scheme_Object *n, int stxtoo)
|
|||
v = scheme_lookup_in_table(env->syntax, (const char *)n);
|
||||
if (v) {
|
||||
v = SCHEME_PTR_VAL(v);
|
||||
if (SAME_TYPE(SCHEME_TYPE(v), scheme_id_macro_type)) {
|
||||
if (scheme_is_binding_rename_transformer(v)) {
|
||||
scheme_install_free_id_rename(n,
|
||||
SCHEME_PTR1_VAL(v),
|
||||
scheme_rename_transformer_id(v),
|
||||
rn,
|
||||
scheme_make_integer(env->phase));
|
||||
}
|
||||
|
@ -4169,9 +4171,9 @@ now_transforming(int argc, Scheme_Object *argv[])
|
|||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_exp_time_value(int argc, Scheme_Object *argv[])
|
||||
do_local_exp_time_value(const char *name, int argc, Scheme_Object *argv[], int recur)
|
||||
{
|
||||
Scheme_Object *v, *sym;
|
||||
Scheme_Object *v, *sym, *a[2];
|
||||
Scheme_Env *menv;
|
||||
Scheme_Comp_Env *env;
|
||||
int renamed = 0;
|
||||
|
@ -4179,24 +4181,26 @@ local_exp_time_value(int argc, Scheme_Object *argv[])
|
|||
env = scheme_current_thread->current_local_env;
|
||||
if (!env)
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT,
|
||||
"syntax-local-value: not currently transforming");
|
||||
"%s: not currently transforming",
|
||||
name);
|
||||
|
||||
sym = argv[0];
|
||||
|
||||
if (!(SCHEME_STXP(sym) && SCHEME_SYMBOLP(SCHEME_STX_VAL(sym))))
|
||||
scheme_wrong_type("syntax-local-value", "syntax identifier", 0, argc, argv);
|
||||
scheme_wrong_type(name, "syntax identifier", 0, argc, argv);
|
||||
|
||||
if (argc > 1) {
|
||||
scheme_check_proc_arity2("syntax-local-value", 0, 1, argc, argv, 1);
|
||||
scheme_check_proc_arity2(name, 0, 1, argc, argv, 1);
|
||||
if ((argc > 2)
|
||||
&& SCHEME_TRUEP(argv[2])) {
|
||||
Scheme_Comp_Env *stx_env;
|
||||
if (!SAME_TYPE(scheme_intdef_context_type, SCHEME_TYPE(argv[2])))
|
||||
scheme_wrong_type("syntax-local-value", "internal-definition context or #f", 2, argc, argv);
|
||||
scheme_wrong_type(name, "internal-definition context or #f", 2, argc, argv);
|
||||
stx_env = (Scheme_Comp_Env *)SCHEME_PTR1_VAL(argv[2]);
|
||||
if (!scheme_is_sub_env(stx_env, env)) {
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT, "syntax-local-value: transforming context does "
|
||||
"not match given internal-definition context");
|
||||
scheme_raise_exn(MZEXN_FAIL_CONTRACT, "%s: transforming context does "
|
||||
"not match given internal-definition context",
|
||||
name);
|
||||
}
|
||||
env = stx_env;
|
||||
}
|
||||
|
@ -4227,7 +4231,7 @@ local_exp_time_value(int argc, Scheme_Object *argv[])
|
|||
if ((argc > 1) && SCHEME_TRUEP(argv[1]))
|
||||
return _scheme_tail_apply(argv[1], 0, NULL);
|
||||
else
|
||||
scheme_arg_mismatch("syntax-local-value",
|
||||
scheme_arg_mismatch(name,
|
||||
(renamed
|
||||
? "not defined as syntax (after renaming): "
|
||||
: "not defined as syntax: "),
|
||||
|
@ -4235,17 +4239,38 @@ local_exp_time_value(int argc, Scheme_Object *argv[])
|
|||
}
|
||||
|
||||
v = SCHEME_PTR_VAL(v);
|
||||
if (SAME_TYPE(SCHEME_TYPE(v), scheme_id_macro_type)) {
|
||||
sym = SCHEME_PTR1_VAL(v);
|
||||
if (scheme_is_rename_transformer(v)) {
|
||||
sym = scheme_rename_transformer_id(v);
|
||||
sym = scheme_stx_cert(sym, scheme_false, menv, sym, NULL, 1);
|
||||
renamed = 1;
|
||||
menv = NULL;
|
||||
SCHEME_USE_FUEL(1);
|
||||
if (!recur) {
|
||||
a[0] = v;
|
||||
a[1] = sym;
|
||||
return scheme_values(2, a);
|
||||
}
|
||||
} else if (!recur) {
|
||||
a[0] = v;
|
||||
a[1] = scheme_false;
|
||||
return scheme_values(2, a);
|
||||
} else
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_exp_time_value(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return do_local_exp_time_value("syntax-local-value", argc, argv, 1);
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_exp_time_value_one(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return do_local_exp_time_value("syntax-local-value/immediate", argc, argv, 0);
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
local_exp_time_name(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
|
@ -4675,10 +4700,10 @@ local_make_delta_introduce(int argc, Scheme_Object *argv[])
|
|||
introducers = scheme_make_pair(introducer, introducers);
|
||||
|
||||
v = SCHEME_PTR_VAL(v);
|
||||
if (SAME_TYPE(SCHEME_TYPE(v), scheme_id_macro_type)) {
|
||||
if (scheme_is_rename_transformer(v)) {
|
||||
certs = scheme_stx_extract_certs(sym, certs);
|
||||
|
||||
sym = SCHEME_PTR1_VAL(v);
|
||||
sym = scheme_rename_transformer_id(v);
|
||||
sym = scheme_stx_activate_certs(sym);
|
||||
|
||||
v = SCHEME_PTR2_VAL(v);
|
||||
|
@ -5039,7 +5064,7 @@ make_set_transformer(int argc, Scheme_Object *argv[])
|
|||
static Scheme_Object *
|
||||
set_transformer_p(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return ((SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_set_macro_type))
|
||||
return (scheme_is_set_transformer(argv[0])
|
||||
? scheme_true
|
||||
: scheme_false);
|
||||
}
|
||||
|
@ -5047,10 +5072,10 @@ set_transformer_p(int argc, Scheme_Object *argv[])
|
|||
static Scheme_Object *
|
||||
set_transformer_proc(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
if (!(SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_set_macro_type)))
|
||||
if (!scheme_is_set_transformer(argv[0]))
|
||||
scheme_wrong_type("set!-transformer-procedure", "set!-transformer", 1, argc, argv);
|
||||
|
||||
return SCHEME_PTR_VAL(argv[0]);
|
||||
return scheme_set_transformer_proc(argv[0]);
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
|
@ -5075,16 +5100,16 @@ make_rename_transformer(int argc, Scheme_Object *argv[])
|
|||
static Scheme_Object *
|
||||
rename_transformer_target(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
if (!SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_id_macro_type))
|
||||
if (!scheme_is_rename_transformer(argv[0]))
|
||||
scheme_wrong_type("rename-transformer-target", "rename transformer", 0, argc, argv);
|
||||
|
||||
return SCHEME_PTR_VAL(argv[0]);
|
||||
return scheme_rename_transformer_id(argv[0]);
|
||||
}
|
||||
|
||||
static Scheme_Object *
|
||||
rename_transformer_p(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return ((SAME_TYPE(SCHEME_TYPE(argv[0]), scheme_id_macro_type))
|
||||
return (scheme_is_rename_transformer(argv[0])
|
||||
? scheme_true
|
||||
: scheme_false);
|
||||
}
|
||||
|
|
|
@ -5204,9 +5204,10 @@ Scheme_Object *scheme_check_immediate_macro(Scheme_Object *first,
|
|||
SCHEME_EXPAND_OBSERVE_EXIT_CHECK(rec[drec].observer, first);
|
||||
return first;
|
||||
} else if (SAME_TYPE(SCHEME_TYPE(val), scheme_macro_type)) {
|
||||
if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(val)), scheme_id_macro_type)) {
|
||||
if (scheme_is_rename_transformer(SCHEME_PTR_VAL(val))) {
|
||||
/* It's a rename. Look up the target name and try again. */
|
||||
name = scheme_stx_cert(SCHEME_PTR_VAL(SCHEME_PTR_VAL(val)), scheme_false, menv, name, NULL, 1);
|
||||
name = scheme_stx_cert(scheme_rename_transformer_id(SCHEME_PTR_VAL(val)),
|
||||
scheme_false, menv, name, NULL, 1);
|
||||
menv = NULL;
|
||||
SCHEME_USE_FUEL(1);
|
||||
} else {
|
||||
|
@ -5247,7 +5248,7 @@ compile_expand_macro_app(Scheme_Object *name, Scheme_Env *menv, Scheme_Object *m
|
|||
|
||||
xformer = (Scheme_Object *)SCHEME_PTR_VAL(macro);
|
||||
|
||||
if (SAME_TYPE(SCHEME_TYPE(xformer), scheme_set_macro_type)) {
|
||||
if (scheme_is_set_transformer(xformer)) {
|
||||
/* scheme_apply_macro unwraps it */
|
||||
} else {
|
||||
if (!scheme_check_proc_arity(NULL, 1, 0, -1, &xformer)) {
|
||||
|
@ -5402,10 +5403,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
SCHEME_EXPAND_OBSERVE_RESOLVE(rec[drec].observer,find_name);
|
||||
|
||||
if (var && SAME_TYPE(SCHEME_TYPE(var), scheme_macro_type)
|
||||
&& SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_id_macro_type)) {
|
||||
&& scheme_is_rename_transformer(SCHEME_PTR_VAL(var))) {
|
||||
/* It's a rename. Look up the target name and try again. */
|
||||
Scheme_Object *new_name;
|
||||
new_name = SCHEME_PTR_VAL(SCHEME_PTR_VAL(var));
|
||||
new_name = scheme_rename_transformer_id(SCHEME_PTR_VAL(var));
|
||||
if (!rec[drec].comp) {
|
||||
new_name = scheme_stx_track(new_name, find_name, find_name);
|
||||
}
|
||||
|
@ -5508,10 +5509,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
|
||||
SCHEME_EXPAND_OBSERVE_RESOLVE(rec[drec].observer, find_name);
|
||||
if (var && SAME_TYPE(SCHEME_TYPE(var), scheme_macro_type)
|
||||
&& SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_id_macro_type)) {
|
||||
&& scheme_is_rename_transformer(SCHEME_PTR_VAL(var))) {
|
||||
/* It's a rename. Look up the target name and try again. */
|
||||
Scheme_Object *new_name;
|
||||
new_name = SCHEME_PTR_VAL(SCHEME_PTR_VAL(var));
|
||||
new_name = scheme_rename_transformer_id(SCHEME_PTR_VAL(var));
|
||||
if (!rec[drec].comp) {
|
||||
new_name = scheme_stx_track(new_name, find_name, find_name);
|
||||
}
|
||||
|
@ -5595,10 +5596,10 @@ scheme_compile_expand_expr(Scheme_Object *form, Scheme_Comp_Env *env,
|
|||
SCHEME_EXPAND_OBSERVE_RESOLVE(rec[drec].observer, find_name);
|
||||
|
||||
if (var && SAME_TYPE(SCHEME_TYPE(var), scheme_macro_type)
|
||||
&& SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_id_macro_type)) {
|
||||
&& scheme_is_rename_transformer(SCHEME_PTR_VAL(var))) {
|
||||
/* It's a rename. Look up the target name and try again. */
|
||||
Scheme_Object *new_name;
|
||||
new_name = SCHEME_PTR_VAL(SCHEME_PTR_VAL(var));
|
||||
new_name = scheme_rename_transformer_id(SCHEME_PTR_VAL(var));
|
||||
if (!rec[drec].comp) {
|
||||
new_name = scheme_stx_track(new_name, find_name, find_name);
|
||||
}
|
||||
|
|
|
@ -2603,10 +2603,10 @@ scheme_apply_macro(Scheme_Object *name, Scheme_Env *menv,
|
|||
Scheme_Object *certs;
|
||||
certs = rec[drec].certs;
|
||||
|
||||
if (SAME_TYPE(SCHEME_TYPE(rator), scheme_id_macro_type)) {
|
||||
if (scheme_is_rename_transformer(rator)) {
|
||||
Scheme_Object *mark;
|
||||
|
||||
rator = SCHEME_PTR1_VAL(rator);
|
||||
rator = scheme_rename_transformer_id(rator);
|
||||
/* rator is now an identifier */
|
||||
|
||||
/* and it's introduced by this expression: */
|
||||
|
@ -2639,8 +2639,8 @@ scheme_apply_macro(Scheme_Object *name, Scheme_Env *menv,
|
|||
|
||||
certs = scheme_stx_extract_certs(code, certs);
|
||||
|
||||
if (SAME_TYPE(SCHEME_TYPE(rator), scheme_set_macro_type))
|
||||
rator = SCHEME_PTR_VAL(rator);
|
||||
if (scheme_is_set_transformer(rator))
|
||||
rator = scheme_set_transformer_proc(rator);
|
||||
|
||||
mark = scheme_new_mark();
|
||||
code = scheme_add_remove_mark(code, mark);
|
||||
|
|
|
@ -4519,8 +4519,8 @@ static void eval_exptime(Scheme_Object *names, int count,
|
|||
SCHEME_PTR_VAL(macro) = values[i];
|
||||
|
||||
if (SCHEME_TRUEP(free_id_rename_rn)
|
||||
&& SAME_TYPE(SCHEME_TYPE(values[i]), scheme_id_macro_type))
|
||||
scheme_install_free_id_rename(name, SCHEME_PTR1_VAL(values[i]), free_id_rename_rn,
|
||||
&& scheme_is_binding_rename_transformer(values[i]))
|
||||
scheme_install_free_id_rename(name, scheme_rename_transformer_id(values[i]), free_id_rename_rn,
|
||||
scheme_make_integer(0));
|
||||
} else
|
||||
macro = values[i];
|
||||
|
@ -4539,8 +4539,8 @@ static void eval_exptime(Scheme_Object *names, int count,
|
|||
SCHEME_PTR_VAL(macro) = vals;
|
||||
|
||||
if (SCHEME_TRUEP(free_id_rename_rn)
|
||||
&& SAME_TYPE(SCHEME_TYPE(vals), scheme_id_macro_type))
|
||||
scheme_install_free_id_rename(name, SCHEME_PTR1_VAL(vals), free_id_rename_rn,
|
||||
&& scheme_is_binding_rename_transformer(vals))
|
||||
scheme_install_free_id_rename(name, scheme_rename_transformer_id(vals), free_id_rename_rn,
|
||||
scheme_make_integer(0));
|
||||
} else
|
||||
macro = vals;
|
||||
|
@ -7334,6 +7334,69 @@ static Scheme_Object *adjust_for_rename(Scheme_Object *out_name, Scheme_Object *
|
|||
return first;
|
||||
}
|
||||
|
||||
static Scheme_Object *extract_free_id_name(Scheme_Object *name,
|
||||
Scheme_Object *phase,
|
||||
Scheme_Env *genv,
|
||||
int always,
|
||||
int *_implicit,
|
||||
Scheme_Object **_implicit_src,
|
||||
Scheme_Object **_implicit_src_name,
|
||||
Scheme_Object **_implicit_mod_phase,
|
||||
Scheme_Object **_implicit_nominal_name,
|
||||
Scheme_Object **_implicit_nominal_mod)
|
||||
{
|
||||
*_implicit = 0;
|
||||
|
||||
while (1) { /* loop for free-id=? renaming */
|
||||
if (SCHEME_STXP(name)) {
|
||||
if (genv
|
||||
&& (always
|
||||
|| SAME_OBJ(phase, scheme_make_integer(0))
|
||||
|| SAME_OBJ(phase, scheme_make_integer(1))))
|
||||
name = scheme_tl_id_sym(genv, name, NULL, -1, phase, NULL);
|
||||
else
|
||||
name = SCHEME_STX_VAL(name); /* shouldn't get here; no `define-for-label' */
|
||||
}
|
||||
|
||||
/* Check for free-id=? renaming: */
|
||||
if (SAME_OBJ(phase, scheme_make_integer(0))) {
|
||||
Scheme_Object *v2;
|
||||
v2 = scheme_lookup_in_table(genv->syntax, (const char *)name);
|
||||
if (v2 && scheme_is_binding_rename_transformer(SCHEME_PTR_VAL(v2))) {
|
||||
Scheme_Object *name2;
|
||||
Scheme_Object *mod, *id;
|
||||
|
||||
name2 = scheme_rename_transformer_id(SCHEME_PTR_VAL(v2));
|
||||
id = name2;
|
||||
mod = scheme_stx_module_name(0, &id, phase,
|
||||
_implicit_nominal_mod, _implicit_nominal_name,
|
||||
_implicit_mod_phase,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (SAME_TYPE(SCHEME_TYPE(mod), scheme_module_index_type)) {
|
||||
if (SCHEME_FALSEP(((Scheme_Modidx *)mod)->path)) {
|
||||
/* keep looking locally */
|
||||
name = name2;
|
||||
SCHEME_USE_FUEL(1);
|
||||
} else {
|
||||
/* free-id=? equivalence to a name that is not necessarily imported explicitly */
|
||||
if (_implicit_src) {
|
||||
*_implicit_src = mod;
|
||||
*_implicit_src_name = id;
|
||||
}
|
||||
*_implicit = 1;
|
||||
break;
|
||||
}
|
||||
} else
|
||||
break;
|
||||
} else
|
||||
break;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table *tables,
|
||||
Scheme_Module_Exports *me,
|
||||
Scheme_Env *genv,
|
||||
|
@ -7341,13 +7404,15 @@ char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table
|
|||
Scheme_Object *form,
|
||||
char **_phase1_protects)
|
||||
{
|
||||
int i, count, z;
|
||||
int i, count, z, implicit;
|
||||
Scheme_Object **exs, **exsns, **exss, **exsnoms, *phase;
|
||||
Scheme_Hash_Table *provided, *required;
|
||||
char *exps, *exets, *phase0_exps = NULL, *phase1_exps = NULL;
|
||||
int excount, exvcount;
|
||||
Scheme_Module_Phase_Exports *pt;
|
||||
|
||||
Scheme_Object *implicit_src, *implicit_src_name, *implicit_mod_phase;
|
||||
Scheme_Object *implicit_nominal_name, *implicit_nominal_mod;
|
||||
|
||||
for (z = 0; z < all_provided->size; z++) {
|
||||
provided = (Scheme_Hash_Table *)all_provided->vals[z];
|
||||
|
||||
|
@ -7400,16 +7465,13 @@ char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table
|
|||
v = provided->vals[i]; /* external name */
|
||||
name = SCHEME_CAR(v); /* internal name (maybe already a symbol) */
|
||||
protected = SCHEME_TRUEP(SCHEME_CDR(v));
|
||||
|
||||
prnt_name = name;
|
||||
if (SCHEME_STXP(name)) {
|
||||
if (genv)
|
||||
name = scheme_tl_id_sym(genv, name, NULL, -1, phase, NULL);
|
||||
else
|
||||
name = SCHEME_STX_VAL(name); /* shouldn't get here; no `define-for-label' */
|
||||
}
|
||||
|
||||
if (genv
|
||||
name = extract_free_id_name(name, phase, genv, 1, &implicit,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
if (!implicit
|
||||
&& genv
|
||||
&& (SAME_OBJ(phase, scheme_make_integer(0))
|
||||
|| SAME_OBJ(phase, scheme_make_integer(1)))
|
||||
&& scheme_lookup_in_table(SAME_OBJ(phase, scheme_make_integer(0))
|
||||
|
@ -7425,10 +7487,13 @@ char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table
|
|||
if (SAME_OBJ(phase, scheme_make_integer(1)))
|
||||
exets[count] = 1;
|
||||
count++;
|
||||
} else if (genv
|
||||
} else if (!implicit
|
||||
&& genv
|
||||
&& SAME_OBJ(phase, scheme_make_integer(0))
|
||||
&& scheme_lookup_in_table(genv->syntax, (const char *)name)) {
|
||||
/* Skip for now. */
|
||||
/* Skip syntax for now. */
|
||||
} else if (implicit) {
|
||||
/* Rename-transformer redirect; skip for now. */
|
||||
} else if ((v = scheme_hash_get(required, name))) {
|
||||
/* Required */
|
||||
if (protected) {
|
||||
|
@ -7473,17 +7538,13 @@ char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table
|
|||
name = SCHEME_CAR(v); /* internal name (maybe already a symbol) */
|
||||
protected = SCHEME_TRUEP(SCHEME_CDR(v));
|
||||
|
||||
if (SCHEME_STXP(name)) {
|
||||
if (genv
|
||||
&& (SAME_OBJ(phase, scheme_make_integer(0))
|
||||
|| SAME_OBJ(phase, scheme_make_integer(1))))
|
||||
name = scheme_tl_id_sym(genv, name, NULL, -1, phase, NULL);
|
||||
else {
|
||||
name = SCHEME_STX_VAL(name); /* shouldn't get here; no `define-for-label' */
|
||||
}
|
||||
}
|
||||
name = extract_free_id_name(name, phase, genv, 0, &implicit,
|
||||
&implicit_src, &implicit_src_name,
|
||||
&implicit_mod_phase,
|
||||
&implicit_nominal_name, &implicit_nominal_mod);
|
||||
|
||||
if (genv
|
||||
if (!implicit
|
||||
&& genv
|
||||
&& SAME_OBJ(phase, scheme_make_integer(0))
|
||||
&& scheme_lookup_in_table(genv->syntax, (const char *)name)) {
|
||||
/* Defined locally */
|
||||
|
@ -7493,6 +7554,16 @@ char *compute_provide_arrays(Scheme_Hash_Table *all_provided, Scheme_Hash_Table
|
|||
exsnoms[count] = scheme_null; /* since "self" */
|
||||
exps[count] = protected;
|
||||
count++;
|
||||
} else if (implicit) {
|
||||
/* We record all free-id=?-based exprts as synatx, even though they may be values. */
|
||||
Scheme_Object *noms;
|
||||
exs[count] = provided->keys[i];
|
||||
exsns[count] = implicit_src_name;
|
||||
exss[count] = implicit_src;
|
||||
noms = adjust_for_rename(exs[count], implicit_nominal_name, cons(implicit_nominal_mod, scheme_null));
|
||||
exsnoms[count] = noms;
|
||||
exps[count] = protected;
|
||||
count++;
|
||||
} else if ((v = scheme_hash_get(required, name))) {
|
||||
/* Required */
|
||||
if (SCHEME_FALSEP(SCHEME_VEC_ELS(v)[3])) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#define USE_COMPILED_STARTUP 1
|
||||
|
||||
#define EXPECTED_PRIM_COUNT 947
|
||||
#define EXPECTED_PRIM_COUNT 950
|
||||
|
||||
#ifdef MZSCHEME_SOMETHING_OMITTED
|
||||
# undef USE_COMPILED_STARTUP
|
||||
|
|
|
@ -2515,6 +2515,12 @@ void scheme_unmarshal_wrap_set(Scheme_Unmarshal_Tables *ut,
|
|||
Scheme_Object *wraps_key,
|
||||
Scheme_Object *v);
|
||||
|
||||
int scheme_is_rename_transformer(Scheme_Object *o);
|
||||
int scheme_is_binding_rename_transformer(Scheme_Object *o);
|
||||
Scheme_Object *scheme_rename_transformer_id(Scheme_Object *o);
|
||||
int scheme_is_set_transformer(Scheme_Object *o);
|
||||
Scheme_Object *scheme_set_transformer_proc(Scheme_Object *o);
|
||||
|
||||
/*========================================================================*/
|
||||
/* namespaces and modules */
|
||||
/*========================================================================*/
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
consistently.)
|
||||
*/
|
||||
|
||||
#define MZSCHEME_VERSION "4.1.5.2"
|
||||
#define MZSCHEME_VERSION "4.1.5.3"
|
||||
|
||||
#define MZSCHEME_VERSION_X 4
|
||||
#define MZSCHEME_VERSION_Y 1
|
||||
#define MZSCHEME_VERSION_Z 5
|
||||
#define MZSCHEME_VERSION_W 2
|
||||
#define MZSCHEME_VERSION_W 3
|
||||
|
||||
#define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y)
|
||||
#define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W)
|
||||
|
|
|
@ -70,6 +70,8 @@ static Scheme_Object *check_equal_property_value_ok(int argc, Scheme_Object *arg
|
|||
static Scheme_Object *check_write_property_value_ok(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *check_input_port_property_value_ok(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *check_output_port_property_value_ok(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *check_rename_transformer_property_value_ok(int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *check_set_transformer_property_value_ok(int argc, Scheme_Object *argv[]);
|
||||
|
||||
static Scheme_Object *make_struct_type(int argc, Scheme_Object *argv[]);
|
||||
|
||||
|
@ -134,6 +136,10 @@ static Scheme_Object *exn_source_get(int argc, Scheme_Object **argv);
|
|||
|
||||
static Scheme_Object *procedure_extract_target(int argc, Scheme_Object **argv);
|
||||
|
||||
static Scheme_Object *rename_transformer_property;
|
||||
static Scheme_Object *set_transformer_property;
|
||||
static Scheme_Object *not_free_id_symbol;
|
||||
|
||||
#ifdef MZ_PRECISE_GC
|
||||
static void register_traversers(void);
|
||||
#endif
|
||||
|
@ -178,6 +184,7 @@ scheme_init_struct (Scheme_Env *env)
|
|||
Scheme_Object **loc_values, *loc_et;
|
||||
int loc_count;
|
||||
int i;
|
||||
Scheme_Object *guard;
|
||||
|
||||
static const char *arity_fields[1] = { "value" };
|
||||
#ifdef TIME_SYNTAX
|
||||
|
@ -253,7 +260,7 @@ scheme_init_struct (Scheme_Env *env)
|
|||
|
||||
REGISTER_SO(write_property);
|
||||
{
|
||||
Scheme_Object *guard, *a[2], *pred, *access;
|
||||
Scheme_Object *a[2], *pred, *access;
|
||||
guard = scheme_make_prim_w_arity(check_write_property_value_ok,
|
||||
"guard-for-prop:custom-write",
|
||||
2, 2);
|
||||
|
@ -271,7 +278,6 @@ scheme_init_struct (Scheme_Env *env)
|
|||
|
||||
REGISTER_SO(evt_property);
|
||||
{
|
||||
Scheme_Object *guard;
|
||||
guard = scheme_make_prim_w_arity(check_evt_property_value_ok,
|
||||
"guard-for-prop:evt",
|
||||
2, 2);
|
||||
|
@ -292,7 +298,6 @@ scheme_init_struct (Scheme_Env *env)
|
|||
}
|
||||
|
||||
{
|
||||
Scheme_Object *guard;
|
||||
guard = scheme_make_prim_w_arity(check_equal_property_value_ok,
|
||||
"guard-for-prop:equal+hash",
|
||||
2, 2);
|
||||
|
@ -303,7 +308,6 @@ scheme_init_struct (Scheme_Env *env)
|
|||
}
|
||||
|
||||
{
|
||||
Scheme_Object *guard;
|
||||
REGISTER_SO(scheme_input_port_property);
|
||||
REGISTER_SO(scheme_output_port_property);
|
||||
|
||||
|
@ -323,6 +327,33 @@ scheme_init_struct (Scheme_Env *env)
|
|||
scheme_add_global_constant("prop:output-port", scheme_output_port_property, env);
|
||||
}
|
||||
|
||||
{
|
||||
REGISTER_SO(rename_transformer_property);
|
||||
|
||||
guard = scheme_make_prim_w_arity(check_rename_transformer_property_value_ok,
|
||||
"guard-for-prop:rename-transformer",
|
||||
2, 2);
|
||||
rename_transformer_property = scheme_make_struct_type_property_w_guard(scheme_intern_symbol("rename-transformer"),
|
||||
guard);
|
||||
|
||||
scheme_add_global_constant("prop:rename-transformer", rename_transformer_property, env);
|
||||
}
|
||||
|
||||
{
|
||||
REGISTER_SO(set_transformer_property);
|
||||
|
||||
guard = scheme_make_prim_w_arity(check_set_transformer_property_value_ok,
|
||||
"guard-for-prop:set!-transformer",
|
||||
2, 2);
|
||||
set_transformer_property = scheme_make_struct_type_property_w_guard(scheme_intern_symbol("set!-transformer"),
|
||||
guard);
|
||||
|
||||
scheme_add_global_constant("prop:set!-transformer", set_transformer_property, env);
|
||||
}
|
||||
|
||||
REGISTER_SO(not_free_id_symbol);
|
||||
not_free_id_symbol = scheme_intern_symbol("not-free-identifier=?");
|
||||
|
||||
REGISTER_SO(scheme_recur_symbol);
|
||||
REGISTER_SO(scheme_display_symbol);
|
||||
REGISTER_SO(scheme_write_special_symbol);
|
||||
|
@ -552,7 +583,6 @@ scheme_init_struct (Scheme_Env *env)
|
|||
|
||||
REGISTER_SO(scheme_source_property);
|
||||
{
|
||||
Scheme_Object *guard;
|
||||
guard = scheme_make_prim_w_arity(check_exn_source_property_value_ok,
|
||||
"guard-for-prop:exn:srclocs",
|
||||
2, 2);
|
||||
|
@ -1073,25 +1103,22 @@ static int is_evt_struct(Scheme_Object *o)
|
|||
/* port structs */
|
||||
/*========================================================================*/
|
||||
|
||||
static Scheme_Object *check_port_property_value_ok(const char *name, int input, int argc, Scheme_Object *argv[])
|
||||
/* This is the guard for prop:input-port and prop:output-port */
|
||||
typedef int (*Check_Val_Proc)(Scheme_Object *);
|
||||
|
||||
static Scheme_Object *check_indirect_property_value_ok(const char *name, Check_Val_Proc ck, const char *complain,
|
||||
int argc, Scheme_Object *argv[])
|
||||
{
|
||||
Scheme_Object *v, *l, *acc;
|
||||
int pos, num_islots;
|
||||
|
||||
v = argv[0];
|
||||
|
||||
if ((input && SCHEME_INPUT_PORTP(v))
|
||||
|| (!input && SCHEME_OUTPUT_PORTP(v)))
|
||||
|
||||
if (ck(v))
|
||||
return v;
|
||||
|
||||
if (!((SCHEME_INTP(v) && (SCHEME_INT_VAL(v) >= 0))
|
||||
|| (SCHEME_BIGNUMP(v) && SCHEME_BIGPOS(v))))
|
||||
scheme_arg_mismatch(name,
|
||||
(input
|
||||
? "property value is not an input port or exact non-negative integer: "
|
||||
: "property value is not an output port or exact non-negative integer: "),
|
||||
v);
|
||||
scheme_arg_mismatch(name, complain, v);
|
||||
|
||||
l = argv[1];
|
||||
l = SCHEME_CDR(l);
|
||||
|
@ -1131,6 +1158,20 @@ static Scheme_Object *check_port_property_value_ok(const char *name, int input,
|
|||
return v;
|
||||
}
|
||||
|
||||
static int is_input_port(Scheme_Object *v) { return SCHEME_INPUT_PORTP(v); }
|
||||
static int is_output_port(Scheme_Object *v) { return SCHEME_OUTPUT_PORTP(v); }
|
||||
|
||||
static Scheme_Object *check_port_property_value_ok(const char *name, int input, int argc, Scheme_Object *argv[])
|
||||
/* This is the guard for prop:input-port and prop:output-port */
|
||||
{
|
||||
return check_indirect_property_value_ok(name,
|
||||
input ? is_input_port : is_output_port,
|
||||
(input
|
||||
? "property value is not an input port or exact non-negative integer: "
|
||||
: "property value is not an output port or exact non-negative integer: "),
|
||||
argc, argv);
|
||||
}
|
||||
|
||||
static Scheme_Object *check_input_port_property_value_ok(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return check_port_property_value_ok("guard-for-prop:input-port", 1, argc, argv);
|
||||
|
@ -1207,6 +1248,107 @@ Scheme_Object *scheme_is_writable_struct(Scheme_Object *s)
|
|||
return scheme_struct_type_property_ref(write_property, s);
|
||||
}
|
||||
|
||||
/*========================================================================*/
|
||||
/* rename and set! transformer properties */
|
||||
/*========================================================================*/
|
||||
|
||||
int scheme_is_rename_transformer(Scheme_Object *o)
|
||||
{
|
||||
if (SAME_TYPE(SCHEME_TYPE(o), scheme_id_macro_type))
|
||||
return 1;
|
||||
if (SCHEME_STRUCTP(o)
|
||||
&& scheme_struct_type_property_ref(rename_transformer_property, o))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int scheme_is_binding_rename_transformer(Scheme_Object *o)
|
||||
{
|
||||
if (scheme_is_rename_transformer(o)) {
|
||||
o = scheme_rename_transformer_id(o);
|
||||
o = scheme_stx_property(o, not_free_id_symbol, NULL);
|
||||
if (o && SCHEME_TRUEP(o))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_stx_id(Scheme_Object *o) { return (SCHEME_STXP(o) && SCHEME_SYMBOLP(SCHEME_STX_VAL(o))); }
|
||||
|
||||
Scheme_Object *scheme_rename_transformer_id(Scheme_Object *o)
|
||||
{
|
||||
if (SAME_TYPE(SCHEME_TYPE(o), scheme_id_macro_type))
|
||||
return SCHEME_PTR1_VAL(o);
|
||||
if (SCHEME_STRUCTP(o)) {
|
||||
Scheme_Object *v;
|
||||
v = scheme_struct_type_property_ref(rename_transformer_property, o);
|
||||
if (SCHEME_BOXP(v)) v = SCHEME_BOX_VAL(v);
|
||||
if (SCHEME_INTP(v)) {
|
||||
v = ((Scheme_Structure *)o)->slots[SCHEME_INT_VAL(v)];
|
||||
if (!is_stx_id(v)) {
|
||||
v = scheme_datum_to_syntax(scheme_intern_symbol("?"), scheme_false, scheme_false, 0, 0);
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Scheme_Object *check_rename_transformer_property_value_ok(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return check_indirect_property_value_ok("guard-for-prop:rename-transformer",
|
||||
is_stx_id,
|
||||
"property value is not an identifier or exact non-negative integer, optionaly boxed: ",
|
||||
argc, argv);
|
||||
}
|
||||
|
||||
int scheme_is_set_transformer(Scheme_Object *o)
|
||||
{
|
||||
if (SAME_TYPE(SCHEME_TYPE(o), scheme_set_macro_type))
|
||||
return 1;
|
||||
if (SCHEME_STRUCTP(o)
|
||||
&& scheme_struct_type_property_ref(set_transformer_property, o))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_proc_1(Scheme_Object *o) { return (SCHEME_PROCP(o) && scheme_check_proc_arity(NULL, 1, -1, 0, &o)); }
|
||||
|
||||
Scheme_Object *signal_bad_syntax(int argc, Scheme_Object **argv)
|
||||
{
|
||||
scheme_wrong_syntax(NULL, NULL, argv[0], "bad syntax");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_set_transformer_proc(Scheme_Object *o)
|
||||
{
|
||||
if (SAME_TYPE(SCHEME_TYPE(o), scheme_set_macro_type))
|
||||
return SCHEME_PTR_VAL(o);
|
||||
if (SCHEME_STRUCTP(o)) {
|
||||
Scheme_Object *v;
|
||||
v = scheme_struct_type_property_ref(set_transformer_property, o);
|
||||
if (SCHEME_INTP(v)) {
|
||||
v = ((Scheme_Structure *)o)->slots[SCHEME_INT_VAL(v)];
|
||||
if (!is_proc_1(v)) {
|
||||
v = scheme_make_prim_w_arity(signal_bad_syntax,
|
||||
"bad-syntax-set!-transformer",
|
||||
1, 1);
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static Scheme_Object *check_set_transformer_property_value_ok(int argc, Scheme_Object *argv[])
|
||||
{
|
||||
return check_indirect_property_value_ok("guard-for-prop:set!-transformer",
|
||||
is_proc_1,
|
||||
"property value is not an procedure (arity 1) or exact non-negative integer: ",
|
||||
argc, argv);
|
||||
}
|
||||
|
||||
/*========================================================================*/
|
||||
/* struct ops */
|
||||
/*========================================================================*/
|
||||
|
|
|
@ -4816,11 +4816,11 @@ Scheme_Object *scheme_stx_get_module_eq_sym(Scheme_Object *a, Scheme_Object *pha
|
|||
|
||||
Scheme_Object *scheme_stx_module_name(int recur,
|
||||
Scheme_Object **a, Scheme_Object *phase,
|
||||
Scheme_Object **nominal_modidx,
|
||||
Scheme_Object **nominal_name,
|
||||
Scheme_Object **mod_phase,
|
||||
Scheme_Object **src_phase_index,
|
||||
Scheme_Object **nominal_src_phase,
|
||||
Scheme_Object **nominal_modidx, /* how it was imported */
|
||||
Scheme_Object **nominal_name, /* imported as name */
|
||||
Scheme_Object **mod_phase, /* original defn phase level */
|
||||
Scheme_Object **src_phase_index, /* phase level of import from nominal modidx */
|
||||
Scheme_Object **nominal_src_phase, /* phase level of export from nominal modidx */
|
||||
Scheme_Object **lex_env,
|
||||
int *_sealed)
|
||||
/* If module bound, result is module idx, and a is set to source name.
|
||||
|
|
|
@ -1698,12 +1698,12 @@ set_syntax (Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Compile_Info *rec,
|
|||
|
||||
if (SAME_TYPE(SCHEME_TYPE(var), scheme_macro_type)) {
|
||||
/* Redirect to a macro? */
|
||||
if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_set_macro_type)) {
|
||||
if (scheme_is_set_transformer(SCHEME_PTR_VAL(var))) {
|
||||
form = scheme_apply_macro(name, menv, SCHEME_PTR_VAL(var), form, env, scheme_false, rec, drec, 1);
|
||||
|
||||
return scheme_compile_expr(form, env, rec, drec);
|
||||
} else if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_id_macro_type)) {
|
||||
find_name = SCHEME_PTR_VAL(SCHEME_PTR_VAL(var));
|
||||
} else if (scheme_is_rename_transformer(SCHEME_PTR_VAL(var))) {
|
||||
find_name = scheme_rename_transformer_id(SCHEME_PTR_VAL(var));
|
||||
find_name = scheme_stx_cert(find_name, scheme_false, menv, find_name, NULL, 1);
|
||||
SCHEME_USE_FUEL(1);
|
||||
menv = NULL;
|
||||
|
@ -1787,7 +1787,7 @@ set_expand(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Expand_Info *erec,
|
|||
|
||||
if ((erec[drec].depth != 0) && SAME_TYPE(SCHEME_TYPE(var), scheme_macro_type)) {
|
||||
/* Redirect to a macro? */
|
||||
if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_set_macro_type)) {
|
||||
if (scheme_is_set_transformer(SCHEME_PTR_VAL(var))) {
|
||||
|
||||
SCHEME_EXPAND_OBSERVE_ENTER_MACRO(erec[drec].observer, form);
|
||||
|
||||
|
@ -1801,9 +1801,9 @@ set_expand(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Expand_Info *erec,
|
|||
erec[drec].value_name = name;
|
||||
|
||||
return scheme_expand_expr(form, env, erec, drec);
|
||||
} else if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(var)), scheme_id_macro_type)) {
|
||||
} else if (scheme_is_rename_transformer(SCHEME_PTR_VAL(var))) {
|
||||
Scheme_Object *new_name;
|
||||
new_name = SCHEME_PTR_VAL(SCHEME_PTR_VAL(var));
|
||||
new_name = scheme_rename_transformer_id(SCHEME_PTR_VAL(var));
|
||||
new_name = scheme_stx_track(new_name, find_name, find_name);
|
||||
new_name = scheme_stx_cert(new_name, scheme_false, menv, find_name, NULL, 1);
|
||||
find_name = new_name;
|
||||
|
@ -5732,14 +5732,13 @@ static void *eval_letmacro_rhs_k(void)
|
|||
return (void *)eval_letmacro_rhs(a, rhs_env, max_let_depth, rp, phase, certs);
|
||||
}
|
||||
|
||||
|
||||
void scheme_bind_syntaxes(const char *where, Scheme_Object *names, Scheme_Object *a,
|
||||
Scheme_Env *exp_env, Scheme_Object *insp,
|
||||
Scheme_Compile_Expand_Info *rec, int drec,
|
||||
Scheme_Comp_Env *stx_env, Scheme_Comp_Env *rhs_env,
|
||||
int *_pos, Scheme_Object *rename_rib)
|
||||
{
|
||||
Scheme_Object **results, *l;
|
||||
Scheme_Object **results, *l, *a_expr;
|
||||
Scheme_Comp_Env *eenv;
|
||||
Scheme_Object *certs;
|
||||
Resolve_Prefix *rp;
|
||||
|
@ -5795,7 +5794,8 @@ void scheme_bind_syntaxes(const char *where, Scheme_Object *names, Scheme_Object
|
|||
|
||||
SCHEME_EXPAND_OBSERVE_NEXT(rec[drec].observer);
|
||||
|
||||
a = eval_letmacro_rhs(a, rhs_env, ri->max_let_depth, rp, eenv->genv->phase, certs);
|
||||
a_expr = a;
|
||||
a = eval_letmacro_rhs(a_expr, rhs_env, ri->max_let_depth, rp, eenv->genv->phase, certs);
|
||||
|
||||
if (SAME_OBJ(a, SCHEME_MULTIPLE_VALUES)) {
|
||||
vc = scheme_current_thread->ku.multiple.count;
|
||||
|
@ -5846,9 +5846,9 @@ void scheme_bind_syntaxes(const char *where, Scheme_Object *names, Scheme_Object
|
|||
|
||||
scheme_set_local_syntax(i++, name, macro, stx_env);
|
||||
|
||||
if (SAME_TYPE(SCHEME_TYPE(SCHEME_PTR_VAL(macro)), scheme_id_macro_type)) {
|
||||
if (scheme_is_binding_rename_transformer(SCHEME_PTR_VAL(macro))) {
|
||||
/* Install a free-id=? rename */
|
||||
scheme_install_free_id_rename(name, SCHEME_PTR1_VAL(SCHEME_PTR_VAL(macro)), rename_rib,
|
||||
scheme_install_free_id_rename(name, scheme_rename_transformer_id(SCHEME_PTR_VAL(macro)), rename_rib,
|
||||
scheme_make_integer(rhs_env->genv->phase));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user