diff --git a/collects/compiler/decompile.ss b/collects/compiler/decompile.ss index 4fc5259255..99336c5e37 100644 --- a/collects/compiler/decompile.ss +++ b/collects/compiler/decompile.ss @@ -57,7 +57,8 @@ (values (append (map (lambda (tl) (match tl - [(? symbol?) '#%linkage] + [#f '#%linkage] + [(? symbol?) (string->symbol (format "_~a" tl))] [(struct global-bucket (name)) (string->symbol (format "_~a" name))] [(struct module-variable (modidx sym pos phase)) diff --git a/collects/compiler/zo-parse.ss b/collects/compiler/zo-parse.ss index 5794a0d3bc..41366dafdb 100644 --- a/collects/compiler/zo-parse.ss +++ b/collects/compiler/zo-parse.ss @@ -85,15 +85,10 @@ (define (read-variable v) (if (symbol? v) (make-global-bucket v) - (let-values ([(phase modname varname) - (match v - [(list* phase modname varname) - (values phase modname varname)] - [(list* modname varname) - (values 0 modname varname)])]) - (if (and (zero? phase) (eq? modname '#%kernel)) - (error 'bucket "var ~a" varname) - (make-module-variable modname varname -1 phase))))) + (error "expected a symbol"))) + +(define (do-not-read-variable v) + (error "should not get here")) (define (read-compilation-top v) (match v @@ -198,6 +193,7 @@ ,rename ,max-let-depth ,dummy ,prefix ,kernel-exclusion ,reprovide-kernel? ,indirect-provides ,num-indirect-provides + ,indirect-syntax-provides ,num-indirect-syntax-provides ,indirect-et-provides ,num-indirect-et-provides ,protects ,et-protects ,provide-phase-count . ,rest) @@ -282,7 +278,7 @@ (cons 'with-cont-mark-type read-with-cont-mark) (cons 'quote-syntax-type read-topsyntax) (cons 'variable-type read-variable) - (cons 'module-variable-type read-variable) + (cons 'module-variable-type do-not-read-variable) (cons 'compilation-top-type read-compilation-top) (cons 'case-lambda-sequence-type read-case-lambda) (cons 'begin0-sequence-type read-sequence) @@ -719,7 +715,11 @@ (let ([mod (read-compact cp)] [var (read-compact cp)] [pos (read-compact-number cp)]) - (make-module-variable mod var pos 0))] + (let-values ([(mod-phase pos) + (if (= pos -2) + (values 1 (read-compact-number cp)) + (values 0 pos))]) + (make-module-variable mod var pos mod-phase)))] [(local-unbox) (let* ([p* (read-compact-number cp)] [p (if (< p* 0) diff --git a/collects/games/cards/cards.scrbl b/collects/games/cards/cards.scrbl index 556a0a292f..6fa97b5513 100644 --- a/collects/games/cards/cards.scrbl +++ b/collects/games/cards/cards.scrbl @@ -198,7 +198,8 @@ Removes @scheme[card] from the table.} @defmethod[(move-cards [cards (listof (is-a?/c card<%>))] [x real?] [y real?] - [offset-proc (exact-nonnegative-integer? . -> . (values real? real?)) + [offset-proc (exact-nonnegative-integer? + . -> . (values real? real?)) (lambda (i) (values 0 0))]) void?]{ diff --git a/collects/handin-server/checker.ss b/collects/handin-server/checker.ss index 8d7e7e2b0c..9537aadc37 100644 --- a/collects/handin-server/checker.ss +++ b/collects/handin-server/checker.ss @@ -653,7 +653,7 @@ (and (procedure? proc) (procedure-arity-includes? proc arity))) (define (get-namespace evaluator) - (call-in-sandbox-context evaluator (lambda () (current-namespace)))) + (call-in-sandbox-context evaluator current-namespace)) ;; checks that ids are defined, either as variables or syntaxes (provide !defined) diff --git a/collects/handin-server/sandbox.ss b/collects/handin-server/sandbox.ss index a1f972fd08..5656a022e9 100644 --- a/collects/handin-server/sandbox.ss +++ b/collects/handin-server/sandbox.ss @@ -8,6 +8,7 @@ (sandbox-error-output #f) ;; no limits -- the handin server uses per-session limits +(sandbox-memory-limit #f) (sandbox-eval-limits #f) ;; share these with evaluators diff --git a/collects/macro-debugger/model/deriv-find.ss b/collects/macro-debugger/model/deriv-find.ss index 5de9f5c07a..5211c22f98 100644 --- a/collects/macro-debugger/model/deriv-find.ss +++ b/collects/macro-debugger/model/deriv-find.ss @@ -2,12 +2,14 @@ #lang scheme/base (require scheme/match scheme/list + syntax/stx "deriv-c.ss" "deriv-util.ss") (provide find-derivs find-deriv find-derivs/syntax extract-all-fresh-names + compute-shift-table flatten-identifiers) ;; Utilities for finding subderivations @@ -126,8 +128,12 @@ (lambda _ #f) d)) -;; extract-all-fresh-names : Derivation -> syntaxlike +;; extract-all-fresh-names : Derivation -> (listof identifier) (define (extract-all-fresh-names d) + (define ht (make-hasheq)) + (define (add stxish) + (for-each (lambda (id) (hash-set! ht id #t)) + (flatten-identifiers stxish))) (define (renaming-node? x) (or (p:lambda? x) ;;(p:case-lambda? x) @@ -142,69 +148,83 @@ (define (extract-fresh-names d) (match d [(Wrap p:lambda (e1 e2 rs ?1 renames body)) - (if renames - (with-syntax ([(?formals . ?body) renames]) - #'?formals) - null)] + (when renames + (with-syntax ([(?formals . ?body) renames]) + (add #'?formals)))] [(Wrap clc (_ renames _)) - (if renames - (with-syntax ([(?formals . ?body) renames]) - #'?formals) - null)] + (when renames + (with-syntax ([(?formals . ?body) renames]) + (add #'?formals)))] [(Wrap p:let-values (e1 e2 rs ?1 renames rhss body)) - (if renames - (with-syntax ([(((?vars ?rhs) ...) . ?body) renames]) - #'(?vars ...)) - null)] + (when renames + (with-syntax ([(((?vars ?rhs) ...) . ?body) renames]) + (add #'(?vars ...))))] [(Wrap p:letrec-values (e1 e2 rs ?1 renames rhss body)) - (if renames - (with-syntax ([(((?vars ?rhs) ...) . ?body) renames]) - #'(?vars ...)) - null)] - [(Wrap p:letrec-syntaxes+values (e1 e2 rs ?1 srenames srhss vrenames vrhss body _)) - (cons - (if srenames - (with-syntax ([(((?svars ?srhs) ...) ((?vvars ?vrhs) ...) . ?body) - srenames]) - #'(?svars ... ?vvars ...)) - null) - (if vrenames - (with-syntax ([(((?vvars ?vrhs) ...) . ?body) vrenames]) - #'(?vvars ...)) - null))] + (when renames + (with-syntax ([(((?vars ?rhs) ...) . ?body) renames]) + (add #'(?vars ...))))] + [(Wrap p:letrec-syntaxes+values (e1 e2 rs ?1 srenames srhss vrenames _ _ _)) + (when srenames + (with-syntax ([(((?svars ?srhs) ...) ((?vvars ?vrhs) ...) . ?body) + srenames]) + (add #'(?svars ... ?vvars ...)))) + (when vrenames + (with-syntax ([(((?vvars ?vrhs) ...) . ?body) vrenames]) + (add #'(?vvars ...))))] [(Wrap b:defvals (rename head ?1 rename2 ?2)) (let ([head-e2 (wderiv-e2 head)]) - (if head-e2 - (with-syntax ([(?dv ?vars ?rhs) head-e2]) - #'?vars) - null))] + (when head-e2 + (with-syntax ([(?dv ?vars ?rhs) head-e2]) + (add #'?vars))))] [(Wrap b:defstx (rename head ?1 rename2 ?2 rhs)) (let ([head-e2 (wderiv-e2 head)]) - (if head-e2 - (with-syntax ([(?ds ?svars ?rhs) head-e2]) - #'?svars) - null))] + (when head-e2 + (with-syntax ([(?ds ?svars ?rhs) head-e2]) + (add #'?svars))))] [(Wrap p:define-values (e1 e2 rs ?1 rhs)) - (if rhs - (with-syntax ([(?dv ?vars ?rhs) e1]) - #'?vars) - null)] + (when rhs + (with-syntax ([(?dv ?vars ?rhs) e1]) + (add #'?vars)))] [(Wrap p:define-syntaxes (e1 e2 rs ?1 rhs _)) - (if rhs - (with-syntax ([(?ds ?svars ?srhs) e1]) - #'?svars) - null)] - [_ null])) + (when rhs + (with-syntax ([(?ds ?svars ?srhs) e1]) + (add #'?svars)))] + [_ (void)])) + (define renaming-forms + (find-deriv/unit+join+zero renaming-node? + (lambda (d) #f) + d + list + append + null)) + (for ([rf renaming-forms]) + (extract-fresh-names rf)) + (hash-map ht (lambda (k v) k))) - (let ([all-renaming-forms - (find-deriv/unit+join+zero - renaming-node? - (lambda (d) #f) - d - list - append - null)]) - (flatten-identifiers (map extract-fresh-names all-renaming-forms)))) +;; compute-shift-table : deriv -> hash[id => (listof id)] +(define (compute-shift-table d) + (define ht (make-hasheq)) + (define module-forms + (find-derivs p:module? (lambda _ #f) d)) + (define module-shift-renamers + (for/list ([mf module-forms]) + (let ([shift (p:module-shift mf)] + [body (p:module-body mf)]) + (and shift body + (with-syntax ([(_module _name _lang shifted-body) shift]) + (add-rename-mapping ht (wderiv-e2 body) #'shifted-body)))))) + ht) + +(define (add-rename-mapping ht from to) + (define (loop from to) + (cond [(and (stx-pair? from) (stx-pair? to)) + (loop (stx-car from) (stx-car to)) + (loop (stx-cdr from) (stx-cdr to))] + [(and (identifier? from) (identifier? to)) + (hash-set! ht from (cons to (hash-ref ht from null)))] + [else (void)])) + (loop from to) + (void)) ;; flatten-identifiers : syntaxlike -> (list-of identifier) (define (flatten-identifiers stx) diff --git a/collects/macro-debugger/syntax-browser/display.ss b/collects/macro-debugger/syntax-browser/display.ss index e61b9efcff..79ade18f4d 100644 --- a/collects/macro-debugger/syntax-browser/display.ss +++ b/collects/macro-debugger/syntax-browser/display.ss @@ -75,22 +75,32 @@ ;; get-range : -> range<%> (define/public (get-range) range) - + ;; highlight-syntaxes : (list-of syntax) string -> void (define/public (highlight-syntaxes stxs hi-color) (let ([style-delta (highlight-style-delta hi-color #f)]) - (for-each (lambda (stx) (hash-set! extra-styles stx style-delta)) - stxs)) + (for ([stx stxs]) + (add-extra-styles stx (list style-delta)))) (refresh)) + ;; underline-syntaxes : (listof syntax) -> void + (define/public (underline-syntaxes stxs) + (for ([stx stxs]) + (add-extra-styles stx (list underline-style-delta))) + (refresh)) + + (define/public (add-extra-styles stx styles) + (hash-set! extra-styles stx + (append (hash-ref extra-styles stx null) + styles))) + ;; apply-extra-styles : -> void ;; Applies externally-added styles (such as highlighting) (define/private (apply-extra-styles) - (hash-for-each - extra-styles - (lambda (hi-stx style-delta) - (let ([rs (send range get-ranges hi-stx)]) - (for-each (lambda (r) (restyle-range r style-delta)) rs))))) + (for ([(stx style-deltas) extra-styles]) + (for ([r (send range get-ranges stx)]) + (for ([style-delta style-deltas]) + (restyle-range r style-delta))))) ;; apply-secondary-partition-styles : selected-syntax -> void ;; If the selected syntax is an identifier, then styles all identifiers @@ -243,6 +253,11 @@ (send sd set-weight-off 'bold)) sd)) +(define underline-style-delta + (let ([sd (new style-delta%)]) + (send sd set-underlined-on #t) + sd)) + (define selection-color "yellow") (define subselection-color "yellow") diff --git a/collects/macro-debugger/syntax-browser/prefs.ss b/collects/macro-debugger/syntax-browser/prefs.ss index 99cc06765d..2ef4287f9c 100644 --- a/collects/macro-debugger/syntax-browser/prefs.ss +++ b/collects/macro-debugger/syntax-browser/prefs.ss @@ -5,7 +5,8 @@ "interfaces.ss" "../util/notify.ss" "../util/misc.ss") -(provide syntax-prefs-base% +(provide prefs-base% + syntax-prefs-base% syntax-prefs% syntax-prefs/readonly%) @@ -19,7 +20,7 @@ (pref:get/set pref:props-percentage SyntaxBrowser:PropertiesPanelPercentage) (pref:get/set pref:props-shown? SyntaxBrowser:PropertiesPanelShown) -(define syntax-prefs-base% +(define prefs-base% (class object% ;; columns : number (field/notify columns (new notify-box% (value 60))) @@ -41,6 +42,10 @@ "indigo" "purple" "orange" "salmon" "darkgoldenrod" "olive")))) + (super-new))) + +(define syntax-prefs-base% + (class prefs-base% ;; width, height : number (notify-methods width) (notify-methods height) diff --git a/collects/macro-debugger/syntax-browser/syntax-snip.ss b/collects/macro-debugger/syntax-browser/syntax-snip.ss index 538d4e7675..87cda8994b 100644 --- a/collects/macro-debugger/syntax-browser/syntax-snip.ss +++ b/collects/macro-debugger/syntax-browser/syntax-snip.ss @@ -1,363 +1,359 @@ -(module syntax-snip mzscheme - (require mzlib/class - mred - framework - mzlib/match - mzlib/list - mzlib/string - "../util/notify.ss" - "interfaces.ss" - "display.ss" - "controller.ss" - "keymap.ss" - "properties.ss" - "partition.ss" - "prefs.ss") +#lang scheme/base +(require scheme/class + scheme/match + scheme/list + mzlib/string + mred + framework + "../util/notify.ss" + "interfaces.ss" + "display.ss" + "controller.ss" + "keymap.ss" + "properties.ss" + "partition.ss" + "prefs.ss") - (provide syntax-snip% - syntax-value-snip%) +(provide syntax-snip% + syntax-value-snip%) - (define syntax-snip-config-base% - (class object% - (notify-methods props-shown?) - (super-new))) - (define syntax-snip-config% - (class syntax-snip-config-base% - (define/override (init-props-shown?) (new notify-box% (value #f))) - (super-new))) +(define syntax-snip-config-base% + (class prefs-base% + (notify-methods props-shown?) + (super-new))) - (define dumb-host% - (class object% - (define controller (new controller%)) - (define config (new syntax-snip-config%)) - (super-new) - (define/public (get-controller) controller) - (define/public (get-config) config) - (define/public (add-keymap text snip) - (send text set-keymap - (new syntax-keymap% - (controller controller) - (editor text) - (config config)))))) +(define syntax-snip-config% + (class syntax-snip-config-base% + (define/override (init-props-shown?) (new notify-box% (value #f))) + (super-new))) - ;; syntax-value-snip% - (define syntax-value-snip% - (class* editor-snip% (readable-snip<%>) - (init-field ((stx syntax))) - (init-field (host (new dumb-host%))) - (inherit set-margin - set-inset) +;; syntax-value-snip% +(define syntax-value-snip% + (class* editor-snip% (readable-snip<%>) + (init-field ((stx syntax))) + (init-field (controller (new controller%))) + (init-field (config (new syntax-snip-config%))) - (define text (new text:standard-style-list%)) - (super-new (editor text) (with-border? #f)) + (inherit set-margin + set-inset) - (set-margin 0 0 0 0) - ;;(set-inset 2 2 2 2) - ;;(set-margin 2 2 2 2) - (set-inset 0 0 0 0) + (define text (new text:standard-style-list%)) + (super-new (editor text) (with-border? #f)) - (send text begin-edit-sequence) - (send text change-style (make-object style-delta% 'change-alignment 'top)) - (define display - (print-syntax-to-editor stx text - (send host get-controller) - (send host get-config))) - (send text lock #t) - (send text end-edit-sequence) - (send text hide-caret #t) + (set-margin 0 0 0 0) + ;;(set-inset 2 2 2 2) + ;;(set-margin 2 2 2 2) + (set-inset 0 0 0 0) - (send host add-keymap text this) + (send text begin-edit-sequence) + (send text change-style (make-object style-delta% 'change-alignment 'top)) + (define display + (print-syntax-to-editor stx text controller config)) + (send text lock #t) + (send text end-edit-sequence) + (send text hide-caret #t) - ;; snip% Methods - (define/override (copy) - (new syntax-value-snip% (host host) (syntax stx))) + (setup-keymap text) - ;; read-special : any number/#f number/#f number/#f -> syntax - ;; Produces 3D syntax to preserve eq-ness of syntax - ;; #'#'stx would be lose identity when wrapped - (define/public (read-special src line col pos) - (with-syntax ([p (lambda () stx)]) - #'(p))) - )) + (define/public (setup-keymap text) + (new syntax-keymap% + (controller controller) + (config config) + (editor text))) - (define top-aligned - (make-object style-delta% 'change-alignment 'top)) + ;; snip% Methods + (define/override (copy) + (new syntax-value-snip% + (config config) + (controller controller) + (syntax stx))) - (define-struct styled (contents style clickback)) + ;; read-special : any number/#f number/#f number/#f -> syntax + ;; Produces 3D syntax to preserve eq-ness of syntax + ;; #'#'stx would be lose identity when wrapped + (define/public (read-special src line col pos) + (with-syntax ([p (lambda () stx)]) + #'(p))) + )) - ;; clicky-snip% - (define clicky-snip% - (class* editor-snip% () +(define top-aligned + (make-object style-delta% 'change-alignment 'top)) - (init-field [open-style '(border)] - [closed-style '(tight-text-fit)]) +(define-struct styled (contents style clickback)) - (inherit set-margin - set-inset - set-snipclass - set-tight-text-fit - show-border - get-admin) +;; clicky-snip% +(define clicky-snip% + (class* editor-snip% () - (define -outer (new text%)) - (super-new (editor -outer) (with-border? #f)) - (set-margin 2 2 2 2) - (set-inset 2 2 2 2) - ;;(set-margin 3 0 0 0) - ;;(set-inset 1 0 0 0) - ;;(set-margin 0 0 0 0) - ;;(set-inset 0 0 0 0) + (init-field [open-style '(border)] + [closed-style '(tight-text-fit)]) - (define/public (closed-contents) null) - (define/public (open-contents) null) + (inherit set-margin + set-inset + set-snipclass + set-tight-text-fit + show-border + get-admin) - (define open? #f) + (define -outer (new text%)) + (super-new (editor -outer) (with-border? #f)) + (set-margin 2 2 2 2) + (set-inset 2 2 2 2) + ;;(set-margin 3 0 0 0) + ;;(set-inset 1 0 0 0) + ;;(set-margin 0 0 0 0) + ;;(set-inset 0 0 0 0) - (define/public (refresh-contents) - (send* -outer - (begin-edit-sequence) - (lock #f) - (erase)) - (do-style (if open? open-style closed-style)) - (outer:insert (if open? (hide-icon) (show-icon)) - style:hyper - (if open? - (lambda _ - (set! open? #f) - (refresh-contents)) - (lambda _ - (set! open? #t) - (refresh-contents)))) - (for-each (lambda (s) (outer:insert s)) - (if open? (open-contents) (closed-contents))) - (send* -outer - (change-style top-aligned 0 (send -outer last-position)) - (lock #t) - (end-edit-sequence))) + (define/public (closed-contents) null) + (define/public (open-contents) null) - (define/private (do-style style) - (show-border (memq 'border style)) - (set-tight-text-fit (memq 'tight-text-fit style))) + (define open? #f) - (define/private outer:insert - (case-lambda - [(obj) - (if (styled? obj) - (outer:insert (styled-contents obj) - (styled-style obj) - (styled-clickback obj)) - (outer:insert obj style:normal))] - [(text style) - (outer:insert text style #f)] - [(text style clickback) - (let ([start (send -outer last-position)]) - (send -outer insert text) - (let ([end (send -outer last-position)]) - (send -outer change-style style start end #f) - (when clickback - (send -outer set-clickback start end clickback))))])) + (define/public (refresh-contents) + (send* -outer + (begin-edit-sequence) + (lock #f) + (erase)) + (do-style (if open? open-style closed-style)) + (outer:insert (if open? (hide-icon) (show-icon)) + style:hyper + (if open? + (lambda _ + (set! open? #f) + (refresh-contents)) + (lambda _ + (set! open? #t) + (refresh-contents)))) + (for-each (lambda (s) (outer:insert s)) + (if open? (open-contents) (closed-contents))) + (send* -outer + (change-style top-aligned 0 (send -outer last-position)) + (lock #t) + (end-edit-sequence))) - (send -outer hide-caret #t) - (send -outer lock #t) - (refresh-contents) - )) + (define/private (do-style style) + (show-border (memq 'border style)) + (set-tight-text-fit (memq 'tight-text-fit style))) - ;; syntax-snip% - (define syntax-snip% - (class* clicky-snip% (readable-snip<%>) - (init-field ((stx syntax))) - (init-field (host (new dumb-host%))) - (define config (send host get-config)) - (inherit set-snipclass - refresh-contents) + (define/private outer:insert + (case-lambda + [(obj) + (if (styled? obj) + (outer:insert (styled-contents obj) + (styled-style obj) + (styled-clickback obj)) + (outer:insert obj style:normal))] + [(text style) + (outer:insert text style #f)] + [(text style clickback) + (let ([start (send -outer last-position)]) + (send -outer insert text) + (let ([end (send -outer last-position)]) + (send -outer change-style style start end #f) + (when clickback + (send -outer set-clickback start end clickback))))])) - (define the-syntax-snip - (new syntax-value-snip% - (syntax stx) - (host host))) - (define the-summary - (let* ([t (new text%)] - [es (new editor-snip% (editor t) (with-border? #f))]) - (send es set-margin 0 0 0 0) - (send es set-inset 0 0 0 0) - (send t insert (format "~s" stx)) - es)) + (send -outer hide-caret #t) + (send -outer lock #t) + (refresh-contents) + )) - (define properties-snip - (new properties-container-snip% - (controller (send host get-controller)))) +;; syntax-snip% +(define syntax-snip% + (class* clicky-snip% (readable-snip<%>) + (init-field ((stx syntax))) + (init-field [controller (new controller%)]) + (init-field [config (new syntax-snip-config%)]) - (define/override (closed-contents) - (list the-summary)) + (inherit set-snipclass + refresh-contents) - (define/override (open-contents) - (list " " - the-syntax-snip - " " - properties-snip)) + (define the-syntax-snip + (new syntax-value-snip% + (syntax stx) + (controller controller) + (config config))) + (define the-summary + (let* ([t (new text%)] + [es (new editor-snip% (editor t) (with-border? #f))]) + (send es set-margin 0 0 0 0) + (send es set-inset 0 0 0 0) + (send t insert (format "~s" stx)) + es)) - ;; Snip methods - (define/override (copy) - (new syntax-snip% (syntax stx))) - (define/override (write stream) - (send stream put - (string->bytes/utf-8 - (format "~s" (marshall-syntax stx))))) - (define/public (read-special src line col pos) - (send the-syntax-snip read-special src line col pos)) + (define properties-snip + (new properties-container-snip% + (controller controller))) - (send config listen-props-shown? - (lambda (?) (refresh-contents))) + (define/override (closed-contents) + (list the-summary)) - (super-new) - (set-snipclass snip-class))) + (define/override (open-contents) + (list " " + the-syntax-snip + " " + properties-snip)) + ;; Snip methods + (define/override (copy) + (new syntax-snip% (syntax stx))) + (define/override (write stream) + (send stream put + (string->bytes/utf-8 + (format "~s" (marshall-syntax stx))))) + (define/public (read-special src line col pos) + (send the-syntax-snip read-special src line col pos)) - (define properties-container-snip% - (class clicky-snip% - (init controller) + (send config listen-props-shown? + (lambda (?) (refresh-contents))) - (define properties-snip - (new properties-snip% (controller controller))) + (super-new) + (set-snipclass snip-class) + )) - (define/override (open-contents) - (list #;(show-properties-icon) - properties-snip)) +(define properties-container-snip% + (class clicky-snip% + (init controller) - (define/override (closed-contents) - (list (show-properties-icon))) + (define properties-snip + (new properties-snip% (controller controller))) - (super-new (open-style '()) - (closed-style '())))) + (define/override (open-contents) + (list #;(show-properties-icon) + properties-snip)) - (define style:normal (make-object style-delta% 'change-normal)) - (define style:hyper - (let ([s (make-object style-delta% 'change-normal)]) - (send s set-delta 'change-toggle-underline) - (send s set-delta-foreground "blue") - s)) - (define style:green - (let ([s (make-object style-delta% 'change-normal)]) - (send s set-delta-foreground "darkgreen") - s)) - (define style:bold - (let ([s (make-object style-delta% 'change-normal)]) - (send s set-delta 'change-bold) - s)) + (define/override (closed-contents) + (list (show-properties-icon))) - (define (show-icon) - (make-object image-snip% - (build-path (collection-path "icons") "turn-up.png"))) - (define (hide-icon) - (make-object image-snip% - (build-path (collection-path "icons") "turn-down.png"))) + (super-new (open-style '()) + (closed-style '())))) - (define (show-properties-icon) - (make-object image-snip% - (build-path (collection-path "icons") "syncheck.png"))) +(define style:normal (make-object style-delta% 'change-normal)) +(define style:hyper + (let ([s (make-object style-delta% 'change-normal)]) + (send s set-delta 'change-toggle-underline) + (send s set-delta-foreground "blue") + s)) +(define style:green + (let ([s (make-object style-delta% 'change-normal)]) + (send s set-delta-foreground "darkgreen") + s)) +(define style:bold + (let ([s (make-object style-delta% 'change-normal)]) + (send s set-delta 'change-bold) + s)) - ;; marshall-syntax : syntax -> printable - (define (marshall-syntax stx) - (unless (syntax? stx) - (error 'marshall-syntax "not syntax: ~s\n" stx)) - `(syntax - (source ,(marshall-object (syntax-source stx))) - (source-module ,(marshall-object (syntax-source-module stx))) - (position ,(syntax-position stx)) - (line ,(syntax-line stx)) - (column ,(syntax-column stx)) - (span ,(syntax-span stx)) - (original? ,(syntax-original? stx)) - (properties - ,@(map (λ (x) `(,x ,(marshall-object (syntax-property stx x)))) - (syntax-property-symbol-keys stx))) - (contents - ,(marshall-object (syntax-e stx))))) +(define (show-icon) + (make-object image-snip% + (build-path (collection-path "icons") "turn-up.png"))) +(define (hide-icon) + (make-object image-snip% + (build-path (collection-path "icons") "turn-down.png"))) - ;; marshall-object : any -> printable - ;; really only intended for use with marshall-syntax - (define (marshall-object obj) - (cond - [(syntax? obj) (marshall-syntax obj)] - [(pair? obj) - `(pair ,(cons (marshall-object (car obj)) - (marshall-object (cdr obj))))] - [(or (symbol? obj) - (char? obj) - (number? obj) - (string? obj) - (boolean? obj) - (null? obj)) - `(other ,obj)] - [else (string->symbol (format "unknown-object: ~s" obj))])) +(define (show-properties-icon) + (make-object image-snip% + (build-path (collection-path "icons") "syncheck.png"))) - ;; COPIED AND MODIFIED from mrlib/syntax-browser.ss - (define syntax-snipclass% - (class snip-class% - (define/override (read stream) - (make-object syntax-snip% - (unmarshall-syntax (read-from-string (send stream get-bytes))))) - (super-instantiate ()))) +;; marshall-syntax : syntax -> printable +(define (marshall-syntax stx) + (unless (syntax? stx) + (error 'marshall-syntax "not syntax: ~s\n" stx)) + `(syntax + (source ,(marshall-object (syntax-source stx))) + (source-module ,(marshall-object (syntax-source-module stx))) + (position ,(syntax-position stx)) + (line ,(syntax-line stx)) + (column ,(syntax-column stx)) + (span ,(syntax-span stx)) + (original? ,(syntax-original? stx)) + (properties + ,@(map (λ (x) `(,x ,(marshall-object (syntax-property stx x)))) + (syntax-property-symbol-keys stx))) + (contents + ,(marshall-object (syntax-e stx))))) - (define snip-class (make-object syntax-snipclass%)) - (send snip-class set-version 2) - (send snip-class set-classname - (format "~s" '(lib "implementation.ss" "macro-debugger" "syntax-browser"))) - (send (get-the-snip-class-list) add snip-class) +;; marshall-object : any -> printable +;; really only intended for use with marshall-syntax +(define (marshall-object obj) + (cond + [(syntax? obj) (marshall-syntax obj)] + [(pair? obj) + `(pair ,(cons (marshall-object (car obj)) + (marshall-object (cdr obj))))] + [(or (symbol? obj) + (char? obj) + (number? obj) + (string? obj) + (boolean? obj) + (null? obj)) + `(other ,obj)] + [else (string->symbol (format "unknown-object: ~s" obj))])) - (define (unmarshall-syntax stx) - (match stx - [`(syntax - (source ,src) - (source-module ,source-module) ;; marshalling - (position ,pos) - (line ,line) - (column ,col) - (span ,span) - (original? ,original?) - (properties ,@(properties ...)) - (contents ,contents)) - (foldl - add-properties - (datum->syntax-object - #'here ;; ack - (unmarshall-object contents) - (list (unmarshall-object src) - line - col - pos - span)) - properties)] - [else #'unknown-syntax-object])) - - ;; add-properties : syntax any -> syntax - (define (add-properties prop-spec stx) - (match prop-spec - [`(,(and sym (? symbol?)) - ,prop) - (syntax-property stx sym (unmarshall-object prop))] - [else stx])) - - (define (unmarshall-object obj) - (let ([unknown (lambda () (string->symbol (format "unknown: ~s" obj)))]) - (if (and (pair? obj) - (symbol? (car obj))) - (case (car obj) - [(pair) - (if (pair? (cdr obj)) - (let ([raw-obj (cadr obj)]) - (if (pair? raw-obj) - (cons (unmarshall-object (car raw-obj)) - (unmarshall-object (cdr raw-obj))) - (unknown))) - (unknown))] - [(other) - (if (pair? (cdr obj)) - (cadr obj) - (unknown))] - [(syntax) (unmarshall-syntax obj)] - [else (unknown)]) - (unknown)))) +;; COPIED AND MODIFIED from mrlib/syntax-browser.ss +(define syntax-snipclass% + (class snip-class% + (define/override (read stream) + (make-object syntax-snip% + (unmarshall-syntax (read-from-string (send stream get-bytes))))) + (super-instantiate ()))) - ) +(define snip-class (make-object syntax-snipclass%)) +(send snip-class set-version 2) +(send snip-class set-classname + (format "~s" '(lib "implementation.ss" "macro-debugger" "syntax-browser"))) +(send (get-the-snip-class-list) add snip-class) + +(define (unmarshall-syntax stx) + (match stx + [`(syntax + (source ,src) + (source-module ,source-module) ;; marshalling + (position ,pos) + (line ,line) + (column ,col) + (span ,span) + (original? ,original?) + (properties . ,properties) + (contents ,contents)) + (foldl + add-properties + (datum->syntax + #'here ;; ack + (unmarshall-object contents) + (list (unmarshall-object src) + line + col + pos + span)) + properties)] + [else #'unknown-syntax-object])) + +;; add-properties : syntax any -> syntax +(define (add-properties prop-spec stx) + (match prop-spec + [`(,(and sym (? symbol?)) + ,prop) + (syntax-property stx sym (unmarshall-object prop))] + [else stx])) + +(define (unmarshall-object obj) + (let ([unknown (lambda () (string->symbol (format "unknown: ~s" obj)))]) + (if (and (pair? obj) + (symbol? (car obj))) + (case (car obj) + [(pair) + (if (pair? (cdr obj)) + (let ([raw-obj (cadr obj)]) + (if (pair? raw-obj) + (cons (unmarshall-object (car raw-obj)) + (unmarshall-object (cdr raw-obj))) + (unknown))) + (unknown))] + [(other) + (if (pair? (cdr obj)) + (cadr obj) + (unknown))] + [(syntax) (unmarshall-syntax obj)] + [else (unknown)]) + (unknown)))) diff --git a/collects/macro-debugger/syntax-browser/widget.ss b/collects/macro-debugger/syntax-browser/widget.ss index 3d0966cbdf..3b0a36bfa1 100644 --- a/collects/macro-debugger/syntax-browser/widget.ss +++ b/collects/macro-debugger/syntax-browser/widget.ss @@ -1,11 +1,10 @@ -#lang mzscheme +#lang scheme/base (require scheme/class mred framework/framework scheme/list scheme/match - mzlib/kw syntax/boundmap "interfaces.ss" "controller.ss" @@ -14,7 +13,8 @@ "hrule-snip.ss" "properties.ss" "text.ss" - "util.ss") + "util.ss" + "../util/mpi.ss") (provide widget%) ;; widget% @@ -104,63 +104,73 @@ (send -text set-clickback a b handler) (send -text change-style clickback-style a b))))) - (define/public add-syntax - (lambda/kw (stx #:key [hi-stxs null] hi-color alpha-table [definites null] - hi2-color [hi2-stxs null]) - (define (get-binder id) + (define/public (add-syntax stx + #:binder-table [alpha-table #f] + #:shift-table [shift-table #f] + #:definites [definites null] + #:hi-colors [hi-colors null] + #:hi-stxss [hi-stxss null]) + (define (get-binders id) + (define binder (module-identifier-mapping-get alpha-table id (lambda () #f))) - (when (and (pair? hi-stxs) (not hi-color)) - (error 'syntax-widget%::add-syntax "no highlight color specified")) - (let ([display (internal-add-syntax stx)] - [definite-table (make-hash-table)]) - (when (and hi2-color (pair? hi2-stxs)) - (send display highlight-syntaxes hi2-stxs hi2-color)) - (when (and hi-color (pair? hi-stxs)) - (send display highlight-syntaxes hi-stxs hi-color)) - (for-each (lambda (x) (hash-table-put! definite-table x #t)) definites) - (when alpha-table - (let ([range (send display get-range)] - [start (send display get-start-position)]) - (define (adjust n) (+ start n)) - (for-each - (lambda (id) - #; ;; DISABLED - (match (identifier-binding id) - [(list src-mod src-name nom-mod nom-name _) - (for-each (lambda (id-r) - (send -text add-billboard - (adjust (car id-r)) - (adjust (cdr id-r)) - (string-append "from " - (mpi->string src-mod)) - (if (hash-table-get definite-table id #f) - "blue" - "purple"))) - (send range get-ranges id))] - [_ (void)]) + (if shift-table + (cons binder (hash-ref shift-table binder null)) + (list binder))) + (let ([display (internal-add-syntax stx)] + [definite-table (make-hasheq)]) + (for-each (lambda (hi-stxs hi-color) + (send display highlight-syntaxes hi-stxs hi-color)) + hi-stxss + hi-colors) + (for ([definite definites]) + (hash-set! definite-table definite #t) + (when shift-table + (for ([shifted-definite (hash-ref shift-table definite null)]) + (hash-set! definite-table shifted-definite #t)))) + (when alpha-table + (let ([range (send display get-range)] + [start (send display get-start-position)]) + (let* ([binders0 + (module-identifier-mapping-map alpha-table (lambda (k v) k))] + [binders + (apply append (map get-binders binders0))]) + (send display underline-syntaxes binders)) + (for ([id (send range get-identifier-list)]) + (define definite? (hash-ref definite-table id #f)) + (when #f ;; DISABLED + (add-binding-billboard start range id definite?)) + (for ([binder (get-binders id)]) + (for ([binder-r (send range get-ranges binder)]) + (for ([id-r (send range get-ranges id)]) + (add-binding-arrow start binder-r id-r definite?))))))) + display)) - (let ([binder (get-binder id)]) - (when binder - (for-each - (lambda (binder-r) - (for-each (lambda (id-r) - (if (hash-table-get definite-table id #f) - (send -text add-arrow - (adjust (car binder-r)) - (adjust (cdr binder-r)) - (adjust (car id-r)) - (adjust (cdr id-r)) - "blue") - (send -text add-question-arrow - (adjust (car binder-r)) - (adjust (cdr binder-r)) - (adjust (car id-r)) - (adjust (cdr id-r)) - "purple"))) - (send range get-ranges id))) - (send range get-ranges binder))))) - (send range get-identifier-list)))) - display))) + (define/private (add-binding-arrow start binder-r id-r definite?) + (if definite? + (send -text add-arrow + (+ start (car binder-r)) + (+ start (cdr binder-r)) + (+ start (car id-r)) + (+ start (cdr id-r)) + "blue") + (send -text add-question-arrow + (+ start (car binder-r)) + (+ start (cdr binder-r)) + (+ start (car id-r)) + (+ start (cdr id-r)) + "purple"))) + + (define/private (add-binding-billboard start range id definite?) + (match (identifier-binding id) + [(list-rest src-mod src-name nom-mod nom-name _) + (for-each (lambda (id-r) + (send -text add-billboard + (+ start (car id-r)) + (+ start (cdr id-r)) + (string-append "from " (mpi->string src-mod)) + (if definite? "blue" "purple"))) + (send range get-ranges id))] + [_ (void)])) (define/public (add-separator) (with-unlock -text diff --git a/collects/macro-debugger/view/step-display.ss b/collects/macro-debugger/view/step-display.ss new file mode 100644 index 0000000000..7c80955ca2 --- /dev/null +++ b/collects/macro-debugger/view/step-display.ss @@ -0,0 +1,261 @@ + +#lang scheme/base +(require scheme/class + scheme/unit + scheme/list + scheme/match + scheme/gui + framework/framework + syntax/boundmap + "interfaces.ss" + "prefs.ss" + "extensions.ss" + "warning.ss" + "hiding-panel.ss" + "../model/deriv.ss" + "../model/deriv-util.ss" + "../model/deriv-find.ss" + "../model/deriv-parser.ss" + "../model/trace.ss" + "../model/reductions-config.ss" + "../model/reductions.ss" + "../model/steps.ss" + "../util/notify.ss" + "cursor.ss" + "debug-format.ss") +#; +(provide step-display% + step-display<%>) +(provide (all-defined-out)) +;; Struct for one-by-one stepping + +(define-struct (prestep protostep) ()) +(define-struct (poststep protostep) ()) + +(define (prestep-term1 s) (state-term (protostep-s1 s))) +(define (poststep-term2 s) (state-term (protostep-s1 s))) + + +(define step-display<%> + (interface () + ;; add-syntax + add-syntax + + ;; add-step + add-step + + ;; add-error + add-error + + ;; add-final + add-final + + ;; add-internal-error + add-internal-error)) + +(define step-display% + (class* object% (step-display<%>) + + (init-field config) + (init-field ((sbview syntax-widget))) + (super-new) + + (define/public (add-internal-error part exn stx events) + (send sbview add-text + (if part + (format "Macro stepper error (~a)" part) + "Macro stepper error")) + (when (exn? exn) + (send sbview add-text " ") + (send sbview add-clickback "[details]" + (lambda _ (show-internal-error-details exn events)))) + (send sbview add-text ". ") + (when stx (send sbview add-text "Original syntax:")) + (send sbview add-text "\n") + (when stx (send sbview add-syntax stx))) + + (define/private (show-internal-error-details exn events) + (case (message-box/custom "Macro stepper internal error" + (format "Internal error:\n~a" (exn-message exn)) + "Show error" + "Dump debugging file" + "Cancel") + ((1) (queue-callback + (lambda () + (raise exn)))) + ((2) (queue-callback + (lambda () + (let ([file (put-file)]) + (when file + (write-debug-file file exn events)))))) + ((3 #f) (void)))) + + (define/public (add-error exn) + (send sbview add-error-text (exn-message exn)) + (send sbview add-text "\n")) + + (define/public (add-step step + #:binders binders + #:shift-table [shift-table #f]) + (cond [(step? step) + (show-step step binders shift-table)] + [(misstep? step) + (show-misstep step binders shift-table)] + [(prestep? step) + (show-prestep step binders shift-table)] + [(poststep? step) + (show-poststep step binders shift-table)])) + + (define/public (add-syntax stx + #:binders binders + #:shift-table [shift-table #f] + #:definites definites) + (send sbview add-syntax stx + #:binder-table binders + #:shift-table shift-table + #:definites (or definites null))) + + (define/public (add-final stx error + #:binders binders + #:shift-table [shift-table #f] + #:definites definites) + (when stx + (send sbview add-text "Expansion finished\n") + (send sbview add-syntax stx + #:binder-table binders + #:shift-table shift-table + #:definites (or definites null))) + (when error + (add-error error))) + + ;; show-lctx : Step -> void + (define/private (show-lctx step binders shift-table) + (define state (protostep-s1 step)) + (define lctx (state-lctx state)) + (when (pair? lctx) + (send sbview add-text "\n") + (for-each (lambda (bf) + (send sbview add-text + "while executing macro transformer in:\n") + (insert-syntax/redex (bigframe-term bf) + (bigframe-foci bf) + binders + shift-table + (state-uses state) + (state-frontier state))) + (reverse lctx)))) + + ;; separator : Step -> void + (define/private (separator step) + (insert-step-separator (step-type->string (protostep-type step)))) + + ;; separator/small : Step -> void + (define/private (separator/small step) + (insert-step-separator/small + (step-type->string (protostep-type step)))) + + ;; show-step : Step -> void + (define/private (show-step step binders shift-table) + (show-state/redex (protostep-s1 step) binders shift-table) + (separator step) + (show-state/contractum (step-s2 step) binders shift-table) + (show-lctx step binders shift-table)) + + (define/private (show-state/redex state binders shift-table) + (insert-syntax/redex (state-term state) + (state-foci state) + binders + shift-table + (state-uses state) + (state-frontier state))) + + (define/private (show-state/contractum state binders shift-table) + (insert-syntax/contractum (state-term state) + (state-foci state) + binders + shift-table + (state-uses state) + (state-frontier state))) + + ;; show-prestep : Step -> void + (define/private (show-prestep step binders shift-table) + (separator/small step) + (show-state/redex (protostep-s1 step) binders shift-table) + (show-lctx step binders shift-table)) + + ;; show-poststep : Step -> void + (define/private (show-poststep step binders shift-table) + (separator/small step) + (show-state/contractum (protostep-s1 step) binders shift-table) + (show-lctx step binders shift-table)) + + ;; show-misstep : Step -> void + (define/private (show-misstep step binders shift-table) + (define state (protostep-s1 step)) + (show-state/redex state binders shift-table) + (separator step) + (send sbview add-error-text (exn-message (misstep-exn step))) + (send sbview add-text "\n") + (when (exn:fail:syntax? (misstep-exn step)) + (for-each (lambda (e) + (send sbview add-syntax e + #:binder-table binders + #:shift-table shift-table + #:definites (or (state-uses state) null))) + (exn:fail:syntax-exprs (misstep-exn step)))) + (show-lctx step binders shift-table)) + + ;; insert-syntax/color + (define/private (insert-syntax/color stx foci binders shift-table + definites frontier hi-color) + (define highlight-foci? (send config get-highlight-foci?)) + (define highlight-frontier? (send config get-highlight-frontier?)) + (send sbview add-syntax stx + #:definites (or definites null) + #:binder-table binders + #:shift-table shift-table + #:hi-colors (list hi-color + "WhiteSmoke") + #:hi-stxss (list (if highlight-foci? foci null) + (if highlight-frontier? frontier null)))) + + ;; insert-syntax/redex + (define/private (insert-syntax/redex stx foci binders shift-table + definites frontier) + (insert-syntax/color stx foci binders shift-table + definites frontier "MistyRose")) + + ;; insert-syntax/contractum + (define/private (insert-syntax/contractum stx foci binders shift-table + definites frontier) + (insert-syntax/color stx foci binders shift-table + definites frontier "LightCyan")) + + ;; insert-step-separator : string -> void + (define/private (insert-step-separator text) + (send sbview add-text "\n ") + (send sbview add-text + (make-object image-snip% + (build-path (collection-path "icons") + "red-arrow.bmp"))) + (send sbview add-text " ") + (send sbview add-text text) + (send sbview add-text "\n\n")) + + ;; insert-as-separator : string -> void + (define/private (insert-as-separator text) + (send sbview add-text "\n ") + (send sbview add-text text) + (send sbview add-text "\n\n")) + + ;; insert-step-separator/small : string -> void + (define/private (insert-step-separator/small text) + (send sbview add-text " ") + (send sbview add-text + (make-object image-snip% + (build-path (collection-path "icons") + "red-arrow.bmp"))) + (send sbview add-text " ") + (send sbview add-text text) + (send sbview add-text "\n\n")) + )) diff --git a/collects/macro-debugger/view/stepper.ss b/collects/macro-debugger/view/stepper.ss index 830a1c72e1..640e06e5f0 100644 --- a/collects/macro-debugger/view/stepper.ss +++ b/collects/macro-debugger/view/stepper.ss @@ -13,6 +13,7 @@ "warning.ss" "hiding-panel.ss" "term-record.ss" + "step-display.ss" "../model/deriv.ss" "../model/deriv-util.ss" "../model/deriv-find.ss" @@ -95,6 +96,7 @@ (define/public (get-config) config) (define/public (get-controller) sbc) (define/public (get-view) sbview) + (define/public (get-step-displayer) step-displayer) (define/public (get-warnings-area) warnings-area) (define/public (get-macro-hiding-prefs) macro-hiding-prefs) @@ -127,6 +129,9 @@ (define sbview (new stepper-syntax-widget% (parent area) (macro-stepper this))) + (define step-displayer (new step-display% + (config config) + (syntax-widget sbview))) (define sbc (send sbview get-controller)) (define control-pane (new vertical-panel% (parent area) (stretchable-height #f))) diff --git a/collects/macro-debugger/view/term-record.ss b/collects/macro-debugger/view/term-record.ss index 6e08c02ea0..a963906da0 100644 --- a/collects/macro-debugger/view/term-record.ss +++ b/collects/macro-debugger/view/term-record.ss @@ -12,6 +12,7 @@ "extensions.ss" "warning.ss" "hiding-panel.ss" + "step-display.ss" "../model/deriv.ss" "../model/deriv-util.ss" "../model/deriv-find.ss" @@ -26,23 +27,18 @@ (provide term-record%) -;; Struct for one-by-one stepping - -(define-struct (prestep protostep) ()) -(define-struct (poststep protostep) ()) - -(define (prestep-term1 s) (state-term (protostep-s1 s))) -(define (poststep-term2 s) (state-term (protostep-s1 s))) - ;; TermRecords (define term-record% (class object% (init-field stepper) - (init-field [events #f]) (define config (send stepper get-config)) - (define sbview (send stepper get-view)) + (define displayer (send stepper get-step-displayer)) + + ;; Data + + (init-field [events #f]) (init-field [raw-deriv #f]) (define raw-deriv-oops #f) @@ -50,15 +46,18 @@ (define deriv #f) (define deriv-hidden? #f) (define binders #f) + (define shift-table #f) (define raw-steps #f) - (define raw-steps-estx #f) - (define definites #f) - (define error #f) + (define raw-steps-estx #f) ;; #f if raw-steps-exn is exn + (define raw-steps-exn #f) ;; #f if raw-steps-estx is syntax + (define raw-steps-definites #f) (define raw-steps-oops #f) (define steps #f) + ;; -- + (define steps-position #f) (super-new) @@ -74,10 +73,11 @@ (define-guarded-getters (recache-deriv!) [get-deriv deriv] [get-deriv-hidden? deriv-hidden?] - [get-binders binders]) + [get-binders binders] + [get-shift-table shift-table]) (define-guarded-getters (recache-raw-steps!) - [get-definites definites] - [get-error error] + [get-raw-steps-definites raw-steps-definites] + [get-raw-steps-exn raw-steps-exn] [get-raw-steps-oops raw-steps-oops]) (define-guarded-getters (recache-steps!) [get-steps steps]) @@ -92,8 +92,8 @@ (invalidate-steps!) (set! raw-steps #f) (set! raw-steps-estx #f) - (set! definites #f) - (set! error #f) + (set! raw-steps-exn #f) + (set! raw-steps-definites #f) (set! raw-steps-oops #f)) ;; invalidate-synth! : -> void @@ -106,7 +106,8 @@ (invalidate-synth!) (set! deriv #f) (set! deriv-hidden? #f) - (set! binders #f)) + (set! binders #f) + (set! shift-table #f)) ;; recache! : -> void (define/public (recache!) @@ -132,12 +133,14 @@ (when (not d) (set! deriv-hidden? #t)) (when d - (let ([alpha-table (make-module-identifier-mapping)]) + (let ([alpha-table (make-module-identifier-mapping)] + [binder-ids (extract-all-fresh-names d)]) (for-each (lambda (id) (module-identifier-mapping-put! alpha-table id id)) - (extract-all-fresh-names d)) + binder-ids) (set! deriv d) - (set! binders alpha-table)))))))) + (set! binders alpha-table) + (set! shift-table (compute-shift-table d))))))))) ;; recache-synth! : -> void (define/private (recache-synth!) @@ -158,8 +161,8 @@ (reductions+ deriv))]) (set! raw-steps raw-steps*) (set! raw-steps-estx estx*) - (set! error error*) - (set! definites definites*))))))) + (set! raw-steps-exn error*) + (set! raw-steps-definites definites*))))))) ;; recache-steps! : -> void (define/private (recache-steps!) @@ -271,20 +274,19 @@ ;; display-initial-term : -> void (define/public (display-initial-term) - (add-syntax (wderiv-e1 deriv) #f null)) + (send displayer add-syntax (wderiv-e1 deriv) #f null)) ;; display-final-term : -> void (define/public (display-final-term) (recache-steps!) (cond [(syntax? raw-steps-estx) - (add-syntax raw-steps-estx binders definites)] - [(exn? error) - (add-error error)] - [raw-steps-oops - (add-internal-error "steps" raw-steps-oops #f)] - [else - (error 'term-record::display-final-term - "internal error")])) + (send displayer add-syntax raw-steps-estx + #:binders binders + #:shift-table shift-table + #:definites raw-steps-definites)] + [(exn? raw-steps-exn) + (send displayer add-error raw-steps-exn)] + [else (display-oops #f)])) ;; display-step : -> void (define/public (display-step) @@ -292,191 +294,25 @@ (cond [steps (let ([step (cursor:next steps)]) (if step - (add-step step binders) - (add-final raw-steps-estx error binders definites)))] - [raw-steps-oops - (add-internal-error "steps" raw-steps-oops (wderiv-e1 deriv))] + (send displayer add-step step + #:binders binders + #:shift-table shift-table) + (send displayer add-final raw-steps-estx raw-steps-exn + #:binders binders + #:shift-table shift-table + #:definites raw-steps-definites)))] + [else (display-oops #t)])) + + ;; display-oops : boolean -> void + (define/private (display-oops show-syntax?) + (cond [raw-steps-oops + (send displayer add-internal-error + "steps" raw-steps-oops + (and show-syntax? (wderiv-e1 deriv)) + events)] [raw-deriv-oops - (add-internal-error "derivation" raw-deriv-oops #f)] + (send displayer add-internal-error + "derivation" raw-deriv-oops #f events)] [else - (add-internal-error "derivation" #f)])) - - (define/public (add-internal-error part exn stx) - (send sbview add-text - (if part - (format "Macro stepper error (~a)" part) - "Macro stepper error")) - (when (exn? exn) - (send sbview add-text " ") - (send sbview add-clickback "[details]" - (lambda _ (show-internal-error-details exn)))) - (send sbview add-text ". ") - (when stx (send sbview add-text "Original syntax:")) - (send sbview add-text "\n") - (when stx (send sbview add-syntax stx))) - - (define/private (show-internal-error-details exn) - (case (message-box/custom "Macro stepper internal error" - (format "Internal error:\n~a" (exn-message exn)) - "Show error" - "Dump debugging file" - "Cancel") - ((1) (queue-callback - (lambda () - (raise exn)))) - ((2) (queue-callback - (lambda () - (let ([file (put-file)]) - (when file - (write-debug-file file exn events)))))) - ((3 #f) (void)))) - - (define/public (add-error exn) - (send sbview add-error-text (exn-message exn)) - (send sbview add-text "\n")) - - (define/public (add-step step binders) - (cond [(step? step) - (show-step step binders)] - [(misstep? step) - (show-misstep step binders)] - [(prestep? step) - (show-prestep step binders)] - [(poststep? step) - (show-poststep step binders)])) - - (define/public (add-syntax stx binders definites) - (send sbview add-syntax stx - '#:alpha-table binders - '#:definites (or definites null))) - - (define/private (add-final stx error binders definites) - (when stx - (send sbview add-text "Expansion finished\n") - (send sbview add-syntax stx - '#:alpha-table binders - '#:definites (or definites null))) - (when error - (add-error error))) - - ;; show-lctx : Step -> void - (define/private (show-lctx step binders) - (define state (protostep-s1 step)) - (define lctx (state-lctx state)) - (when (pair? lctx) - (send sbview add-text "\n") - (for-each (lambda (bf) - (send sbview add-text - "while executing macro transformer in:\n") - (insert-syntax/redex (bigframe-term bf) - (bigframe-foci bf) - binders - (state-uses state) - (state-frontier state))) - (reverse lctx)))) - - ;; separator : Step -> void - (define/private (separator step) - (insert-step-separator (step-type->string (protostep-type step)))) - - ;; separator/small : Step -> void - (define/private (separator/small step) - (insert-step-separator/small - (step-type->string (protostep-type step)))) - - ;; show-step : Step -> void - (define/private (show-step step binders) - (show-state/redex (protostep-s1 step) binders) - (separator step) - (show-state/contractum (step-s2 step) binders) - (show-lctx step binders)) - - (define/private (show-state/redex state binders) - (insert-syntax/contractum (state-term state) - (state-foci state) - binders - (state-uses state) - (state-frontier state))) - - (define/private (show-state/contractum state binders) - (insert-syntax/contractum (state-term state) - (state-foci state) - binders - (state-uses state) - (state-frontier state))) - - ;; show-prestep : Step -> void - (define/private (show-prestep step binders) - (separator/small step) - (show-state/redex (protostep-s1 step) binders) - (show-lctx step binders)) - - ;; show-poststep : Step -> void - (define/private (show-poststep step binders) - (separator/small step) - (show-state/contractum (protostep-s1 step) binders) - (show-lctx step binders)) - - ;; show-misstep : Step -> void - (define/private (show-misstep step binders) - (define state (protostep-s1 step)) - (show-state/redex state binders) - (separator step) - (send sbview add-error-text (exn-message (misstep-exn step))) - (send sbview add-text "\n") - (when (exn:fail:syntax? (misstep-exn step)) - (for-each (lambda (e) - (send sbview add-syntax e - '#:alpha-table binders - '#:definites (or (state-uses state) null))) - (exn:fail:syntax-exprs (misstep-exn step)))) - (show-lctx step binders)) - - ;; insert-syntax/color : syntax syntaxes identifiers syntaxes string -> void - (define/private (insert-syntax/color stx foci binders definites frontier hi-color) - (send sbview add-syntax stx - '#:definites (or definites null) - '#:alpha-table binders - '#:hi-color hi-color - '#:hi-stxs (if (send config get-highlight-foci?) foci null) - '#:hi2-color "WhiteSmoke" - '#:hi2-stxs (if (send config get-highlight-frontier?) frontier null))) - - ;; insert-syntax/redex : syntax syntaxes identifiers syntaxes -> void - (define/private (insert-syntax/redex stx foci binders definites frontier) - (insert-syntax/color stx foci binders definites frontier "MistyRose")) - - ;; insert-syntax/contractum : syntax syntaxes identifiers syntaxes -> void - (define/private (insert-syntax/contractum stx foci binders definites frontier) - (insert-syntax/color stx foci binders definites frontier "LightCyan")) - - ;; insert-step-separator : string -> void - (define/private (insert-step-separator text) - (send sbview add-text "\n ") - (send sbview add-text - (make-object image-snip% - (build-path (collection-path "icons") - "red-arrow.bmp"))) - (send sbview add-text " ") - (send sbview add-text text) - (send sbview add-text "\n\n")) - - ;; insert-as-separator : string -> void - (define/private (insert-as-separator text) - (send sbview add-text "\n ") - (send sbview add-text text) - (send sbview add-text "\n\n")) - - ;; insert-step-separator/small : string -> void - (define/private (insert-step-separator/small text) - (send sbview add-text " ") - (send sbview add-text - (make-object image-snip% - (build-path (collection-path "icons") - "red-arrow.bmp"))) - (send sbview add-text " ") - (send sbview add-text text) - (send sbview add-text "\n\n")) - - + (error 'term-record::display-oops "internal error")])) )) diff --git a/collects/macro-debugger/view/warning.ss b/collects/macro-debugger/view/warning.ss index 19bd030e83..66c96c9ec1 100644 --- a/collects/macro-debugger/view/warning.ss +++ b/collects/macro-debugger/view/warning.ss @@ -1,131 +1,130 @@ -(module warning mzscheme - (require mzlib/class - mred - framework) - (provide warnings% - stepper-warnings%) - - ;; warnings% - (define warnings% - (class object% - (init parent) - (super-new) +#lang scheme/base +(require scheme/class + mred + framework) +(provide warnings% + stepper-warnings%) - (define super-panel - (new vertical-panel% - (parent parent) - (stretchable-height #f))) - (define main-panel - (new horizontal-panel% - (parent super-panel) - (style '(deleted border)))) - (define label (new message% (parent main-panel) (label "Warnings"))) - (define text (new text:hide-caret/selection% (auto-wrap #t))) - (define ec - (new editor-canvas% - (parent main-panel) - (editor text) - (style '(auto-vscroll auto-hscroll)) - (line-count 3))) - (define dismiss - (new button% - (parent main-panel) - (label "Hide") - (stretchable-height #t) - (callback (lambda _ (show #f))))) - (send text set-autowrap-bitmap #f) - (send text lock #t) - - (define/public (get-text) text) - - (define/public (show ?) - (send super-panel change-children - (lambda _ - (if ? - (list main-panel) - null)))) - - ;; Warning management - (define keys null) - - ;; clear : -> void - (define/public (clear) - (set! keys null) - (send* text - (lock #f) - (erase) - (lock #t)) - (show #f)) - - ;; add : symbol string ... -> void - (define/public (add key . strs) - (unless (memq key keys) - (send text lock #f) - (for-each (lambda (s) (send text insert s)) strs) - (send text insert "\n\n") - (send text scroll-to-position 0) - (send text lock #t) - (show #t))) - - )) - - (define stepper-warnings% - (class warnings% - (super-new) - (inherit add) - - (define/private (add-nonlinearity-warning) - (add - 'nonlinearity - "An opaque macro duplicated one of its subterms. " - "Macro hiding requires opaque macros to use their subterms linearly. " - "The macro stepper is showing the expansion of that macro use.")) - (define/private (add-localactions-warning) - (add - 'localactions - "An opaque macro called local-expand, syntax-local-lift-expression, " - "etc. Macro hiding cannot currently handle local actions. " - "The macro stepper is showing the expansion of that macro use.")) - (define/private (add-lifts-warning) - (add - 'lifts - "A transparent macro called syntax-local-lift-expression or " - "syntax-local-lift-module-end-declaration. " - "The macro stepper is only hiding macro after the " - "lifts are caught.")) +;; warnings% +(define warnings% + (class object% + (init parent) + (super-new) - (define/private (add-lift/let-warning) - (add - 'lift/let - "Lifts occurred during the expansion of phase 1 or higher code. " - "The macro stepper is showing some expansions that should be hidden.")) + (define super-panel + (new vertical-panel% + (parent parent) + (stretchable-height #f))) + (define main-panel + (new horizontal-panel% + (parent super-panel) + (style '(deleted border)))) + (define label (new message% (parent main-panel) (label "Warnings"))) + (define text (new text:hide-caret/selection% (auto-wrap #t))) + (define ec + (new editor-canvas% + (parent main-panel) + (editor text) + (style '(auto-vscroll auto-hscroll)) + (line-count 3))) + (define dismiss + (new button% + (parent main-panel) + (label "Hide") + (stretchable-height #t) + (callback (lambda _ (show #f))))) + (send text set-autowrap-bitmap #f) + (send text lock #t) + + (define/public (get-text) text) + + (define/public (show ?) + (send super-panel change-children + (lambda _ + (if ? + (list main-panel) + null)))) + + ;; Warning management + (define keys null) + + ;; clear : -> void + (define/public (clear) + (set! keys null) + (send* text + (lock #f) + (erase) + (lock #t)) + (show #f)) + + ;; add : symbol string ... -> void + (define/public (add key . strs) + (unless (memq key keys) + (send text lock #f) + (for-each (lambda (s) (send text insert s)) strs) + (send text insert "\n\n") + (send text scroll-to-position 0) + (send text lock #t) + (show #t))) + + )) - (define/private (add-hidden-lift-site-warning) - (add - 'hidden-lift-site - "An opaque macro contained the target of a lifted declaration." - "The macro stepper is showing the expansion of that macro use.")) +(define stepper-warnings% + (class warnings% + (super-new) + (inherit add) + + (define/private (add-nonlinearity-warning) + (add + 'nonlinearity + "An opaque macro duplicated one of its subterms. " + "Macro hiding requires opaque macros to use their subterms linearly. " + "The macro stepper is showing the expansion of that macro use.")) + (define/private (add-localactions-warning) + (add + 'localactions + "An opaque macro called local-expand, syntax-local-lift-expression, " + "etc. Macro hiding cannot currently handle local actions. " + "The macro stepper is showing the expansion of that macro use.")) + (define/private (add-lifts-warning) + (add + 'lifts + "A transparent macro called syntax-local-lift-expression or " + "syntax-local-lift-module-end-declaration. " + "The macro stepper is only hiding macro after the " + "lifts are caught.")) - (define/private (add-hidden-lift-site/continuing-warning) - (add - 'hidden-lift-site/continuing - "The target of a lifted declaration was a hidden #%module-begin context. " - "The macro stepper is omitting the lifted declaration.")) - - (define/public (add-warning tag args) - (case tag - ((nonlinearity) - (add-nonlinearity-warning)) - ((localactions) - (add-localactions-warning)) - ((lifts) - (add-lifts-warning)) - ((lift/let) - (add-lift/let-warning)) - ((hidden-lift-site) - (add-hidden-lift-site-warning)) - ((hidden-lift-site/continuing) - (add-hidden-lift-site/continuing-warning)))) - )) - ) + (define/private (add-lift/let-warning) + (add + 'lift/let + "Lifts occurred during the expansion of phase 1 or higher code. " + "The macro stepper is showing some expansions that should be hidden.")) + + (define/private (add-hidden-lift-site-warning) + (add + 'hidden-lift-site + "An opaque macro contained the target of a lifted declaration." + "The macro stepper is showing the expansion of that macro use.")) + + (define/private (add-hidden-lift-site/continuing-warning) + (add + 'hidden-lift-site/continuing + "The target of a lifted declaration was a hidden #%module-begin context. " + "The macro stepper is omitting the lifted declaration.")) + + (define/public (add-warning tag args) + (case tag + ((nonlinearity) + (add-nonlinearity-warning)) + ((localactions) + (add-localactions-warning)) + ((lifts) + (add-lifts-warning)) + ((lift/let) + (add-lift/let-warning)) + ((hidden-lift-site) + (add-hidden-lift-site-warning)) + ((hidden-lift-site/continuing) + (add-hidden-lift-site/continuing-warning)))) + )) diff --git a/collects/repos-time-stamp/stamp.ss b/collects/repos-time-stamp/stamp.ss index 8ae3156285..642f4a8d72 100644 --- a/collects/repos-time-stamp/stamp.ss +++ b/collects/repos-time-stamp/stamp.ss @@ -1 +1 @@ -#lang scheme/base (provide stamp) (define stamp "12dec2008") +#lang scheme/base (provide stamp) (define stamp "14dec2008") diff --git a/collects/scheme/sandbox.ss b/collects/scheme/sandbox.ss index fcef51338a..4091527e49 100644 --- a/collects/scheme/sandbox.ss +++ b/collects/scheme/sandbox.ss @@ -2,6 +2,7 @@ (require scheme/port scheme/list + scheme/string syntax/moddep scheme/gui/dynamic) @@ -17,9 +18,10 @@ sandbox-override-collection-paths sandbox-path-permissions sandbox-security-guard - sandbox-exit-handler sandbox-network-guard + sandbox-exit-handler sandbox-make-inspector + sandbox-make-code-inspector sandbox-make-logger sandbox-memory-limit sandbox-eval-limits @@ -37,6 +39,8 @@ call-in-nested-thread* call-with-limits with-limits + exn:fail:sandbox-terminated? + exn:fail:sandbox-terminated-reason exn:fail:resource? exn:fail:resource-resource) @@ -102,33 +106,31 @@ [suffix-re (bytes-append #"(?:$|" sep-re #")")]) (lambda (path) (if (byte-regexp? path) - path - (let* ([path (path->bytes (simplify-path* path))] - [path (regexp-quote (regexp-replace last-sep path #""))]) - (byte-regexp (bytes-append #"^" path suffix-re))))))) + path + (let* ([path (path->bytes (simplify-path* path))] + [path (regexp-quote (regexp-replace last-sep path #""))]) + (byte-regexp (bytes-append #"^" path suffix-re))))))) (define sandbox-path-permissions (make-parameter '() - (lambda (new) - (map (lambda (perm) (cons (car perm) (map path->bregexp (cdr perm)))) - new)))) + (lambda (new) + (map (lambda (perm) (list (car perm) (path->bregexp (cadr perm)))) + new)))) (define sandbox-network-guard (make-parameter (lambda (what . xs) (error what "network access denied: ~e" xs)))) -(define default-sandbox-guard +(define (make-default-sandbox-guard) (let ([orig-security (current-security-guard)]) (make-security-guard orig-security (lambda (what path modes) (when path - (let ([needed (let loop ([order permission-order]) - (cond [(null? order) + (let ([needed (car (or (for/or ([p (in-list permission-order)]) + (memq p modes)) (error 'default-sandbox-guard - "unknown access modes: ~e" modes)] - [(memq (car order) modes) (car order)] - [else (loop (cdr order))]))] + "unknown access modes: ~e" modes)))] [bpath (parameterize ([current-security-guard orig-security]) (path->bytes (simplify-path* path)))]) (unless (ormap (lambda (perm) @@ -136,20 +138,29 @@ (regexp-match (cadr perm) bpath))) (sandbox-path-permissions)) (error what "`~a' access denied for ~a" - (apply string-append - (add-between (map symbol->string modes) "+")) + (string-append* (add-between (map symbol->string modes) "+")) path))))) (lambda args (apply (sandbox-network-guard) args))))) -(define sandbox-security-guard (make-parameter default-sandbox-guard)) +(define sandbox-security-guard + (make-parameter make-default-sandbox-guard + (lambda (x) + (if (or (security-guard? x) + (and (procedure? x) (procedure-arity-includes? x 0))) + x + (raise-type-error + 'sandbox-security-guard + "security-guard or a security-guard translator procedure" x))))) -(define (default-sandbox-exit-handler _) - (error 'exit "sandboxed code cannot exit")) +;; this is never really used (see where it's used in the evaluator) +(define (default-sandbox-exit-handler _) (error 'exit "sandbox exits")) (define sandbox-exit-handler (make-parameter default-sandbox-exit-handler)) (define sandbox-make-inspector (make-parameter make-inspector)) +(define sandbox-make-code-inspector (make-parameter make-inspector)) + (define sandbox-make-logger (make-parameter current-logger)) (define (compute-permissions paths+require-perms) @@ -169,7 +180,7 @@ (let ([base (simplify-path* base)]) (loop (cdr paths) (if (member base bases) bases (cons base bases)))))))) - (append (map (lambda (p) `(read ,(path->bytes p))) paths) + (append (map (lambda (p) `(read ,p)) paths) (map (lambda (b) `(read ,(build-path b "compiled"))) bases) (map (lambda (b) `(exists ,b)) bases))) @@ -433,21 +444,34 @@ (lambda (x) (abort-current-continuation deftag x))) (loop (car exprs) (cdr exprs)))))))))) +;; We need a powerful enough code inspector to invoke the errortrace library +;; (indirectly through private/sandbox-coverage). But there is a small problem +;; here -- errortrace/stacktrace.ss will grab the global code inspector value +;; at the time it is invoked. So we grab it here too, and use it to wrap the +;; code that invokes errortrace. If errortrace/stacktrace.ss is changed to +;; grab the current inspector, then it would be better to avoid this here, and +;; pass `evaluate-program' the inspector that was in effect when the sandbox +;; was created. +(define orig-code-inspector (current-code-inspector)) + (define (evaluate-program program limit-thunk uncovered!) - (when uncovered! - (eval `(,#'#%require scheme/private/sandbox-coverage))) - ;; the actual evaluation happens under the specified limits - ((limit-thunk (lambda () - (if (and (pair? program) (eq? 'begin (car program))) - (eval* (cdr program)) - (eval program))))) + (parameterize ([current-code-inspector orig-code-inspector]) + (when uncovered! + (eval `(,#'#%require scheme/private/sandbox-coverage)))) (let ([ns (syntax-case* program (module) literal-identifier=? [(module mod . body) (identifier? #'mod) (let ([mod #'mod]) - (eval `(,#'require (quote ,mod))) - (module->namespace `(quote ,(syntax-e mod))))] + (lambda () + (eval `(,#'require (quote ,mod))) + (module->namespace `(quote ,(syntax-e mod)))))] [_else #f])]) + ;; the actual evaluation happens under the specified limits + ((limit-thunk (lambda () + (if (and (pair? program) (eq? 'begin (car program))) + (eval* (cdr program)) + (eval program)) + (when ns (set! ns (ns)))))) (when uncovered! (let ([get (let ([ns (current-namespace)]) (lambda () (eval '(get-uncovered-expressions) ns)))]) @@ -492,11 +516,21 @@ (define-evaluator-messenger (get-uncovered-expressions . xs) 'uncovered) (define-evaluator-messenger (call-in-sandbox-context thunk) 'thunk) + +(define-struct (exn:fail:sandbox-terminated exn:fail) (reason) #:transparent) +(define (make-terminated reason) + (make-exn:fail:sandbox-terminated + (format "evaluator: terminated (~a)" reason) + (current-continuation-marks) + reason)) + (define (make-evaluator* init-hook allow program-maker) + (define orig-code-inspector (current-code-inspector)) (define orig-cust (current-custodian)) (define memory-cust (make-custodian orig-cust)) (define memory-cust-box (make-custodian-box memory-cust #t)) (define user-cust (make-custodian memory-cust)) + (define user-cust-box (make-custodian-box user-cust #t)) (define coverage? (sandbox-coverage-enabled)) (define uncovered #f) (define input-ch (make-channel)) @@ -507,6 +541,18 @@ (define limits (sandbox-eval-limits)) (define user-thread #t) ; set later to the thread (define user-done-evt #t) ; set in the same place + (define terminated? #f) ; set to an exception value when the sandbox dies + (define (terminated! reason) + (unless terminated? + (set! terminated? + (make-terminated + (cond [(eq? reason #t) ; => guess + (if (custodian-box-value user-cust-box) + 'thread-killed + 'custodian-shutdown)] + [reason reason] ; => explicit + ;; otherwise it's an indication of an internal error + [else "internal error: no termination reason"]))))) (define (limit-thunk thunk) (let* ([sec (and limits (car limits))] [mb (and limits (cadr limits))]) @@ -515,6 +561,7 @@ (when user-thread (let ([t user-thread]) (set! user-thread #f) + (terminated! #f) (custodian-shutdown-all user-cust) (kill-thread t))) ; just in case (void)) @@ -535,7 +582,8 @@ (let ([n 0]) (let loop () (let ([expr (channel-get input-ch)]) - (when (eof-object? expr) (channel-put result-ch expr) (user-kill)) + (when (eof-object? expr) + (terminated! 'eof) (channel-put result-ch expr) (user-kill)) (with-handlers ([void (lambda (exn) (channel-put result-ch (cons 'exn exn)))]) (define run @@ -549,22 +597,28 @@ (channel-put result-ch (cons 'vals (call-with-values run list)))) (loop))))) (define (user-eval expr) - (let ([r (if user-thread - (begin (channel-put input-ch expr) - (let loop () - (with-handlers ([(lambda (e) - (and (sandbox-propagate-breaks) - (exn:break? e))) - (lambda (e) - (user-break) - (loop))]) - (sync user-done-evt result-ch)))) - eof)]) - (cond [(eof-object? r) (error 'evaluator "terminated~a" - (if (custodian-box-value memory-cust-box) - "" " (memory exceeded)"))] - [(eq? (car r) 'exn) (raise (cdr r))] - [else (apply values (cdr r))]))) + ;; the thread will usually be running, but it might be killed outside of + ;; the sandboxed environment, for example, if you do something like + ;; (kill-thread (ev '(current-thread))) when there are no per-expression + ;; limits (since then you get a different thread, which is already dead). + (when (and user-thread (thread-dead? user-thread)) + (terminated! #t)) + (cond + [terminated? => raise] + [(not user-thread) (error 'sandbox "internal error (user-thread is #f)")] + [else + (channel-put input-ch expr) + (let ([r (let loop () + (with-handlers ([(if (sandbox-propagate-breaks) + exn:break? (lambda (_) #f)) + (lambda (e) (user-break) (loop))]) + (sync user-done-evt result-ch)))]) + (cond [(eof-object? r) + (terminated! (and (not (custodian-box-value memory-cust-box)) + 'out-of-memory)) + (raise terminated?)] + [(eq? (car r) 'exn) (raise (cdr r))] + [else (apply values (cdr r))]))])) (define get-uncovered (case-lambda [() (get-uncovered #t)] @@ -592,7 +646,7 @@ (let ([msg (evaluator-message-msg expr)]) (case msg [(alive?) (and user-thread (not (thread-dead? user-thread)))] - [(kill) (user-kill)] + [(kill) (terminated! 'evaluator-killed) (user-kill)] [(break) (user-break)] [(limits) (set! limits (evaluator-message-args expr))] [(input) (apply input-putter (evaluator-message-args expr))] @@ -623,7 +677,7 @@ out)] [else (error 'make-evaluator "bad sandox-~a spec: ~e" what out)])) ;; set global memory limit - (when (sandbox-memory-limit) + (when (and memory-accounting? (sandbox-memory-limit)) (custodian-limit-memory memory-cust (* (sandbox-memory-limit) 1024 1024) memory-cust)) (parameterize* ; the order in these matters @@ -660,12 +714,26 @@ ;; general info [current-command-line-arguments '#()] ;; restrict the sandbox context from this point - [current-security-guard (sandbox-security-guard)] - [exit-handler (sandbox-exit-handler)] + [current-security-guard + (let ([g (sandbox-security-guard)]) (if (security-guard? g) g (g)))] + [exit-handler + (let ([h (sandbox-exit-handler)]) + (if (eq? h default-sandbox-exit-handler) + (lambda _ (terminated! 'exited) (user-kill)) + h))] [current-inspector ((sandbox-make-inspector))] [current-logger ((sandbox-make-logger))] - ;; This breaks because we need to load some libraries that are trusted - ;; [current-code-inspector (make-inspector)] + [current-code-inspector (make-inspector)] + ;; The code inspector serves two purposes -- making sure that only trusted + ;; byte-code is loaded, and avoiding using protected moduel bindings, like + ;; the foreign library's `unsafe!'. We don't need the first because we + ;; control it indirectly through the security guard, so this handler makes + ;; sure that byte-code is loaded using the original inspector. + [current-load/use-compiled + (let ([handler (current-load/use-compiled)]) + (lambda (path modname) + (parameterize ([current-code-inspector orig-code-inspector]) + (handler path modname))))] ;; Note the above definition of `current-eventspace': in MzScheme, it ;; is an unused parameter. Also note that creating an eventspace ;; starts a thread that will eventually run the callback code (which @@ -673,8 +741,10 @@ ;; must be nested in the above (which is what paramaterize* does), or ;; it will not use the new namespace. [current-eventspace (make-eventspace)]) - (set! user-thread (bg-run->thread (run-in-bg user-process))) - (set! user-done-evt (handle-evt user-thread (lambda (_) (user-kill) eof))) + (let ([t (bg-run->thread (run-in-bg user-process))]) + (set! user-done-evt + (handle-evt t (lambda (_) (terminated! #t) (user-kill) eof))) + (set! user-thread t)) (let ([r (channel-get result-ch)]) (if (eq? r 'ok) ;; initial program executed ok, so return an evaluator diff --git a/collects/scribblings/reference/sandbox.scrbl b/collects/scribblings/reference/sandbox.scrbl index c76e0cb376..229f638c82 100644 --- a/collects/scribblings/reference/sandbox.scrbl +++ b/collects/scribblings/reference/sandbox.scrbl @@ -16,7 +16,10 @@ The @schememodname[scheme/sandbox] module provides utilities for creating ``sandboxed'' evaluators, which are configured in a particular way and can have restricted resources (memory and time), -filesystem access, and network access. +filesystem access, and network access. The common use case for this +module is for a restricted sandboxed environment, so the defaults are +set up to make it safe. For other uses you will likely need to change +mane of these settings. @defproc*[([(make-evaluator [language (or/c module-path? (list/c 'special symbol?) @@ -240,6 +243,19 @@ used from a module (by using a new namespace): } + +@defproc*[([(exn:fail:sandbox-terminated? [v any/c]) boolean?] + [(exn:fail:sandbox-terminated-reason [exn exn:fail:sandbox-terminated?]) + symbol/c])]{ + +A predicate and accessor for exceptions that are raised when a sandbox +is terminated. Once a sandbox raises such an exception, it will +continue to raise it on further evaluation attempts. + +@scheme[call-with-limits]. The @scheme[resource] field holds a symbol, +either @scheme['time] or @scheme['memory].} + + @; ---------------------------------------------------------------------- @section{Customizing Evaluators} @@ -414,12 +430,15 @@ done using a fake library that provides the same interface but no actual interaction. The default is @scheme[null].} -@defparam[sandbox-security-guard guard security-guard?]{ +@defparam[sandbox-security-guard guard + (or/c security-guard? (-> security-guard?))]{ A parameter that determines the initial -@scheme[(current-security-guard)] for sandboxed evaluations. The -default forbids all filesystem I/O except for things in -@scheme[sandbox-path-permissions], and it uses +@scheme[(current-security-guard)] for sandboxed evaluations. It can +be either a security guard, or a function to construct one. The +default is a function that restricts the access of the current +security guard by forbidding all filesystem I/O except for +specifications in @scheme[sandbox-path-permissions], and it uses @scheme[sandbox-network-guard] for network connections.} @@ -451,12 +470,6 @@ collection libraries (including @scheme[make-evalautor] for more information.} -@defparam[sandbox-exit-handler handler (any/c . -> . any)]{ - -A parameter that determines the initial @scheme[(exit-handler)] for -sandboxed evaluations. The default handler simply throws an error.} - - @defparam[sandbox-network-guard proc (symbol? (or/c (and/c string? immutable?) #f) @@ -469,6 +482,14 @@ default @scheme[sandbox-security-guard]. The default forbids all network connection.} +@defparam[sandbox-exit-handler handler (any/c . -> . any)]{ + +A parameter that determines the initial @scheme[(exit-handler)] for +sandboxed evaluations. The default kills the evaluator with an +appropriate error message (see +@scheme[exn:fail:sandbox-terminated-reason]).} + + @defparam[sandbox-memory-limit limit (or/c exact-nonnegative-integer? #f)]{ A parameter that determines the total memory limit on the sandbox. @@ -495,8 +516,14 @@ is @scheme[(list 30 20)]. Note that these limits apply to the creation of the sandbox environment too --- even @scheme[(make-evaluator 'scheme/base)] can -fail if the limits are strict enough. Therefore, to avoid surprises -you need to catch errors that happen when the sandbox is created. +fail if the limits are strict enough. For example, +@schemeblock[ + (parameterize ([sandbox-eval-limits '(0.25 5)]) + (make-evaluator 'scheme/base '(sleep 2))) +] +will throw an error instead of creating an evaluator. Therefore, to +avoid surprises you need to catch errors that happen when the sandbox +is created. When limits are set, @scheme[call-with-limits] (see below) is wrapped around each use of the evaluator, so consuming too much time or memory @@ -545,14 +572,26 @@ then, assuming sufficiently small limits, @defparam[sandbox-make-inspector make (-> inspector?)]{ A parameter that determines the procedure used to create the inspector -for sandboxed evaluation. The procedure is called when initializing an -evaluator, and the default parameter value is @scheme[make-inspector].} +for sandboxed evaluation. The procedure is called when initializing +an evaluator, and the default parameter value is +@scheme[make-inspector].} + + +@defparam[sandbox-make-code-inspector make (-> inspector?)]{ + +A parameter that determines the procedure used to create the code +inspector for sandboxed evaluation. The procedure is called when +initializing an evaluator, and the default parameter value is +@scheme[make-inspector].} + @defparam[sandbox-make-logger make (-> logger?)]{ A parameter that determines the procedure used to create the logger -for sandboxed evaluation. The procedure is called when initializing an -evaluator, and the default parameter value is @scheme[current-logger].} +for sandboxed evaluation. The procedure is called when initializing +an evaluator, and the default parameter value is +@scheme[current-logger]. This means that it is not creating a new +logger (this might change in the future).} @; ---------------------------------------------------------------------- @@ -686,7 +725,17 @@ used for evaluating expressions. This is usually similar to @scheme[(evaluator (list thunk))], except that this relies on the common meaning of list expressions as function application (which is not true in all languages), and it relies on -MzScheme's @scheme[eval] forgiving a non-S-expression input.} +MzScheme's @scheme[eval] forgiving a non-S-expression input. In +addition, you can avoid some of the sandboxed restrictions by using +your own permissions, for example, +@schemeblock[ + (let ([guard (current-security-guard)]) + (call-in-sandbox-context + (lambda () + (parameterize ([current-security-guard guard]) + (code:comment #, @t{can access anything you want here}) + )))) +]} @; ---------------------------------------------------------------------- diff --git a/collects/tests/mzscheme/sandbox.ss b/collects/tests/mzscheme/sandbox.ss index 1f78204f8c..855d14c798 100644 --- a/collects/tests/mzscheme/sandbox.ss +++ b/collects/tests/mzscheme/sandbox.ss @@ -80,7 +80,7 @@ "(define (plus1 x) x)" "(define (loop) (loop))" "(define (memory x) (make-vector x))"))) - (set-eval-limits ev 1 3) + (set-eval-limits ev 0.5 5) --eval-- x => 1 (id 1) => 1 @@ -102,7 +102,7 @@ (loop) =err> "out of time" --top-- (when (custodian-memory-accounting-available?) - (t --eval-- (memory 1000000) =err> "out of memory")) + (t --eval-- (memory 3000000) =err> "out of memory")) ;; test parameter settings (tricky to get this right since ;; with-limits runs stuff in a different thread) (set-eval-limits ev #f #f) @@ -130,12 +130,30 @@ (thread (lambda () (sleep 1) (break-evaluator ev))) --eval-- (sleep 2) =err> "user break" + (printf "x = ~s\n" x) => (void) ;; termination --eval-- - (printf "x = ~s\n" x) => (void) - ,eof =err> "terminated" - x =err> "terminated" - ,eof =err> "terminated" + ,eof =err> "terminated .eof.$" + 123 =err> "terminated .eof.$" + ,eof =err> "terminated .eof.$" + + ;; other termination messages + --top-- (set! ev (make-evaluator 'scheme/base)) (kill-evaluator ev) + --eval-- 123 =err> "terminated .evaluator-killed.$" + + ;; eval-limits apply to the sandbox creation too + --top-- + (set! ev (parameterize ([sandbox-eval-limits '(0.25 5)]) + (make-evaluator 'scheme/base '(sleep 2)))) + =err> "out of time" + (when (custodian-memory-accounting-available?) + (t --top-- + (set! ev (parameterize ([sandbox-eval-limits '(0.25 2)]) + (make-evaluator 'scheme/base + '(define a (for/list ([i (in-range 10)]) + (collect-garbage) + (make-string 1000)))))) + =err> "out of memory")) ;; i/o --top-- @@ -186,9 +204,9 @@ --top-- (kill-evaluator ev) => (void) --eval-- - x =err> "terminated" - y =err> "terminated" - ,eof =err> "terminated" + x =err> "terminated .evaluator-killed.$" + y =err> "terminated .evaluator-killed.$" + ,eof =err> "terminated .evaluator-killed.$" --top-- (let-values ([(i1 o1) (make-pipe)] [(i2 o2) (make-pipe)]) ;; o1 -> i1 -ev-> o2 -> i2 @@ -401,54 +419,58 @@ (set! ev (parameterize ([sandbox-eval-limits #f]) (make-evaluator 'scheme/base))) --eval-- - (kill-thread (current-thread)) =err> "terminated" + (kill-thread (current-thread)) =err> "terminated .thread-killed.$" --top-- (set! ev (parameterize ([sandbox-eval-limits #f]) (make-evaluator 'scheme/base))) --eval-- - (custodian-shutdown-all (current-custodian)) =err> "terminated" + (custodian-shutdown-all (current-custodian)) + =err> "terminated .custodian-shutdown.$" --top-- ;; also happens when it's done directly (set! ev (parameterize ([sandbox-eval-limits #f]) (make-evaluator 'scheme/base))) (call-in-sandbox-context ev (lambda () (kill-thread (current-thread)))) - =err> "terminated" + =err> "terminated .thread-killed.$" (set! ev (parameterize ([sandbox-eval-limits #f]) (make-evaluator 'scheme/base))) (call-in-sandbox-context ev (lambda () (custodian-shutdown-all (current-custodian)))) - =err> "terminated" + =err> "terminated .custodian-shutdown.$" --top-- ;; now make sure it works with per-expression limits too (set! ev (make-evaluator 'scheme/base)) --eval-- - (kill-thread (current-thread)) =err> "terminated" + (kill-thread (current-thread)) =err> "terminated .thread-killed.$" --top-- (set! ev (make-evaluator 'scheme/base)) --eval-- - (custodian-shutdown-all (current-custodian)) =err> "terminated" + (custodian-shutdown-all (current-custodian)) + =err> "terminated .custodian-shutdown.$" --top-- (set! ev (make-evaluator 'scheme/base)) (call-in-sandbox-context ev (lambda () (kill-thread (current-thread)))) - =err> "terminated" + =err> "terminated .thread-killed.$" (set! ev (make-evaluator 'scheme/base)) (call-in-sandbox-context ev (lambda () (custodian-shutdown-all (current-custodian)))) - =err> "terminated" + =err> "terminated .custodian-shutdown.$" ;; when an expression is out of memory, the sandbox should stay alive --top-- - (set! ev (parameterize ([sandbox-eval-limits '(2 5)] - [sandbox-memory-limit 100]) - (make-evaluator 'scheme/base))) - --eval-- - (define a '()) - (define b 1) - (for ([i (in-range 20)]) - (set! a (cons (make-bytes 500000) a)) - (collect-garbage)) - =err> "out of memory" - b => 1 + (when (custodian-memory-accounting-available?) + (t --top-- + (set! ev (parameterize ([sandbox-eval-limits '(2 5)] + [sandbox-memory-limit 100]) + (make-evaluator 'scheme/base))) + --eval-- + (define a '()) + (define b 1) + (for ([i (in-range 20)]) + (set! a (cons (make-bytes 500000) a)) + (collect-garbage)) + =err> "out of memory" + b => 1)) )) diff --git a/collects/xml/xml.scrbl b/collects/xml/xml.scrbl index 9bc6f7d7bb..0555df9526 100644 --- a/collects/xml/xml.scrbl +++ b/collects/xml/xml.scrbl @@ -103,7 +103,7 @@ Represents an element.} Returns @scheme[#t] if @scheme[v] is a @scheme[pcdata] instance, @scheme[element] instance, an @scheme[entity] instance, -@scheme[comment], or @scheme[pcdata] instance.} +@scheme[comment], or @scheme[cdata] instance.} @defstruct[(attribute source) ([name symbol?] [value string?])]{ diff --git a/src/mzscheme/gc2/backtrace.c b/src/mzscheme/gc2/backtrace.c index 52ff7bbf6c..4f3ecc4090 100644 --- a/src/mzscheme/gc2/backtrace.c +++ b/src/mzscheme/gc2/backtrace.c @@ -45,7 +45,7 @@ static void *print_out_pointer(const char *prefix, void *p, trace_page_t *page; const char *what; - page = find_page(p); + page = pagemap_find_page(GC->page_maps, p); if (!page || (trace_page_type(page) == TRACE_PAGE_BAD)) { GCPRINT(GCOUTF, "%s??? %p\n", prefix, p); return NULL; @@ -94,7 +94,7 @@ static void print_traced_objects(int path_length_limit, GC_print_tagged_value_proc print_tagged_value) { int i; - avoid_collection++; + GC->dumping_avoid_collection++; GCPRINT(GCOUTF, "Begin Trace\n"); for (i = 0; i < found_object_count; i++) { void *p; @@ -107,5 +107,5 @@ static void print_traced_objects(int path_length_limit, } } GCPRINT(GCOUTF, "End Trace\n"); - --avoid_collection; + --GC->dumping_avoid_collection; } diff --git a/src/mzscheme/gc2/newgc.c b/src/mzscheme/gc2/newgc.c index 0751d9f2de..f29aecf90d 100644 --- a/src/mzscheme/gc2/newgc.c +++ b/src/mzscheme/gc2/newgc.c @@ -934,7 +934,7 @@ static void backtrace_new_page(NewGC *gc, mpage *page) static void free_backtrace(struct mpage *page) { - free_pages(page->backtrace, APAGE_SIZE); + free_pages(GC, page->backtrace, APAGE_SIZE); } static void *bt_source; @@ -1590,6 +1590,11 @@ void GC_register_traversers(short tag, Size_Proc size, Mark_Proc mark, mark_tag = BTC_get_redirect_tag(gc, mark_tag); #endif +#if MZ_GC_BACKTRACE + /* Keep tagged objects in tagged space: */ + atomic = 0; +#endif + gc->mark_table[mark_tag] = atomic ? (Mark_Proc)PAGE_ATOMIC : mark; gc->fixup_table[tag] = fixup; } @@ -2145,7 +2150,7 @@ static void mark_backpointers(NewGC *gc) pagemap_add(pagemap, work); if(work->big_page) { work->big_page = 2; - push_ptr(PPTR(NUM(work->addr) + PREFIX_SIZE)); + push_ptr(PPTR(NUM(work->addr) + PREFIX_SIZE + sizeof(struct objhead))); } else { if(work->page_type != PAGE_ATOMIC) { void **start = PPTR(NUM(work->addr) + PREFIX_SIZE); diff --git a/src/mzscheme/src/cstartup.inc b/src/mzscheme/src/cstartup.inc index 087b354cfa..85845e9172 100644 --- a/src/mzscheme/src/cstartup.inc +++ b/src/mzscheme/src/cstartup.inc @@ -1,44 +1,44 @@ { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,53,50,0,0,0,1,0,0,6,0,9,0, -18,0,22,0,35,0,38,0,43,0,50,0,55,0,60,0,67,0,74,0,78, -0,84,0,98,0,112,0,115,0,119,0,121,0,132,0,134,0,148,0,155,0, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,54,50,0,0,0,1,0,0,3,0,12,0, +16,0,23,0,26,0,31,0,38,0,43,0,48,0,55,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, 1,234,1,42,2,130,2,194,2,199,2,219,2,110,3,130,3,181,3,247,3, -132,4,34,5,84,5,107,5,186,5,0,0,204,7,0,0,65,98,101,103,105, -110,29,11,11,68,104,101,114,101,45,115,116,120,63,108,101,116,72,112,97,114, -97,109,101,116,101,114,105,122,101,62,111,114,64,108,101,116,42,66,117,110,108, -101,115,115,64,99,111,110,100,64,119,104,101,110,66,108,101,116,114,101,99,66, -100,101,102,105,110,101,63,97,110,100,65,113,117,111,116,101,29,94,2,14,68, -35,37,107,101,114,110,101,108,11,29,94,2,14,68,35,37,112,97,114,97,109, -122,11,62,105,102,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117,101, +132,4,34,5,84,5,107,5,186,5,0,0,132,7,0,0,29,11,11,68,104, +101,114,101,45,115,116,120,63,108,101,116,66,100,101,102,105,110,101,62,111,114, +64,108,101,116,42,66,117,110,108,101,115,115,64,99,111,110,100,64,119,104,101, +110,66,108,101,116,114,101,99,72,112,97,114,97,109,101,116,101,114,105,122,101, +63,97,110,100,65,113,117,111,116,101,29,94,2,13,68,35,37,107,101,114,110, +101,108,11,29,94,2,13,68,35,37,112,97,114,97,109,122,11,62,105,102,65, +98,101,103,105,110,63,115,116,120,61,115,70,108,101,116,45,118,97,108,117,101, 115,61,120,73,108,101,116,114,101,99,45,118,97,108,117,101,115,66,108,97,109, 98,100,97,1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110, 45,107,101,121,61,118,73,100,101,102,105,110,101,45,118,97,108,117,101,115,98, -10,35,11,8,180,243,94,159,2,16,35,35,159,2,15,35,35,16,20,2,4, -2,2,2,5,2,2,2,11,2,2,2,6,2,2,2,7,2,2,2,8,2, -2,2,9,2,2,2,10,2,2,2,12,2,2,2,13,2,2,97,36,11,8, -180,243,93,159,2,15,35,36,16,2,2,3,161,2,2,36,2,3,2,2,2, -3,97,10,11,11,8,180,243,16,0,97,10,37,11,8,180,243,16,0,13,16, -4,35,29,11,11,2,2,11,18,16,2,99,64,104,101,114,101,8,31,8,30, +10,35,11,8,180,243,94,159,2,15,35,35,159,2,14,35,35,16,20,2,3, +2,1,2,4,2,1,2,10,2,1,2,5,2,1,2,6,2,1,2,7,2, +1,2,8,2,1,2,9,2,1,2,11,2,1,2,12,2,1,97,36,11,8, +180,243,93,159,2,14,35,36,16,2,2,2,161,2,1,36,2,2,2,1,2, +2,97,10,11,11,8,180,243,16,0,97,10,37,11,8,180,243,16,0,13,16, +4,35,29,11,11,2,1,11,18,16,2,99,64,104,101,114,101,8,31,8,30, 8,29,8,28,8,27,93,8,224,251,60,0,0,95,9,8,224,251,60,0,0, -2,2,27,248,22,133,4,23,196,1,249,22,190,3,80,158,38,35,251,22,74, -2,17,248,22,89,23,200,2,12,249,22,64,2,1,248,22,91,23,202,1,27, -248,22,133,4,23,196,1,249,22,190,3,80,158,38,35,251,22,74,2,17,248, -22,89,23,200,2,249,22,64,2,1,248,22,91,23,202,1,12,27,248,22,66, +2,1,27,248,22,133,4,23,196,1,249,22,190,3,80,158,38,35,251,22,74, +2,16,248,22,89,23,200,2,12,249,22,64,2,17,248,22,91,23,202,1,27, +248,22,133,4,23,196,1,249,22,190,3,80,158,38,35,251,22,74,2,16,248, +22,89,23,200,2,249,22,64,2,17,248,22,91,23,202,1,12,27,248,22,66, 248,22,133,4,23,197,1,28,248,22,72,23,194,2,20,15,159,36,35,36,28, 248,22,72,248,22,66,23,195,2,248,22,65,193,249,22,190,3,80,158,38,35, -251,22,74,2,17,248,22,65,23,200,2,249,22,64,2,13,248,22,66,23,202, +251,22,74,2,16,248,22,65,23,200,2,249,22,64,2,12,248,22,66,23,202, 1,11,18,16,2,101,10,8,31,8,30,8,29,8,28,8,27,16,4,11,11, 2,18,3,1,7,101,110,118,57,55,57,51,16,4,11,11,2,19,3,1,7, 101,110,118,57,55,57,52,93,8,224,252,60,0,0,95,9,8,224,252,60,0, -0,2,2,27,248,22,66,248,22,133,4,23,197,1,28,248,22,72,23,194,2, +0,2,1,27,248,22,66,248,22,133,4,23,197,1,28,248,22,72,23,194,2, 20,15,159,36,35,36,28,248,22,72,248,22,66,23,195,2,248,22,65,193,249, 22,190,3,80,158,38,35,250,22,74,2,20,248,22,74,249,22,74,248,22,74, -2,21,248,22,65,23,202,2,251,22,74,2,17,2,21,2,21,249,22,64,2, -6,248,22,66,23,205,1,18,16,2,101,11,8,31,8,30,8,29,8,28,8, +2,21,248,22,65,23,202,2,251,22,74,2,16,2,21,2,21,249,22,64,2, +5,248,22,66,23,205,1,18,16,2,101,11,8,31,8,30,8,29,8,28,8, 27,16,4,11,11,2,18,3,1,7,101,110,118,57,55,57,54,16,4,11,11, 2,19,3,1,7,101,110,118,57,55,57,55,93,8,224,253,60,0,0,95,9, -8,224,253,60,0,0,2,2,248,22,133,4,193,27,248,22,133,4,194,249,22, +8,224,253,60,0,0,2,1,248,22,133,4,193,27,248,22,133,4,194,249,22, 64,248,22,74,248,22,65,196,248,22,66,195,27,248,22,66,248,22,133,4,23, 197,1,249,22,190,3,80,158,38,35,28,248,22,52,248,22,191,3,248,22,65, 23,198,2,27,249,22,2,32,0,89,162,8,44,36,42,9,222,33,39,248,22, @@ -52,7 +52,7 @@ 8,44,36,46,9,222,33,42,248,22,133,4,248,22,65,201,248,22,66,198,27, 248,22,66,248,22,133,4,196,27,248,22,133,4,248,22,65,195,249,22,190,3, 80,158,39,35,28,248,22,72,195,250,22,75,2,20,9,248,22,66,199,250,22, -74,2,4,248,22,74,248,22,65,199,250,22,75,2,7,248,22,66,201,248,22, +74,2,3,248,22,74,248,22,65,199,250,22,75,2,6,248,22,66,201,248,22, 66,202,27,248,22,66,248,22,133,4,23,197,1,27,249,22,1,22,78,249,22, 2,22,133,4,248,22,133,4,248,22,65,199,249,22,190,3,80,158,39,35,251, 22,74,1,22,119,105,116,104,45,99,111,110,116,105,110,117,97,116,105,111,110, @@ -63,506 +63,497 @@ 248,22,133,4,23,197,1,28,248,22,72,23,194,2,20,15,159,36,35,36,249, 22,190,3,80,158,38,35,27,248,22,133,4,248,22,65,23,198,2,28,249,22, 162,8,62,61,62,248,22,191,3,248,22,89,23,197,2,250,22,74,2,20,248, -22,74,249,22,74,21,93,2,25,248,22,65,199,250,22,75,2,9,249,22,74, -2,25,249,22,74,248,22,98,203,2,25,248,22,66,202,251,22,74,2,17,28, +22,74,249,22,74,21,93,2,25,248,22,65,199,250,22,75,2,8,249,22,74, +2,25,249,22,74,248,22,98,203,2,25,248,22,66,202,251,22,74,2,16,28, 249,22,162,8,248,22,191,3,248,22,65,23,201,2,64,101,108,115,101,10,248, 22,65,23,198,2,250,22,75,2,20,9,248,22,66,23,201,1,249,22,64,2, -9,248,22,66,23,203,1,100,8,31,8,30,8,29,8,28,8,27,16,4,11, +8,248,22,66,23,203,1,100,8,31,8,30,8,29,8,28,8,27,16,4,11, 11,2,18,3,1,7,101,110,118,57,56,49,57,16,4,11,11,2,19,3,1, 7,101,110,118,57,56,50,48,93,8,224,254,60,0,0,18,16,2,158,94,10, -64,118,111,105,100,8,47,95,9,8,224,254,60,0,0,2,2,27,248,22,66, +64,118,111,105,100,8,47,95,9,8,224,254,60,0,0,2,1,27,248,22,66, 248,22,133,4,196,249,22,190,3,80,158,38,35,28,248,22,52,248,22,191,3, 248,22,65,197,250,22,74,2,26,248,22,74,248,22,65,199,248,22,89,198,27, 248,22,191,3,248,22,65,197,250,22,74,2,26,248,22,74,248,22,65,197,250, -22,75,2,23,248,22,66,199,248,22,66,202,159,35,20,103,159,35,16,1,2, -1,16,0,83,158,41,20,100,143,69,35,37,109,105,110,45,115,116,120,2,2, -11,10,11,10,35,80,158,35,35,20,103,159,35,16,0,16,0,11,11,16,1, -2,3,36,16,0,35,16,0,35,11,11,38,35,11,11,16,10,2,4,2,5, -2,6,2,7,2,8,2,9,2,10,2,11,2,12,2,13,16,10,11,11,11, -11,11,11,11,11,11,11,16,10,2,4,2,5,2,6,2,7,2,8,2,9, -2,10,2,11,2,12,2,13,35,45,36,11,11,16,0,16,0,16,0,35,35, -11,11,11,16,0,16,0,16,0,35,35,16,11,16,5,93,2,3,20,15,159, -35,35,35,35,20,103,159,35,16,0,16,1,33,32,10,16,5,93,2,8,89, -162,8,44,36,52,9,223,0,33,33,35,20,103,159,35,16,1,20,25,159,36, -2,2,2,3,16,0,11,16,5,93,2,10,89,162,8,44,36,52,9,223,0, -33,34,35,20,103,159,35,16,1,20,25,159,36,2,2,2,3,16,0,11,16, -5,93,2,13,89,162,8,44,36,52,9,223,0,33,35,35,20,103,159,35,16, -1,20,25,159,36,2,2,2,3,16,1,33,36,11,16,5,93,2,6,89,162, -8,44,36,55,9,223,0,33,37,35,20,103,159,35,16,1,20,25,159,36,2, -2,2,3,16,1,33,38,11,16,5,93,2,4,89,162,8,44,36,57,9,223, -0,33,41,35,20,103,159,35,16,1,20,25,159,36,2,2,2,3,16,0,11, -16,5,93,2,11,89,162,8,44,36,52,9,223,0,33,43,35,20,103,159,35, -16,1,20,25,159,36,2,2,2,3,16,0,11,16,5,93,2,7,89,162,8, -44,36,53,9,223,0,33,44,35,20,103,159,35,16,1,20,25,159,36,2,2, -2,3,16,0,11,16,5,93,2,5,89,162,8,44,36,54,9,223,0,33,45, -35,20,103,159,35,16,1,20,25,159,36,2,2,2,3,16,0,11,16,5,93, -2,9,89,162,8,44,36,57,9,223,0,33,46,35,20,103,159,35,16,1,20, -25,159,36,2,2,2,3,16,1,33,48,11,16,5,93,2,12,89,162,8,44, -36,53,9,223,0,33,49,35,20,103,159,35,16,1,20,25,159,36,2,2,2, -3,16,0,11,16,0,94,2,15,2,16,93,2,15,9,9,35,0}; - EVAL_ONE_SIZED_STR((char *)expr, 2117); +22,75,2,23,248,22,66,199,248,22,66,202,159,35,20,103,159,35,16,1,11, +16,0,83,158,41,20,100,143,69,35,37,109,105,110,45,115,116,120,2,1,11, +10,11,10,35,80,158,35,35,20,103,159,35,16,0,16,0,11,11,16,1,2, +2,36,16,0,35,16,0,35,11,11,38,35,11,11,16,10,2,3,2,4,2, +5,2,6,2,7,2,8,2,9,2,10,2,11,2,12,16,10,11,11,11,11, +11,11,11,11,11,11,16,10,2,3,2,4,2,5,2,6,2,7,2,8,2, +9,2,10,2,11,2,12,35,45,36,11,11,16,0,16,0,16,0,35,35,11, +11,11,16,0,16,0,16,0,35,35,16,11,16,5,2,2,20,15,159,35,35, +35,35,20,103,159,35,16,0,16,1,33,32,10,16,5,2,7,89,162,8,44, +36,52,9,223,0,33,33,35,20,103,159,35,16,1,2,2,16,0,11,16,5, +2,9,89,162,8,44,36,52,9,223,0,33,34,35,20,103,159,35,16,1,2, +2,16,0,11,16,5,2,12,89,162,8,44,36,52,9,223,0,33,35,35,20, +103,159,35,16,1,2,2,16,1,33,36,11,16,5,2,5,89,162,8,44,36, +55,9,223,0,33,37,35,20,103,159,35,16,1,2,2,16,1,33,38,11,16, +5,2,3,89,162,8,44,36,57,9,223,0,33,41,35,20,103,159,35,16,1, +2,2,16,0,11,16,5,2,10,89,162,8,44,36,52,9,223,0,33,43,35, +20,103,159,35,16,1,2,2,16,0,11,16,5,2,6,89,162,8,44,36,53, +9,223,0,33,44,35,20,103,159,35,16,1,2,2,16,0,11,16,5,2,11, +89,162,8,44,36,54,9,223,0,33,45,35,20,103,159,35,16,1,2,2,16, +0,11,16,5,2,8,89,162,8,44,36,57,9,223,0,33,46,35,20,103,159, +35,16,1,2,2,16,1,33,48,11,16,5,2,4,89,162,8,44,36,53,9, +223,0,33,49,35,20,103,159,35,16,1,2,2,16,0,11,16,0,94,2,14, +2,15,93,2,14,9,9,35,0}; + EVAL_ONE_SIZED_STR((char *)expr, 2045); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,53,60,0,0,0,1,0,0,3,0,16,0, -21,0,38,0,53,0,71,0,87,0,97,0,115,0,135,0,151,0,169,0,200, -0,229,0,251,0,9,1,15,1,29,1,34,1,44,1,52,1,80,1,112,1, -157,1,202,1,226,1,9,2,11,2,68,2,158,3,199,3,33,5,137,5,241, -5,102,6,116,6,150,6,166,6,16,8,30,8,193,8,194,9,194,10,201,10, -208,10,215,10,90,11,103,11,58,12,160,12,173,12,195,12,147,13,51,14,122, -15,130,15,138,15,164,15,18,16,0,0,70,19,0,0,29,11,11,72,112,97, -116,104,45,115,116,114,105,110,103,63,64,98,115,98,115,76,110,111,114,109,97, -108,45,99,97,115,101,45,112,97,116,104,74,45,99,104,101,99,107,45,114,101, -108,112,97,116,104,77,45,99,104,101,99,107,45,99,111,108,108,101,99,116,105, -111,110,75,99,111,108,108,101,99,116,105,111,110,45,112,97,116,104,69,45,102, -105,110,100,45,99,111,108,77,99,104,101,99,107,45,115,117,102,102,105,120,45, -99,97,108,108,79,112,97,116,104,45,114,101,112,108,97,99,101,45,115,117,102, -102,105,120,75,112,97,116,104,45,97,100,100,45,115,117,102,102,105,120,77,108, -111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,1,29,102,105,110, -100,45,108,105,98,114,97,114,121,45,99,111,108,108,101,99,116,105,111,110,45, -112,97,116,104,115,1,27,112,97,116,104,45,108,105,115,116,45,115,116,114,105, -110,103,45,62,112,97,116,104,45,108,105,115,116,1,20,102,105,110,100,45,101, -120,101,99,117,116,97,98,108,101,45,112,97,116,104,73,101,109,98,101,100,100, -101,100,45,108,111,97,100,65,113,117,111,116,101,29,94,2,17,68,35,37,112, -97,114,97,109,122,11,64,108,111,111,112,69,101,120,101,99,45,102,105,108,101, -67,119,105,110,100,111,119,115,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,6,29,29,126,97,58, -32,105,110,118,97,108,105,100,32,114,101,108,97,116,105,118,101,32,112,97,116, -104,58,32,126,115,6,42,42,126,97,58,32,99,111,108,108,101,99,116,105,111, -110,32,110,111,116,32,102,111,117,110,100,58,32,126,115,32,105,110,32,97,110, -121,32,111,102,58,32,126,115,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,6,21,21,115,116,114,105,110,103,32, -111,114,32,98,121,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,179,12,10,248,22,155,5, -23,196,2,28,248,22,152,6,23,194,2,12,87,94,248,22,165,8,23,194,1, -248,80,159,37,53,36,195,28,248,22,72,23,195,2,9,27,248,22,65,23,196, -2,27,28,248,22,160,13,23,195,2,23,194,1,28,248,22,159,13,23,195,2, -249,22,161,13,23,196,1,250,80,158,42,48,248,22,175,13,2,20,11,10,250, -80,158,40,48,248,22,175,13,2,20,23,197,1,10,28,23,193,2,249,22,64, -248,22,163,13,249,22,161,13,23,198,1,247,22,176,13,27,248,22,66,23,200, -1,28,248,22,72,23,194,2,9,27,248,22,65,23,195,2,27,28,248,22,160, -13,23,195,2,23,194,1,28,248,22,159,13,23,195,2,249,22,161,13,23,196, -1,250,80,158,47,48,248,22,175,13,2,20,11,10,250,80,158,45,48,248,22, -175,13,2,20,23,197,1,10,28,23,193,2,249,22,64,248,22,163,13,249,22, -161,13,23,198,1,247,22,176,13,248,80,159,45,52,36,248,22,66,23,199,1, -87,94,23,193,1,248,80,159,43,52,36,248,22,66,23,197,1,87,94,23,193, -1,27,248,22,66,23,198,1,28,248,22,72,23,194,2,9,27,248,22,65,23, -195,2,27,28,248,22,160,13,23,195,2,23,194,1,28,248,22,159,13,23,195, -2,249,22,161,13,23,196,1,250,80,158,45,48,248,22,175,13,2,20,11,10, -250,80,158,43,48,248,22,175,13,2,20,23,197,1,10,28,23,193,2,249,22, -64,248,22,163,13,249,22,161,13,23,198,1,247,22,176,13,248,80,159,43,52, -36,248,22,66,23,199,1,248,80,159,41,52,36,248,22,66,196,27,248,22,136, -13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248,22,157,6,23,195, -2,27,248,22,158,13,195,28,192,192,248,22,159,13,195,11,87,94,28,28,248, -22,137,13,23,195,2,10,27,248,22,136,13,23,196,2,28,23,193,2,192,87, -94,23,193,1,28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28, -23,193,2,192,87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129, -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,137,13,23,195,2,249,22,162,8,248,22,138,13,23, -197,2,2,21,249,22,162,8,247,22,176,7,2,21,27,28,248,22,157,6,23, -196,2,23,195,2,248,22,166,7,248,22,141,13,23,197,2,28,249,22,188,13, -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,157,6,195,248,22,144,13,195,194,27,248,22,132, -7,23,195,1,249,22,145,13,248,22,169,7,250,22,130,14,0,6,35,114,120, -34,47,34,28,249,22,188,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,130,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,158,43,36,2,21,28,248,22,157,6,194,248, -22,144,13,194,193,87,94,28,27,248,22,136,13,23,196,2,28,23,193,2,192, -87,94,23,193,1,28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2, -28,23,193,2,192,87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22, -129,9,23,196,2,2,22,23,197,2,28,248,22,158,13,23,195,2,12,248,22, -155,11,249,22,164,10,248,22,186,6,250,22,141,7,2,23,23,200,1,23,201, -1,247,22,23,87,94,28,27,248,22,136,13,23,196,2,28,23,193,2,192,87, -94,23,193,1,28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28, -23,193,2,192,87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129, -9,23,196,2,2,22,23,197,2,28,248,22,158,13,23,195,2,12,248,22,155, -11,249,22,164,10,248,22,186,6,250,22,141,7,2,23,23,200,1,23,201,1, -247,22,23,87,94,87,94,28,27,248,22,136,13,23,196,2,28,23,193,2,192, -87,94,23,193,1,28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2, -28,23,193,2,192,87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22, -129,9,195,2,22,23,197,2,28,248,22,158,13,23,195,2,12,248,22,155,11, -249,22,164,10,248,22,186,6,250,22,141,7,2,23,199,23,201,1,247,22,23, -249,22,3,89,162,8,44,36,49,9,223,2,33,34,196,248,22,155,11,249,22, -130,11,23,196,1,247,22,23,87,94,250,80,159,38,39,36,2,7,196,197,251, -80,159,39,41,36,2,7,32,0,89,162,8,44,36,44,9,222,33,36,197,198, -32,38,89,162,43,41,58,65,99,108,111,111,112,222,33,39,28,248,22,72,23, -199,2,87,94,23,198,1,248,23,196,1,251,22,141,7,2,24,23,199,1,28, -248,22,72,23,203,2,87,94,23,202,1,23,201,1,250,22,1,22,154,13,23, -204,1,23,205,1,23,198,1,27,249,22,154,13,248,22,65,23,202,2,23,199, -2,28,248,22,149,13,23,194,2,27,250,22,1,22,154,13,23,197,1,23,202, -2,28,248,22,149,13,23,194,2,192,87,94,23,193,1,27,248,22,66,23,202, -1,28,248,22,72,23,194,2,87,94,23,193,1,248,23,199,1,251,22,141,7, -2,24,23,202,1,28,248,22,72,23,206,2,87,94,23,205,1,23,204,1,250, -22,1,22,154,13,23,207,1,23,208,1,23,201,1,27,249,22,154,13,248,22, -65,23,197,2,23,202,2,28,248,22,149,13,23,194,2,27,250,22,1,22,154, -13,23,197,1,204,28,248,22,149,13,193,192,253,2,38,203,204,205,206,23,15, -248,22,66,201,253,2,38,202,203,204,205,206,248,22,66,200,87,94,23,193,1, -27,248,22,66,23,201,1,28,248,22,72,23,194,2,87,94,23,193,1,248,23, -198,1,251,22,141,7,2,24,23,201,1,28,248,22,72,23,205,2,87,94,23, -204,1,23,203,1,250,22,1,22,154,13,23,206,1,23,207,1,23,200,1,27, -249,22,154,13,248,22,65,23,197,2,23,201,2,28,248,22,149,13,23,194,2, -27,250,22,1,22,154,13,23,197,1,203,28,248,22,149,13,193,192,253,2,38, -202,203,204,205,206,248,22,66,201,253,2,38,201,202,203,204,205,248,22,66,200, -27,247,22,177,13,253,2,38,198,199,200,201,202,198,87,95,28,28,248,22,137, -13,23,194,2,10,27,248,22,136,13,23,195,2,28,23,193,2,192,87,94,23, -193,1,28,248,22,157,6,23,195,2,27,248,22,158,13,23,196,2,28,23,193, -2,192,87,94,23,193,1,248,22,159,13,23,196,2,11,12,252,22,129,9,23, -200,2,2,25,35,23,198,2,23,199,2,28,28,248,22,157,6,23,195,2,10, -248,22,145,7,23,195,2,87,94,23,194,1,12,252,22,129,9,23,200,2,2, -26,36,23,198,2,23,199,1,91,159,38,11,90,161,38,35,11,248,22,157,13, -23,197,2,87,94,23,195,1,87,94,28,192,12,250,22,130,9,23,201,1,2, -27,23,199,1,249,22,7,194,195,91,159,37,11,90,161,37,35,11,87,95,28, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,54,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,30,5,134,5,238,5,99, +6,113,6,147,6,163,6,13,8,27,8,190,8,191,9,191,10,198,10,205,10, +212,10,87,11,100,11,55,12,157,12,170,12,192,12,144,13,48,14,119,15,127, +15,135,15,161,15,15,16,0,0,3,19,0,0,72,112,97,116,104,45,115,116, +114,105,110,103,63,64,98,115,98,115,76,110,111,114,109,97,108,45,99,97,115, +101,45,112,97,116,104,74,45,99,104,101,99,107,45,114,101,108,112,97,116,104, +77,45,99,104,101,99,107,45,99,111,108,108,101,99,116,105,111,110,75,99,111, +108,108,101,99,116,105,111,110,45,112,97,116,104,69,45,102,105,110,100,45,99, +111,108,77,99,104,101,99,107,45,115,117,102,102,105,120,45,99,97,108,108,79, +112,97,116,104,45,114,101,112,108,97,99,101,45,115,117,102,102,105,120,75,112, +97,116,104,45,97,100,100,45,115,117,102,102,105,120,77,108,111,97,100,47,117, +115,101,45,99,111,109,112,105,108,101,100,1,29,102,105,110,100,45,108,105,98, +114,97,114,121,45,99,111,108,108,101,99,116,105,111,110,45,112,97,116,104,115, +1,27,112,97,116,104,45,108,105,115,116,45,115,116,114,105,110,103,45,62,112, +97,116,104,45,108,105,115,116,1,20,102,105,110,100,45,101,120,101,99,117,116, +97,98,108,101,45,112,97,116,104,73,101,109,98,101,100,100,101,100,45,108,111, +97,100,65,113,117,111,116,101,29,94,2,16,68,35,37,112,97,114,97,109,122, +11,64,108,111,111,112,69,101,120,101,99,45,102,105,108,101,67,119,105,110,100, +111,119,115,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,6,29,29,126,97,58,32,105,110,118,97, +108,105,100,32,114,101,108,97,116,105,118,101,32,112,97,116,104,58,32,126,115, +6,42,42,126,97,58,32,99,111,108,108,101,99,116,105,111,110,32,110,111,116, +32,102,111,117,110,100,58,32,126,115,32,105,110,32,97,110,121,32,111,102,58, +32,126,115,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,6,21,21,115,116,114,105,110,103,32,111,114,32,98,121, +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,179,12,10,248,22,155,5,23,196,2,28,248, +22,152,6,23,194,2,12,87,94,248,22,165,8,23,194,1,248,80,159,37,53, +36,195,28,248,22,72,23,195,2,9,27,248,22,65,23,196,2,27,28,248,22, +160,13,23,195,2,23,194,1,28,248,22,159,13,23,195,2,249,22,161,13,23, +196,1,250,80,158,42,48,248,22,175,13,2,19,11,10,250,80,158,40,48,248, +22,175,13,2,19,23,197,1,10,28,23,193,2,249,22,64,248,22,163,13,249, +22,161,13,23,198,1,247,22,176,13,27,248,22,66,23,200,1,28,248,22,72, +23,194,2,9,27,248,22,65,23,195,2,27,28,248,22,160,13,23,195,2,23, +194,1,28,248,22,159,13,23,195,2,249,22,161,13,23,196,1,250,80,158,47, +48,248,22,175,13,2,19,11,10,250,80,158,45,48,248,22,175,13,2,19,23, +197,1,10,28,23,193,2,249,22,64,248,22,163,13,249,22,161,13,23,198,1, +247,22,176,13,248,80,159,45,52,36,248,22,66,23,199,1,87,94,23,193,1, +248,80,159,43,52,36,248,22,66,23,197,1,87,94,23,193,1,27,248,22,66, +23,198,1,28,248,22,72,23,194,2,9,27,248,22,65,23,195,2,27,28,248, +22,160,13,23,195,2,23,194,1,28,248,22,159,13,23,195,2,249,22,161,13, +23,196,1,250,80,158,45,48,248,22,175,13,2,19,11,10,250,80,158,43,48, +248,22,175,13,2,19,23,197,1,10,28,23,193,2,249,22,64,248,22,163,13, +249,22,161,13,23,198,1,247,22,176,13,248,80,159,43,52,36,248,22,66,23, +199,1,248,80,159,41,52,36,248,22,66,196,27,248,22,136,13,23,195,2,28, +23,193,2,192,87,94,23,193,1,28,248,22,157,6,23,195,2,27,248,22,158, +13,195,28,192,192,248,22,159,13,195,11,87,94,28,28,248,22,137,13,23,195, +2,10,27,248,22,136,13,23,196,2,28,23,193,2,192,87,94,23,193,1,28, +248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28,23,193,2,192,87, +94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129,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,137,13,23,195,2,249,22,162,8,248,22,138,13,23,197,2,2,20,249, +22,162,8,247,22,176,7,2,20,27,28,248,22,157,6,23,196,2,23,195,2, +248,22,166,7,248,22,141,13,23,197,2,28,249,22,188,13,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,157,6,195,248,22,144,13,195,194,27,248,22,132,7,23,195,1,249, +22,145,13,248,22,169,7,250,22,130,14,0,6,35,114,120,34,47,34,28,249, +22,188,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,130,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,158,43,36,2,20,28,248,22,157,6,194,248,22,144,13,194,193, +87,94,28,27,248,22,136,13,23,196,2,28,23,193,2,192,87,94,23,193,1, +28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28,23,193,2,192, +87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129,9,23,196,2, +2,21,23,197,2,28,248,22,158,13,23,195,2,12,248,22,155,11,249,22,164, +10,248,22,186,6,250,22,141,7,2,22,23,200,1,23,201,1,247,22,23,87, +94,28,27,248,22,136,13,23,196,2,28,23,193,2,192,87,94,23,193,1,28, +248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28,23,193,2,192,87, +94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129,9,23,196,2,2, +21,23,197,2,28,248,22,158,13,23,195,2,12,248,22,155,11,249,22,164,10, +248,22,186,6,250,22,141,7,2,22,23,200,1,23,201,1,247,22,23,87,94, +87,94,28,27,248,22,136,13,23,196,2,28,23,193,2,192,87,94,23,193,1, +28,248,22,157,6,23,196,2,27,248,22,158,13,23,197,2,28,23,193,2,192, +87,94,23,193,1,248,22,159,13,23,197,2,11,12,250,22,129,9,195,2,21, +23,197,2,28,248,22,158,13,23,195,2,12,248,22,155,11,249,22,164,10,248, +22,186,6,250,22,141,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,155,11,249,22,130,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,72,23,199,2,87,94,23, +198,1,248,23,196,1,251,22,141,7,2,23,23,199,1,28,248,22,72,23,203, +2,87,94,23,202,1,23,201,1,250,22,1,22,154,13,23,204,1,23,205,1, +23,198,1,27,249,22,154,13,248,22,65,23,202,2,23,199,2,28,248,22,149, +13,23,194,2,27,250,22,1,22,154,13,23,197,1,23,202,2,28,248,22,149, +13,23,194,2,192,87,94,23,193,1,27,248,22,66,23,202,1,28,248,22,72, +23,194,2,87,94,23,193,1,248,23,199,1,251,22,141,7,2,23,23,202,1, +28,248,22,72,23,206,2,87,94,23,205,1,23,204,1,250,22,1,22,154,13, +23,207,1,23,208,1,23,201,1,27,249,22,154,13,248,22,65,23,197,2,23, +202,2,28,248,22,149,13,23,194,2,27,250,22,1,22,154,13,23,197,1,204, +28,248,22,149,13,193,192,253,2,37,203,204,205,206,23,15,248,22,66,201,253, +2,37,202,203,204,205,206,248,22,66,200,87,94,23,193,1,27,248,22,66,23, +201,1,28,248,22,72,23,194,2,87,94,23,193,1,248,23,198,1,251,22,141, +7,2,23,23,201,1,28,248,22,72,23,205,2,87,94,23,204,1,23,203,1, +250,22,1,22,154,13,23,206,1,23,207,1,23,200,1,27,249,22,154,13,248, +22,65,23,197,2,23,201,2,28,248,22,149,13,23,194,2,27,250,22,1,22, +154,13,23,197,1,203,28,248,22,149,13,193,192,253,2,37,202,203,204,205,206, +248,22,66,201,253,2,37,201,202,203,204,205,248,22,66,200,27,247,22,177,13, +253,2,37,198,199,200,201,202,198,87,95,28,28,248,22,137,13,23,194,2,10, +27,248,22,136,13,23,195,2,28,23,193,2,192,87,94,23,193,1,28,248,22, +157,6,23,195,2,27,248,22,158,13,23,196,2,28,23,193,2,192,87,94,23, +193,1,248,22,159,13,23,196,2,11,12,252,22,129,9,23,200,2,2,24,35, +23,198,2,23,199,2,28,28,248,22,157,6,23,195,2,10,248,22,145,7,23, +195,2,87,94,23,194,1,12,252,22,129,9,23,200,2,2,25,36,23,198,2, +23,199,1,91,159,38,11,90,161,38,35,11,248,22,157,13,23,197,2,87,94, +23,195,1,87,94,28,192,12,250,22,130,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,137,13, +23,196,2,10,27,248,22,136,13,23,197,2,28,23,193,2,192,87,94,23,193, +1,28,248,22,157,6,23,197,2,27,248,22,158,13,23,198,2,28,23,193,2, +192,87,94,23,193,1,248,22,159,13,23,198,2,11,12,252,22,129,9,2,9, +2,24,35,23,200,2,23,201,2,28,28,248,22,157,6,23,197,2,10,248,22, +145,7,23,197,2,12,252,22,129,9,2,9,2,25,36,23,200,2,23,201,2, +91,159,38,11,90,161,38,35,11,248,22,157,13,23,199,2,87,94,23,195,1, +87,94,28,192,12,250,22,130,9,2,9,2,26,23,201,2,249,22,7,194,195, +27,249,22,146,13,250,22,129,14,0,18,35,114,120,35,34,40,91,46,93,91, +94,46,93,42,124,41,36,34,248,22,142,13,23,201,1,28,248,22,157,6,23, +203,2,249,22,169,7,23,204,1,8,63,23,202,1,28,248,22,137,13,23,199, +2,248,22,138,13,23,199,1,87,94,23,198,1,247,22,139,13,28,248,22,136, +13,194,249,22,154,13,195,194,192,91,159,37,11,90,161,37,35,11,87,95,28, 28,248,22,137,13,23,196,2,10,27,248,22,136,13,23,197,2,28,23,193,2, 192,87,94,23,193,1,28,248,22,157,6,23,197,2,27,248,22,158,13,23,198, 2,28,23,193,2,192,87,94,23,193,1,248,22,159,13,23,198,2,11,12,252, -22,129,9,2,10,2,25,35,23,200,2,23,201,2,28,28,248,22,157,6,23, -197,2,10,248,22,145,7,23,197,2,12,252,22,129,9,2,10,2,26,36,23, +22,129,9,2,10,2,24,35,23,200,2,23,201,2,28,28,248,22,157,6,23, +197,2,10,248,22,145,7,23,197,2,12,252,22,129,9,2,10,2,25,36,23, 200,2,23,201,2,91,159,38,11,90,161,38,35,11,248,22,157,13,23,199,2, -87,94,23,195,1,87,94,28,192,12,250,22,130,9,2,10,2,27,23,201,2, -249,22,7,194,195,27,249,22,146,13,250,22,129,14,0,18,35,114,120,35,34, -40,91,46,93,91,94,46,93,42,124,41,36,34,248,22,142,13,23,201,1,28, -248,22,157,6,23,203,2,249,22,169,7,23,204,1,8,63,23,202,1,28,248, -22,137,13,23,199,2,248,22,138,13,23,199,1,87,94,23,198,1,247,22,139, -13,28,248,22,136,13,194,249,22,154,13,195,194,192,91,159,37,11,90,161,37, -35,11,87,95,28,28,248,22,137,13,23,196,2,10,27,248,22,136,13,23,197, -2,28,23,193,2,192,87,94,23,193,1,28,248,22,157,6,23,197,2,27,248, -22,158,13,23,198,2,28,23,193,2,192,87,94,23,193,1,248,22,159,13,23, -198,2,11,12,252,22,129,9,2,11,2,25,35,23,200,2,23,201,2,28,28, -248,22,157,6,23,197,2,10,248,22,145,7,23,197,2,12,252,22,129,9,2, -11,2,26,36,23,200,2,23,201,2,91,159,38,11,90,161,38,35,11,248,22, -157,13,23,199,2,87,94,23,195,1,87,94,28,192,12,250,22,130,9,2,11, -2,27,23,201,2,249,22,7,194,195,27,249,22,146,13,249,22,155,7,250,22, -130,14,0,9,35,114,120,35,34,91,46,93,34,248,22,142,13,23,203,1,6, -1,1,95,28,248,22,157,6,23,202,2,249,22,169,7,23,203,1,8,63,23, -201,1,28,248,22,137,13,23,199,2,248,22,138,13,23,199,1,87,94,23,198, -1,247,22,139,13,28,248,22,136,13,194,249,22,154,13,195,194,192,249,247,22, -188,4,194,11,249,80,158,37,46,9,9,249,80,158,37,46,195,9,27,247,22, -179,13,249,80,158,38,47,28,23,195,2,27,248,22,174,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,154,13,248,22,175,13,69,97,100,100,111,110,45,100,105,114,247, -22,172,7,6,8,8,99,111,108,108,101,99,116,115,11,27,248,80,159,41,52, -36,250,22,78,23,203,1,248,22,74,248,22,175,13,72,99,111,108,108,101,99, -116,115,45,100,105,114,23,204,1,28,23,194,2,249,22,64,23,196,1,23,195, -1,192,32,48,89,162,8,44,38,54,2,19,222,33,49,27,249,22,186,13,23, -197,2,23,198,2,28,23,193,2,87,94,23,196,1,27,248,22,89,23,195,2, -27,27,248,22,98,23,197,1,27,249,22,186,13,23,201,2,23,196,2,28,23, -193,2,87,94,23,194,1,27,248,22,89,23,195,2,27,250,2,48,23,203,2, -23,204,1,248,22,98,23,199,1,28,249,22,151,7,23,196,2,2,28,249,22, -78,23,202,2,194,249,22,64,248,22,145,13,23,197,1,23,195,1,87,95,23, -199,1,23,193,1,28,249,22,151,7,23,196,2,2,28,249,22,78,23,200,2, -9,249,22,64,248,22,145,13,23,197,1,9,28,249,22,151,7,23,196,2,2, -28,249,22,78,197,194,87,94,23,196,1,249,22,64,248,22,145,13,23,197,1, -194,87,94,23,193,1,28,249,22,151,7,23,198,2,2,28,249,22,78,195,9, -87,94,23,194,1,249,22,64,248,22,145,13,23,199,1,9,87,95,28,28,248, -22,145,7,194,10,248,22,157,6,194,12,250,22,129,9,2,14,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,73,195,249,22,4,22,136,13,196,11,12,250,22,129,9,2,14, -6,13,13,108,105,115,116,32,111,102,32,112,97,116,104,115,197,250,2,48,197, -195,28,248,22,157,6,197,248,22,168,7,197,196,32,51,89,162,8,44,39,57, -2,19,222,33,54,32,52,89,162,8,44,38,54,70,102,111,117,110,100,45,101, -120,101,99,222,33,53,28,23,193,2,91,159,38,11,90,161,38,35,11,248,22, -157,13,23,199,2,87,95,23,195,1,23,194,1,27,28,23,198,2,27,248,22, -162,13,23,201,2,28,249,22,164,8,23,195,2,23,202,2,11,28,248,22,158, -13,23,194,2,250,2,52,23,201,2,23,202,2,249,22,154,13,23,200,2,23, -198,1,250,2,52,23,201,2,23,202,2,23,196,1,11,28,23,193,2,192,87, -94,23,193,1,27,28,248,22,136,13,23,196,2,27,249,22,154,13,23,198,2, -23,201,2,28,28,248,22,149,13,193,10,248,22,148,13,193,192,11,11,28,23, -193,2,192,87,94,23,193,1,28,23,199,2,11,27,248,22,162,13,23,202,2, -28,249,22,164,8,23,195,2,23,203,1,11,28,248,22,158,13,23,194,2,250, -2,52,23,202,1,23,203,1,249,22,154,13,23,201,1,23,198,1,250,2,52, -201,202,195,194,28,248,22,72,23,197,2,11,27,248,22,161,13,248,22,65,23, -199,2,27,249,22,154,13,23,196,1,23,197,2,28,248,22,148,13,23,194,2, -250,2,52,198,199,195,87,94,23,193,1,27,248,22,66,23,200,1,28,248,22, -72,23,194,2,11,27,248,22,161,13,248,22,65,23,196,2,27,249,22,154,13, -23,196,1,23,200,2,28,248,22,148,13,23,194,2,250,2,52,201,202,195,87, -94,23,193,1,27,248,22,66,23,197,1,28,248,22,72,23,194,2,11,27,248, -22,161,13,248,22,65,195,27,249,22,154,13,23,196,1,202,28,248,22,148,13, -193,250,2,52,204,205,195,251,2,51,204,205,206,248,22,66,199,87,95,28,27, -248,22,136,13,23,196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,157, -6,23,196,2,27,248,22,158,13,23,197,2,28,23,193,2,192,87,94,23,193, -1,248,22,159,13,23,197,2,11,12,250,22,129,9,2,15,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,136,13,23,197,2,28,23, -193,2,192,87,94,23,193,1,28,248,22,157,6,23,197,2,27,248,22,158,13, -23,198,2,28,23,193,2,192,87,94,23,193,1,248,22,159,13,23,198,2,11, -248,22,158,13,23,196,2,11,10,12,250,22,129,9,2,15,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,158,13,23,195,2,91,159,38, -11,90,161,38,35,11,248,22,157,13,23,198,2,249,22,162,8,194,68,114,101, -108,97,116,105,118,101,11,27,248,22,174,7,6,4,4,80,65,84,72,251,2, -51,23,199,1,23,200,1,23,201,1,28,23,197,2,27,249,80,158,43,47,23, -200,1,9,28,249,22,162,8,247,22,176,7,2,21,249,22,64,248,22,145,13, -5,1,46,23,195,1,192,9,27,248,22,161,13,23,196,1,28,248,22,148,13, -193,250,2,52,198,199,195,11,250,80,158,38,48,196,197,11,250,80,158,38,48, -196,11,11,87,94,249,22,148,6,247,22,184,4,195,248,22,174,5,249,22,170, -3,35,249,22,154,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,175,13,2,20,27,249,80,158,40,48, -23,196,1,11,27,27,248,22,173,3,23,200,1,28,192,192,35,27,27,248,22, -173,3,23,202,1,28,192,192,35,249,22,151,5,23,197,1,83,158,39,20,97, -95,89,162,8,44,35,47,9,224,3,2,33,58,23,195,1,23,196,1,27,248, -22,136,5,23,195,1,248,80,159,38,53,36,193,159,35,20,103,159,35,16,1, -65,98,101,103,105,110,16,0,83,158,41,20,100,143,67,35,37,117,116,105,108, -115,2,1,11,11,10,10,42,80,158,35,35,20,103,159,37,16,17,30,2,1, -2,2,193,30,2,1,2,3,193,30,2,1,2,4,193,30,2,1,2,5,193, -30,2,1,2,6,193,30,2,1,2,7,193,30,2,1,2,8,193,30,2,1, -2,9,193,30,2,1,2,10,193,30,2,1,2,11,193,30,2,1,2,12,193, -30,2,1,2,13,193,30,2,1,2,14,193,30,2,1,2,15,193,30,2,1, -2,16,193,30,2,18,1,20,112,97,114,97,109,101,116,101,114,105,122,97,116, -105,111,110,45,107,101,121,4,30,2,18,1,23,101,120,116,101,110,100,45,112, -97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,3,16,0,11,11,16, -0,35,16,0,35,16,4,2,6,2,5,2,3,2,9,39,11,11,38,35,11, -11,16,11,2,8,2,7,2,16,2,15,2,13,2,12,2,4,2,11,2,14, -2,10,2,2,16,11,11,11,11,11,11,11,11,11,11,11,11,16,11,2,8, -2,7,2,16,2,15,2,13,2,12,2,4,2,11,2,14,2,10,2,2,46, -46,36,11,11,16,0,16,0,16,0,35,35,11,11,11,16,0,16,0,16,0, -35,35,16,0,16,17,83,158,35,16,2,89,162,43,36,48,2,19,223,0,33, -29,80,159,35,53,36,83,158,35,16,2,89,162,8,44,36,55,2,19,223,0, -33,30,80,159,35,52,36,83,158,35,16,2,32,0,89,162,43,36,44,2,2, -222,33,31,80,159,35,35,36,83,158,35,16,2,249,22,159,6,7,92,7,92, -80,159,35,36,36,83,158,35,16,2,89,162,43,36,53,2,4,223,0,33,32, -80,159,35,37,36,83,158,35,16,2,32,0,89,162,8,44,37,49,2,5,222, -33,33,80,159,35,38,36,83,158,35,16,2,32,0,89,162,8,44,38,50,2, -6,222,33,35,80,159,35,39,36,83,158,35,16,2,89,162,8,45,37,47,2, -7,223,0,33,37,80,159,35,40,36,83,158,35,16,2,32,0,89,162,43,39, -51,2,8,222,33,40,80,159,35,41,36,83,158,35,16,2,32,0,89,162,43, -38,49,2,9,222,33,41,80,159,35,42,36,83,158,35,16,2,32,0,89,162, -43,37,52,2,10,222,33,42,80,159,35,43,36,83,158,35,16,2,32,0,89, -162,43,37,53,2,11,222,33,43,80,159,35,44,36,83,158,35,16,2,32,0, -89,162,43,36,43,2,12,222,33,44,80,159,35,45,36,83,158,35,16,2,83, -158,38,20,96,96,2,13,89,162,43,35,43,9,223,0,33,45,89,162,43,36, -44,9,223,0,33,46,89,162,43,37,54,9,223,0,33,47,80,159,35,46,36, -83,158,35,16,2,27,248,22,182,13,248,22,168,7,27,28,249,22,162,8,247, -22,176,7,2,21,6,1,1,59,6,1,1,58,250,22,141,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,14,223,0,33,50,80,159,35,47,36,83,158,35,16,2,83, -158,38,20,96,96,2,15,89,162,8,44,38,53,9,223,0,33,55,89,162,43, -37,46,9,223,0,33,56,89,162,43,36,45,9,223,0,33,57,80,159,35,48, -36,83,158,35,16,2,89,162,43,38,51,2,16,223,0,33,59,80,159,35,49, -36,94,29,94,2,17,68,35,37,107,101,114,110,101,108,11,29,94,2,17,69, -35,37,109,105,110,45,115,116,120,11,9,9,9,35,0}; - EVAL_ONE_SIZED_STR((char *)expr, 5075); +87,94,23,195,1,87,94,28,192,12,250,22,130,9,2,10,2,26,23,201,2, +249,22,7,194,195,27,249,22,146,13,249,22,155,7,250,22,130,14,0,9,35, +114,120,35,34,91,46,93,34,248,22,142,13,23,203,1,6,1,1,95,28,248, +22,157,6,23,202,2,249,22,169,7,23,203,1,8,63,23,201,1,28,248,22, +137,13,23,199,2,248,22,138,13,23,199,1,87,94,23,198,1,247,22,139,13, +28,248,22,136,13,194,249,22,154,13,195,194,192,249,247,22,188,4,194,11,249, +80,158,37,46,9,9,249,80,158,37,46,195,9,27,247,22,179,13,249,80,158, +38,47,28,23,195,2,27,248,22,174,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,154, +13,248,22,175,13,69,97,100,100,111,110,45,100,105,114,247,22,172,7,6,8, +8,99,111,108,108,101,99,116,115,11,27,248,80,159,41,52,36,250,22,78,23, +203,1,248,22,74,248,22,175,13,72,99,111,108,108,101,99,116,115,45,100,105, +114,23,204,1,28,23,194,2,249,22,64,23,196,1,23,195,1,192,32,47,89, +162,8,44,38,54,2,18,222,33,48,27,249,22,186,13,23,197,2,23,198,2, +28,23,193,2,87,94,23,196,1,27,248,22,89,23,195,2,27,27,248,22,98, +23,197,1,27,249,22,186,13,23,201,2,23,196,2,28,23,193,2,87,94,23, +194,1,27,248,22,89,23,195,2,27,250,2,47,23,203,2,23,204,1,248,22, +98,23,199,1,28,249,22,151,7,23,196,2,2,27,249,22,78,23,202,2,194, +249,22,64,248,22,145,13,23,197,1,23,195,1,87,95,23,199,1,23,193,1, +28,249,22,151,7,23,196,2,2,27,249,22,78,23,200,2,9,249,22,64,248, +22,145,13,23,197,1,9,28,249,22,151,7,23,196,2,2,27,249,22,78,197, +194,87,94,23,196,1,249,22,64,248,22,145,13,23,197,1,194,87,94,23,193, +1,28,249,22,151,7,23,198,2,2,27,249,22,78,195,9,87,94,23,194,1, +249,22,64,248,22,145,13,23,199,1,9,87,95,28,28,248,22,145,7,194,10, +248,22,157,6,194,12,250,22,129,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,73, +195,249,22,4,22,136,13,196,11,12,250,22,129,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,157, +6,197,248,22,168,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,157,13,23,199,2, +87,95,23,195,1,23,194,1,27,28,23,198,2,27,248,22,162,13,23,201,2, +28,249,22,164,8,23,195,2,23,202,2,11,28,248,22,158,13,23,194,2,250, +2,51,23,201,2,23,202,2,249,22,154,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,136,13,23,196,2,27,249,22,154,13,23,198,2,23,201,2,28,28, +248,22,149,13,193,10,248,22,148,13,193,192,11,11,28,23,193,2,192,87,94, +23,193,1,28,23,199,2,11,27,248,22,162,13,23,202,2,28,249,22,164,8, +23,195,2,23,203,1,11,28,248,22,158,13,23,194,2,250,2,51,23,202,1, +23,203,1,249,22,154,13,23,201,1,23,198,1,250,2,51,201,202,195,194,28, +248,22,72,23,197,2,11,27,248,22,161,13,248,22,65,23,199,2,27,249,22, +154,13,23,196,1,23,197,2,28,248,22,148,13,23,194,2,250,2,51,198,199, +195,87,94,23,193,1,27,248,22,66,23,200,1,28,248,22,72,23,194,2,11, +27,248,22,161,13,248,22,65,23,196,2,27,249,22,154,13,23,196,1,23,200, +2,28,248,22,148,13,23,194,2,250,2,51,201,202,195,87,94,23,193,1,27, +248,22,66,23,197,1,28,248,22,72,23,194,2,11,27,248,22,161,13,248,22, +65,195,27,249,22,154,13,23,196,1,202,28,248,22,148,13,193,250,2,51,204, +205,195,251,2,50,204,205,206,248,22,66,199,87,95,28,27,248,22,136,13,23, +196,2,28,23,193,2,192,87,94,23,193,1,28,248,22,157,6,23,196,2,27, +248,22,158,13,23,197,2,28,23,193,2,192,87,94,23,193,1,248,22,159,13, +23,197,2,11,12,250,22,129,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,136,13,23,197,2,28,23,193,2,192,87,94, +23,193,1,28,248,22,157,6,23,197,2,27,248,22,158,13,23,198,2,28,23, +193,2,192,87,94,23,193,1,248,22,159,13,23,198,2,11,248,22,158,13,23, +196,2,11,10,12,250,22,129,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,158,13,23,195,2,91,159,38,11,90,161,38,35, +11,248,22,157,13,23,198,2,249,22,162,8,194,68,114,101,108,97,116,105,118, +101,11,27,248,22,174,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,158,43,47,23,200,1,9,28,249, +22,162,8,247,22,176,7,2,20,249,22,64,248,22,145,13,5,1,46,23,195, +1,192,9,27,248,22,161,13,23,196,1,28,248,22,148,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,148,6,247,22,184,4,195,248,22,174,5,249,22,170,3,35,249,22,154, +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,175,13,2,19,27,249,80,158,40,48,23,196,1,11,27, +27,248,22,173,3,23,200,1,28,192,192,35,27,27,248,22,173,3,23,202,1, +28,192,192,35,249,22,151,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,136,5,23,195, +1,248,80,159,38,53,36,193,159,35,20,103,159,35,16,1,11,16,0,83,158, +41,20,100,143,67,35,37,117,116,105,108,115,29,11,11,11,11,10,10,42,80, +158,35,35,20,103,159,37,16,17,2,1,2,2,2,3,2,4,2,5,2,6, +2,7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,2,15,30,2,17, +1,20,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101, +121,4,30,2,17,1,23,101,120,116,101,110,100,45,112,97,114,97,109,101,116, +101,114,105,122,97,116,105,111,110,3,16,0,11,11,16,0,35,16,0,35,16, +4,2,5,2,4,2,2,2,8,39,11,11,38,35,11,11,16,11,2,7,2, +6,2,15,2,14,2,12,2,11,2,3,2,10,2,13,2,9,2,1,16,11, +11,11,11,11,11,11,11,11,11,11,11,16,11,2,7,2,6,2,15,2,14, +2,12,2,11,2,3,2,10,2,13,2,9,2,1,46,46,36,11,11,16,0, +16,0,16,0,35,35,11,11,11,16,0,16,0,16,0,35,35,16,0,16,17, +83,158,35,16,2,89,162,43,36,48,2,18,223,0,33,28,80,159,35,53,36, +83,158,35,16,2,89,162,8,44,36,55,2,18,223,0,33,29,80,159,35,52, +36,83,158,35,16,2,32,0,89,162,43,36,44,2,1,222,33,30,80,159,35, +35,36,83,158,35,16,2,249,22,159,6,7,92,7,92,80,159,35,36,36,83, +158,35,16,2,89,162,43,36,53,2,3,223,0,33,31,80,159,35,37,36,83, +158,35,16,2,32,0,89,162,8,44,37,49,2,4,222,33,32,80,159,35,38, +36,83,158,35,16,2,32,0,89,162,8,44,38,50,2,5,222,33,34,80,159, +35,39,36,83,158,35,16,2,89,162,8,45,37,47,2,6,223,0,33,36,80, +159,35,40,36,83,158,35,16,2,32,0,89,162,43,39,51,2,7,222,33,39, +80,159,35,41,36,83,158,35,16,2,32,0,89,162,43,38,49,2,8,222,33, +40,80,159,35,42,36,83,158,35,16,2,32,0,89,162,43,37,52,2,9,222, +33,41,80,159,35,43,36,83,158,35,16,2,32,0,89,162,43,37,53,2,10, +222,33,42,80,159,35,44,36,83,158,35,16,2,32,0,89,162,43,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,182,13,248,22,168,7,27,28,249,22,162,8,247,22,176,7,2,20,6, +1,1,59,6,1,1,58,250,22,141,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,96,96,2, +14,89,162,8,44,38,53,9,223,0,33,54,89,162,43,37,46,9,223,0,33, +55,89,162,43,36,45,9,223,0,33,56,80,159,35,48,36,83,158,35,16,2, +89,162,43,38,51,2,15,223,0,33,58,80,159,35,49,36,94,29,94,2,16, +68,35,37,107,101,114,110,101,108,11,29,94,2,16,69,35,37,109,105,110,45, +115,116,120,11,9,9,9,35,0}; + EVAL_ONE_SIZED_STR((char *)expr, 5006); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,53,8,0,0,0,1,0,0,6,0,19,0, -34,0,48,0,62,0,76,0,111,0,0,0,6,1,0,0,65,113,117,111,116, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,54,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, 11,29,94,2,1,68,35,37,101,120,112,111,98,115,11,29,94,2,1,68,35, 37,107,101,114,110,101,108,11,98,10,35,11,8,186,245,97,159,2,2,35,35, 159,2,3,35,35,159,2,4,35,35,159,2,5,35,35,159,2,6,35,35,16, -0,159,35,20,103,159,35,16,1,65,98,101,103,105,110,16,0,83,158,41,20, -100,143,69,35,37,98,117,105,108,116,105,110,29,11,11,11,10,10,18,96,11, -42,42,42,35,80,158,35,35,20,103,159,35,16,0,16,0,11,11,16,0,35, -16,0,35,16,0,35,11,11,38,35,11,11,16,0,16,0,16,0,35,35,36, -11,11,16,0,16,0,16,0,35,35,11,11,11,16,0,16,0,16,0,35,35, -16,0,16,0,99,2,6,2,5,29,94,2,1,69,35,37,102,111,114,101,105, -103,110,11,2,4,2,3,2,2,29,94,2,1,67,35,37,112,108,97,99,101, -11,9,9,9,35,0}; - EVAL_ONE_SIZED_STR((char *)expr, 299); +0,159,35,20,103,159,35,16,1,11,16,0,83,158,41,20,100,143,69,35,37, +98,117,105,108,116,105,110,29,11,11,11,10,10,18,96,11,42,42,42,35,80, +158,35,35,20,103,159,35,16,0,16,0,11,11,16,0,35,16,0,35,16,0, +35,11,11,38,35,11,11,16,0,16,0,16,0,35,35,36,11,11,16,0,16, +0,16,0,35,35,11,11,11,16,0,16,0,16,0,35,35,16,0,16,0,99, +2,6,2,5,29,94,2,1,69,35,37,102,111,114,101,105,103,110,11,2,4, +2,3,2,2,29,94,2,1,67,35,37,112,108,97,99,101,11,9,9,9,35, +0}; + EVAL_ONE_SIZED_STR((char *)expr, 294); } { - static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,53,53,0,0,0,1,0,0,3,0,14,0, -41,0,47,0,60,0,74,0,96,0,122,0,134,0,152,0,172,0,184,0,200, -0,223,0,3,1,8,1,13,1,18,1,27,1,32,1,63,1,67,1,75,1, -83,1,91,1,194,1,239,1,3,2,31,2,62,2,117,2,127,2,174,2,184, -2,191,2,78,4,91,4,110,4,229,4,241,4,137,5,151,5,15,6,21,6, -35,6,62,6,147,6,149,6,214,6,149,12,208,12,240,12,0,0,171,15,0, -0,29,11,11,70,100,108,108,45,115,117,102,102,105,120,1,25,100,101,102,97, -117,108,116,45,108,111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100, -65,113,117,111,116,101,29,94,2,4,67,35,37,117,116,105,108,115,11,29,94, -2,4,68,35,37,112,97,114,97,109,122,11,1,20,100,101,102,97,117,108,116, -45,114,101,97,100,101,114,45,103,117,97,114,100,1,24,45,109,111,100,117,108, -101,45,104,97,115,104,45,116,97,98,108,101,45,116,97,98,108,101,71,45,112, -97,116,104,45,99,97,99,104,101,77,45,108,111,97,100,105,110,103,45,102,105, -108,101,110,97,109,101,79,45,108,111,97,100,105,110,103,45,112,114,111,109,112, -116,45,116,97,103,71,45,112,114,101,118,45,114,101,108,116,111,75,45,112,114, -101,118,45,114,101,108,116,111,45,100,105,114,1,21,115,112,108,105,116,45,114, -101,108,97,116,105,118,101,45,115,116,114,105,110,103,1,34,109,97,107,101,45, -115,116,97,110,100,97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45, -114,101,115,111,108,118,101,114,64,98,111,111,116,64,115,97,109,101,5,3,46, -122,111,6,6,6,110,97,116,105,118,101,64,108,111,111,112,1,29,115,116,97, -110,100,97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45,114,101,115, -111,108,118,101,114,63,108,105,98,67,105,103,110,111,114,101,100,249,22,14,195, -80,158,37,45,249,80,159,37,48,36,195,10,27,28,23,195,2,28,249,22,162, -8,23,197,2,80,158,38,46,87,94,23,195,1,80,158,36,47,27,248,22,171, -4,23,197,2,28,248,22,136,13,23,194,2,91,159,38,11,90,161,38,35,11, -248,22,157,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,189,4,28,192,192,247,22,176,13,20,14,159,80,158,35,39,250,80,158,38, -40,249,22,27,11,80,158,40,39,22,189,4,28,248,22,136,13,23,198,2,23, -197,1,87,94,23,197,1,247,22,176,13,247,194,250,22,154,13,23,197,1,23, -199,1,249,80,158,42,38,23,198,1,2,18,252,22,154,13,23,199,1,23,201, -1,2,19,247,22,177,7,249,80,158,44,38,23,200,1,80,158,44,35,87,94, -23,194,1,27,250,22,171,13,196,11,32,0,89,162,8,44,35,40,9,222,11, -28,192,249,22,64,195,194,11,27,252,22,154,13,23,200,1,23,202,1,2,19, -247,22,177,7,249,80,158,45,38,23,201,1,80,158,45,35,27,250,22,171,13, -196,11,32,0,89,162,8,44,35,40,9,222,11,28,192,249,22,64,195,194,11, -249,247,22,181,13,248,22,65,195,195,27,250,22,154,13,23,198,1,23,200,1, -249,80,158,43,38,23,199,1,2,18,27,250,22,171,13,196,11,32,0,89,162, -8,44,35,40,9,222,11,28,192,249,22,64,195,194,11,249,247,22,187,4,248, -22,65,195,195,249,247,22,187,4,194,195,87,94,28,248,80,158,36,37,23,195, -2,12,250,22,129,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,160,13,23,201,2,23,200,1,27,247,22,189,4,28,23,193,2, -249,22,161,13,23,203,1,23,195,1,200,90,161,38,36,11,248,22,157,13,23, -194,2,87,94,23,196,1,90,161,36,39,11,28,249,22,162,8,23,196,2,68, -114,101,108,97,116,105,118,101,87,94,23,194,1,2,17,23,194,1,90,161,36, -40,11,247,22,178,13,27,89,162,43,36,49,62,122,111,225,7,5,3,33,28, -27,89,162,43,36,51,9,225,8,6,4,33,29,27,249,22,5,89,162,8,44, -36,46,9,223,5,33,30,23,203,2,27,28,23,195,1,27,249,22,5,89,162, -8,44,36,52,9,225,13,11,9,33,31,23,205,2,27,28,23,196,2,11,193, -28,192,192,28,193,28,23,196,2,28,249,22,166,3,248,22,66,196,248,22,66, -23,199,2,193,11,11,11,11,28,23,193,2,249,80,159,47,54,36,202,89,162, -43,35,45,9,224,14,2,33,32,87,94,23,193,1,27,28,23,197,1,27,249, -22,5,83,158,39,20,97,94,89,162,8,44,36,50,9,225,14,12,10,33,33, -23,203,1,23,206,1,27,28,196,11,193,28,192,192,28,193,28,196,28,249,22, -166,3,248,22,66,196,248,22,66,199,193,11,11,11,11,28,192,249,80,159,48, -54,36,203,89,162,43,35,45,9,224,15,2,33,34,249,80,159,48,54,36,203, -89,162,43,35,44,9,224,15,7,33,35,32,37,89,162,8,44,36,54,2,20, -222,33,39,0,17,35,114,120,34,94,40,46,42,63,41,47,40,46,42,41,36, -34,27,249,22,186,13,2,38,23,196,2,28,23,193,2,87,94,23,194,1,249, -22,64,248,22,89,23,196,2,27,248,22,98,23,197,1,27,249,22,186,13,2, -38,23,196,2,28,23,193,2,87,94,23,194,1,249,22,64,248,22,89,23,196, -2,27,248,22,98,23,197,1,27,249,22,186,13,2,38,23,196,2,28,23,193, -2,87,94,23,194,1,249,22,64,248,22,89,23,196,2,248,2,37,248,22,98, -23,197,1,248,22,74,194,248,22,74,194,248,22,74,194,32,40,89,162,43,36, -54,2,20,222,33,41,28,248,22,72,248,22,66,23,195,2,249,22,7,9,248, -22,65,195,91,159,37,11,90,161,37,35,11,27,248,22,66,23,197,2,28,248, -22,72,248,22,66,23,195,2,249,22,7,9,248,22,65,195,91,159,37,11,90, -161,37,35,11,27,248,22,66,23,197,2,28,248,22,72,248,22,66,23,195,2, -249,22,7,9,248,22,65,195,91,159,37,11,90,161,37,35,11,248,2,40,248, -22,66,23,197,2,249,22,7,249,22,64,248,22,65,23,200,1,23,197,1,195, + static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,7,52,46,49,46,51,46,54,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,80,1, +88,1,191,1,236,1,0,2,28,2,59,2,114,2,124,2,171,2,181,2,188, +2,75,4,88,4,107,4,226,4,238,4,134,5,148,5,12,6,18,6,32,6, +59,6,144,6,146,6,211,6,146,12,205,12,237,12,0,0,116,15,0,0,70, +100,108,108,45,115,117,102,102,105,120,1,25,100,101,102,97,117,108,116,45,108, +111,97,100,47,117,115,101,45,99,111,109,112,105,108,101,100,65,113,117,111,116, +101,29,94,2,3,67,35,37,117,116,105,108,115,11,29,94,2,3,68,35,37, +112,97,114,97,109,122,11,1,20,100,101,102,97,117,108,116,45,114,101,97,100, +101,114,45,103,117,97,114,100,1,24,45,109,111,100,117,108,101,45,104,97,115, +104,45,116,97,98,108,101,45,116,97,98,108,101,71,45,112,97,116,104,45,99, +97,99,104,101,77,45,108,111,97,100,105,110,103,45,102,105,108,101,110,97,109, +101,79,45,108,111,97,100,105,110,103,45,112,114,111,109,112,116,45,116,97,103, +71,45,112,114,101,118,45,114,101,108,116,111,75,45,112,114,101,118,45,114,101, +108,116,111,45,100,105,114,1,21,115,112,108,105,116,45,114,101,108,97,116,105, +118,101,45,115,116,114,105,110,103,1,34,109,97,107,101,45,115,116,97,110,100, +97,114,100,45,109,111,100,117,108,101,45,110,97,109,101,45,114,101,115,111,108, +118,101,114,64,98,111,111,116,64,115,97,109,101,5,3,46,122,111,6,6,6, +110,97,116,105,118,101,64,108,111,111,112,1,29,115,116,97,110,100,97,114,100, +45,109,111,100,117,108,101,45,110,97,109,101,45,114,101,115,111,108,118,101,114, +63,108,105,98,67,105,103,110,111,114,101,100,249,22,14,195,80,158,37,45,249, +80,159,37,48,36,195,10,27,28,23,195,2,28,249,22,162,8,23,197,2,80, +158,38,46,87,94,23,195,1,80,158,36,47,27,248,22,171,4,23,197,2,28, +248,22,136,13,23,194,2,91,159,38,11,90,161,38,35,11,248,22,157,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,189,4,28,192, +192,247,22,176,13,20,14,159,80,158,35,39,250,80,158,38,40,249,22,27,11, +80,158,40,39,22,189,4,28,248,22,136,13,23,198,2,23,197,1,87,94,23, +197,1,247,22,176,13,247,194,250,22,154,13,23,197,1,23,199,1,249,80,158, +42,38,23,198,1,2,17,252,22,154,13,23,199,1,23,201,1,2,18,247,22, +177,7,249,80,158,44,38,23,200,1,80,158,44,35,87,94,23,194,1,27,250, +22,171,13,196,11,32,0,89,162,8,44,35,40,9,222,11,28,192,249,22,64, +195,194,11,27,252,22,154,13,23,200,1,23,202,1,2,18,247,22,177,7,249, +80,158,45,38,23,201,1,80,158,45,35,27,250,22,171,13,196,11,32,0,89, +162,8,44,35,40,9,222,11,28,192,249,22,64,195,194,11,249,247,22,181,13, +248,22,65,195,195,27,250,22,154,13,23,198,1,23,200,1,249,80,158,43,38, +23,199,1,2,17,27,250,22,171,13,196,11,32,0,89,162,8,44,35,40,9, +222,11,28,192,249,22,64,195,194,11,249,247,22,187,4,248,22,65,195,195,249, +247,22,187,4,194,195,87,94,28,248,80,158,36,37,23,195,2,12,250,22,129, +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,160, +13,23,201,2,23,200,1,27,247,22,189,4,28,23,193,2,249,22,161,13,23, +203,1,23,195,1,200,90,161,38,36,11,248,22,157,13,23,194,2,87,94,23, +196,1,90,161,36,39,11,28,249,22,162,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,178, +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,192,28,193, +28,23,196,2,28,249,22,166,3,248,22,66,196,248,22,66,23,199,2,193,11, +11,11,11,28,23,193,2,249,80,159,47,54,36,202,89,162,43,35,45,9,224, +14,2,33,31,87,94,23,193,1,27,28,23,197,1,27,249,22,5,83,158,39, +20,97,94,89,162,8,44,36,50,9,225,14,12,10,33,32,23,203,1,23,206, +1,27,28,196,11,193,28,192,192,28,193,28,196,28,249,22,166,3,248,22,66, +196,248,22,66,199,193,11,11,11,11,28,192,249,80,159,48,54,36,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,186, +13,2,37,23,196,2,28,23,193,2,87,94,23,194,1,249,22,64,248,22,89, +23,196,2,27,248,22,98,23,197,1,27,249,22,186,13,2,37,23,196,2,28, +23,193,2,87,94,23,194,1,249,22,64,248,22,89,23,196,2,27,248,22,98, +23,197,1,27,249,22,186,13,2,37,23,196,2,28,23,193,2,87,94,23,194, +1,249,22,64,248,22,89,23,196,2,248,2,36,248,22,98,23,197,1,248,22, +74,194,248,22,74,194,248,22,74,194,32,39,89,162,43,36,54,2,19,222,33, +40,28,248,22,72,248,22,66,23,195,2,249,22,7,9,248,22,65,195,91,159, +37,11,90,161,37,35,11,27,248,22,66,23,197,2,28,248,22,72,248,22,66, +23,195,2,249,22,7,9,248,22,65,195,91,159,37,11,90,161,37,35,11,27, +248,22,66,23,197,2,28,248,22,72,248,22,66,23,195,2,249,22,7,9,248, +22,65,195,91,159,37,11,90,161,37,35,11,248,2,39,248,22,66,23,197,2, 249,22,7,249,22,64,248,22,65,23,200,1,23,197,1,195,249,22,7,249,22, -64,248,22,65,23,200,1,23,197,1,195,27,248,2,37,23,195,1,28,194,192, -248,2,40,193,87,95,28,248,22,169,4,195,12,250,22,129,9,2,21,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,138, -2,80,158,41,42,248,22,142,14,247,22,183,11,11,28,23,193,2,192,87,94, -23,193,1,27,247,22,122,87,94,250,22,136,2,80,158,42,42,248,22,142,14, -247,22,183,11,195,192,250,22,136,2,195,198,66,97,116,116,97,99,104,251,211, -197,198,199,10,28,192,250,22,128,9,11,196,195,248,22,190,8,194,28,249,22, -163,6,194,6,1,1,46,2,17,28,249,22,163,6,194,6,2,2,46,46,62, -117,112,192,28,249,22,164,8,248,22,66,23,200,2,23,197,1,28,249,22,162, -8,248,22,65,23,200,2,23,196,1,251,22,190,8,2,21,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,66,248,22,79,249,22,64,23,206,1,23, -202,1,12,12,247,192,20,14,159,80,158,39,44,249,22,64,248,22,142,14,247, -22,183,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,151,4,23,196,1,249,247,22,188,4,23,198,1,248,22, -53,248,22,140,13,23,198,1,87,94,28,28,248,22,136,13,23,197,2,10,248, -22,175,4,23,197,2,12,28,23,198,2,250,22,128,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,129,9,2, -21,6,19,19,109,111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,97, -116,104,23,199,2,28,28,248,22,62,23,197,2,249,22,162,8,248,22,65,23, -199,2,2,4,11,248,22,170,4,248,22,89,197,28,28,248,22,62,23,197,2, -249,22,162,8,248,22,65,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,183,11,23,197,1,90,161,36,35,10,249,22,152,4,21,94,2,22,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,45,27,28,248,22,52,23,199,2,27,250,22,138,2, -80,158,43,43,249,22,64,23,204,2,247,22,177,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, -55,23,204,2,11,27,251,80,158,47,50,2,21,23,202,1,28,248,22,72,23, -199,2,23,199,2,248,22,65,23,199,2,28,248,22,72,23,199,2,9,248,22, -66,23,199,2,249,22,154,13,23,195,1,28,248,22,72,23,197,1,87,94,23, -197,1,6,7,7,109,97,105,110,46,115,115,249,22,180,6,23,199,1,6,3, -3,46,115,115,28,248,22,157,6,23,199,2,87,94,23,194,1,27,248,80,159, -41,55,36,23,201,2,27,250,22,138,2,80,158,44,43,249,22,64,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,154,13,23,199,1, -249,22,78,249,22,2,32,0,89,162,8,44,36,43,9,222,33,46,23,200,1, -248,22,74,23,200,1,28,248,22,136,13,23,199,2,87,94,23,194,1,28,248, -22,159,13,23,199,2,23,198,2,248,22,74,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,162,8,248,22,65,23,201,2,2,22,27,250,22,138,2,80,158,43,43, -249,22,64,23,204,2,247,22,177,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,89,23,205,2, -11,90,161,36,37,11,28,248,22,72,248,22,91,23,204,2,28,248,22,72,23, -194,2,249,22,188,13,0,8,35,114,120,34,91,46,93,34,23,196,2,11,10, -27,27,28,23,197,2,249,22,78,28,248,22,72,248,22,91,23,208,2,21,93, -6,5,5,109,122,108,105,98,249,22,1,22,78,249,22,2,80,159,51,56,36, -248,22,91,23,211,2,23,197,2,28,248,22,72,23,196,2,248,22,74,23,197, -2,23,195,2,251,80,158,49,50,2,21,23,204,1,248,22,65,23,198,2,248, -22,66,23,198,1,249,22,154,13,23,195,1,28,23,198,1,87,94,23,196,1, -23,197,1,28,248,22,72,23,197,1,87,94,23,197,1,6,7,7,109,97,105, -110,46,115,115,28,249,22,188,13,0,8,35,114,120,34,91,46,93,34,23,199, -2,23,197,1,249,22,180,6,23,199,1,6,3,3,46,115,115,28,249,22,162, -8,248,22,65,23,201,2,64,102,105,108,101,249,22,161,13,248,22,165,13,248, -22,89,23,202,2,248,80,159,42,55,36,23,202,2,12,87,94,28,28,248,22, -136,13,23,194,2,10,248,22,179,7,23,194,2,87,94,23,200,1,12,28,23, -200,2,250,22,128,9,67,114,101,113,117,105,114,101,249,22,141,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,65,23,199,2,6,0,0,23,203,1,87,94,23,200,1,250,22,129,9, -2,21,249,22,141,7,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126, -97,28,23,198,2,248,22,65,23,199,2,6,0,0,23,201,2,27,28,248,22, -179,7,23,195,2,249,22,184,7,23,196,2,35,249,22,163,13,248,22,164,13, -23,197,2,11,27,28,248,22,179,7,23,196,2,249,22,184,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,179, -7,23,199,2,250,22,7,2,23,249,22,184,7,23,203,2,37,2,23,248,22, -157,13,23,198,2,87,95,23,195,1,23,193,1,27,28,248,22,179,7,23,200, -2,249,22,184,7,23,201,2,38,249,80,158,47,52,23,197,2,5,0,27,28, -248,22,179,7,23,201,2,249,22,184,7,23,202,2,39,248,22,170,4,23,200, -2,27,27,250,22,138,2,80,158,51,42,248,22,142,14,247,22,183,11,11,28, -23,193,2,192,87,94,23,193,1,27,247,22,122,87,94,250,22,136,2,80,158, -52,42,248,22,142,14,247,22,183,11,195,192,87,95,28,23,209,1,27,250,22, -138,2,23,197,2,197,11,28,23,193,1,12,87,95,27,27,28,248,22,17,80, -158,51,45,80,158,50,45,247,22,19,250,22,25,248,22,23,23,197,2,80,158, -53,44,23,196,1,27,248,22,142,14,247,22,183,11,249,22,3,83,158,39,20, -97,94,89,162,8,44,36,54,9,226,12,11,2,3,33,47,23,195,1,23,196, -1,248,28,248,22,17,80,158,50,45,32,0,89,162,43,36,41,9,222,33,48, -80,159,49,57,36,89,162,43,35,50,9,227,14,9,8,4,3,33,49,250,22, -136,2,23,197,1,197,10,12,28,28,248,22,179,7,23,202,1,11,27,248,22, -157,6,23,208,2,28,192,192,28,248,22,62,23,208,2,249,22,162,8,248,22, -65,23,210,2,2,22,11,250,22,136,2,80,158,50,43,28,248,22,157,6,23, -210,2,249,22,64,23,211,1,248,80,159,53,55,36,23,213,1,87,94,23,210, -1,249,22,64,23,211,1,247,22,177,13,252,22,181,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,21,89,162,8,44,36,50,9,224,2,0, -33,43,89,162,43,38,48,9,223,1,33,44,89,162,43,39,8,30,9,225,2, -3,0,33,50,208,87,95,248,22,150,4,248,80,158,37,49,247,22,183,11,248, -22,188,4,80,158,36,36,248,22,174,12,80,159,36,41,36,159,35,20,103,159, -35,16,1,65,98,101,103,105,110,16,0,83,158,41,20,100,143,66,35,37,98, -111,111,116,2,1,11,11,10,10,36,80,158,35,35,20,103,159,39,16,19,30, -2,1,2,2,193,30,2,1,2,3,193,30,2,5,72,112,97,116,104,45,115, -116,114,105,110,103,63,10,30,2,5,75,112,97,116,104,45,97,100,100,45,115, -117,102,102,105,120,7,30,2,6,1,20,112,97,114,97,109,101,116,101,114,105, -122,97,116,105,111,110,45,107,101,121,4,30,2,6,1,23,101,120,116,101,110, -100,45,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,3,30,2, -1,2,7,193,30,2,1,2,8,193,30,2,1,2,9,193,30,2,1,2,10, -193,30,2,1,2,11,193,30,2,1,2,12,193,30,2,1,2,13,193,30,2, -1,2,14,193,30,2,1,2,15,193,30,2,5,69,45,102,105,110,100,45,99, -111,108,0,30,2,5,76,110,111,114,109,97,108,45,99,97,115,101,45,112,97, -116,104,6,30,2,5,79,112,97,116,104,45,114,101,112,108,97,99,101,45,115, -117,102,102,105,120,9,30,2,1,2,16,193,16,0,11,11,16,0,35,16,0, -35,16,11,2,10,2,11,2,8,2,9,2,12,2,13,2,3,2,7,2,2, -2,15,2,14,46,11,11,38,35,11,11,16,1,2,16,16,1,11,16,1,2, -16,36,36,36,11,11,16,0,16,0,16,0,35,35,11,11,11,16,0,16,0, -16,0,35,35,16,0,16,16,83,158,35,16,2,89,162,43,36,44,9,223,0, -33,24,80,159,35,57,36,83,158,35,16,2,89,162,43,36,44,9,223,0,33, -25,80,159,35,56,36,83,158,35,16,2,89,162,43,36,48,67,103,101,116,45, -100,105,114,223,0,33,26,80,159,35,55,36,83,158,35,16,2,89,162,43,37, -48,68,119,105,116,104,45,100,105,114,223,0,33,27,80,159,35,54,36,83,158, -35,16,2,248,22,176,7,69,115,111,45,115,117,102,102,105,120,80,159,35,35, -36,83,158,35,16,2,89,162,43,37,59,2,3,223,0,33,36,80,159,35,36, -36,83,158,35,16,2,32,0,89,162,8,44,36,41,2,7,222,192,80,159,35, -41,36,83,158,35,16,2,247,22,125,80,159,35,42,36,83,158,35,16,2,247, -22,124,80,159,35,43,36,83,158,35,16,2,247,22,60,80,159,35,44,36,83, -158,35,16,2,248,22,18,74,109,111,100,117,108,101,45,108,111,97,100,105,110, -103,80,159,35,45,36,83,158,35,16,2,11,80,158,35,46,83,158,35,16,2, -11,80,158,35,47,83,158,35,16,2,32,0,89,162,43,37,44,2,14,222,33, -42,80,159,35,48,36,83,158,35,16,2,89,162,8,44,36,44,2,15,223,0, -33,51,80,159,35,49,36,83,158,35,16,2,89,162,43,35,43,2,16,223,0, -33,52,80,159,35,53,36,95,29,94,2,4,68,35,37,107,101,114,110,101,108, -11,29,94,2,4,69,35,37,109,105,110,45,115,116,120,11,2,5,9,9,9, -35,0}; - EVAL_ONE_SIZED_STR((char *)expr, 4138); +64,248,22,65,23,200,1,23,197,1,195,249,22,7,249,22,64,248,22,65,23, +200,1,23,197,1,195,27,248,2,36,23,195,1,28,194,192,248,2,39,193,87, +95,28,248,22,169,4,195,12,250,22,129,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,138,2,80,158,41,42, +248,22,142,14,247,22,183,11,11,28,23,193,2,192,87,94,23,193,1,27,247, +22,122,87,94,250,22,136,2,80,158,42,42,248,22,142,14,247,22,183,11,195, +192,250,22,136,2,195,198,66,97,116,116,97,99,104,251,211,197,198,199,10,28, +192,250,22,128,9,11,196,195,248,22,190,8,194,28,249,22,163,6,194,6,1, +1,46,2,16,28,249,22,163,6,194,6,2,2,46,46,62,117,112,192,28,249, +22,164,8,248,22,66,23,200,2,23,197,1,28,249,22,162,8,248,22,65,23, +200,2,23,196,1,251,22,190,8,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,66,248,22,79,249,22,64,23,206,1,23,202,1,12,12,247, +192,20,14,159,80,158,39,44,249,22,64,248,22,142,14,247,22,183,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,151,4,23,196,1,249,247,22,188,4,23,198,1,248,22,53,248,22,140,13, +23,198,1,87,94,28,28,248,22,136,13,23,197,2,10,248,22,175,4,23,197, +2,12,28,23,198,2,250,22,128,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,129,9,2,20,6,19,19,109, +111,100,117,108,101,45,112,97,116,104,32,111,114,32,112,97,116,104,23,199,2, +28,28,248,22,62,23,197,2,249,22,162,8,248,22,65,23,199,2,2,3,11, +248,22,170,4,248,22,89,197,28,28,248,22,62,23,197,2,249,22,162,8,248, +22,65,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,183,11,23, +197,1,90,161,36,35,10,249,22,152,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,52,23,199,2,27,250,22,138,2,80,158,43,43,249, +22,64,23,204,2,247,22,177,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,55,23,204,2,11, +27,251,80,158,47,50,2,20,23,202,1,28,248,22,72,23,199,2,23,199,2, +248,22,65,23,199,2,28,248,22,72,23,199,2,9,248,22,66,23,199,2,249, +22,154,13,23,195,1,28,248,22,72,23,197,1,87,94,23,197,1,6,7,7, +109,97,105,110,46,115,115,249,22,180,6,23,199,1,6,3,3,46,115,115,28, +248,22,157,6,23,199,2,87,94,23,194,1,27,248,80,159,41,55,36,23,201, +2,27,250,22,138,2,80,158,44,43,249,22,64,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,154,13,23,199,1,249,22,78,249,22, +2,32,0,89,162,8,44,36,43,9,222,33,45,23,200,1,248,22,74,23,200, +1,28,248,22,136,13,23,199,2,87,94,23,194,1,28,248,22,159,13,23,199, +2,23,198,2,248,22,74,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,162,8,248, +22,65,23,201,2,2,21,27,250,22,138,2,80,158,43,43,249,22,64,23,204, +2,247,22,177,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,89,23,205,2,11,90,161,36,37, +11,28,248,22,72,248,22,91,23,204,2,28,248,22,72,23,194,2,249,22,188, +13,0,8,35,114,120,34,91,46,93,34,23,196,2,11,10,27,27,28,23,197, +2,249,22,78,28,248,22,72,248,22,91,23,208,2,21,93,6,5,5,109,122, +108,105,98,249,22,1,22,78,249,22,2,80,159,51,56,36,248,22,91,23,211, +2,23,197,2,28,248,22,72,23,196,2,248,22,74,23,197,2,23,195,2,251, +80,158,49,50,2,20,23,204,1,248,22,65,23,198,2,248,22,66,23,198,1, +249,22,154,13,23,195,1,28,23,198,1,87,94,23,196,1,23,197,1,28,248, +22,72,23,197,1,87,94,23,197,1,6,7,7,109,97,105,110,46,115,115,28, +249,22,188,13,0,8,35,114,120,34,91,46,93,34,23,199,2,23,197,1,249, +22,180,6,23,199,1,6,3,3,46,115,115,28,249,22,162,8,248,22,65,23, +201,2,64,102,105,108,101,249,22,161,13,248,22,165,13,248,22,89,23,202,2, +248,80,159,42,55,36,23,202,2,12,87,94,28,28,248,22,136,13,23,194,2, +10,248,22,179,7,23,194,2,87,94,23,200,1,12,28,23,200,2,250,22,128, +9,67,114,101,113,117,105,114,101,249,22,141,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,65,23,199, +2,6,0,0,23,203,1,87,94,23,200,1,250,22,129,9,2,20,249,22,141, +7,6,13,13,109,111,100,117,108,101,32,112,97,116,104,126,97,28,23,198,2, +248,22,65,23,199,2,6,0,0,23,201,2,27,28,248,22,179,7,23,195,2, +249,22,184,7,23,196,2,35,249,22,163,13,248,22,164,13,23,197,2,11,27, +28,248,22,179,7,23,196,2,249,22,184,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,179,7,23,199,2,250, +22,7,2,22,249,22,184,7,23,203,2,37,2,22,248,22,157,13,23,198,2, +87,95,23,195,1,23,193,1,27,28,248,22,179,7,23,200,2,249,22,184,7, +23,201,2,38,249,80,158,47,52,23,197,2,5,0,27,28,248,22,179,7,23, +201,2,249,22,184,7,23,202,2,39,248,22,170,4,23,200,2,27,27,250,22, +138,2,80,158,51,42,248,22,142,14,247,22,183,11,11,28,23,193,2,192,87, +94,23,193,1,27,247,22,122,87,94,250,22,136,2,80,158,52,42,248,22,142, +14,247,22,183,11,195,192,87,95,28,23,209,1,27,250,22,138,2,23,197,2, +197,11,28,23,193,1,12,87,95,27,27,28,248,22,17,80,158,51,45,80,158, +50,45,247,22,19,250,22,25,248,22,23,23,197,2,80,158,53,44,23,196,1, +27,248,22,142,14,247,22,183,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,158,50,45,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,136,2,23,197,1, +197,10,12,28,28,248,22,179,7,23,202,1,11,27,248,22,157,6,23,208,2, +28,192,192,28,248,22,62,23,208,2,249,22,162,8,248,22,65,23,210,2,2, +21,11,250,22,136,2,80,158,50,43,28,248,22,157,6,23,210,2,249,22,64, +23,211,1,248,80,159,53,55,36,23,213,1,87,94,23,210,1,249,22,64,23, +211,1,247,22,177,13,252,22,181,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,150,4,248,80,158,37,49,247,22,183,11,248,22,188,4,80,158, +36,36,248,22,174,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,115,117,102,102,105,120,7,30,2,5,1,20,112,97,114,97,109,101, +116,101,114,105,122,97,116,105,111,110,45,107,101,121,4,30,2,5,1,23,101, +120,116,101,110,100,45,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111, +110,3,2,6,2,7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,30, +2,4,69,45,102,105,110,100,45,99,111,108,0,30,2,4,76,110,111,114,109, +97,108,45,99,97,115,101,45,112,97,116,104,6,30,2,4,79,112,97,116,104, +45,114,101,112,108,97,99,101,45,115,117,102,102,105,120,9,2,15,16,0,11, +11,16,0,35,16,0,35,16,11,2,9,2,10,2,7,2,8,2,11,2,12, +2,2,2,6,2,1,2,14,2,13,46,11,11,38,35,11,11,16,1,2,15, +16,1,11,16,1,2,15,36,36,36,11,11,16,0,16,0,16,0,35,35,11, +11,11,16,0,16,0,16,0,35,35,16,0,16,16,83,158,35,16,2,89,162, +43,36,44,9,223,0,33,23,80,159,35,57,36,83,158,35,16,2,89,162,43, +36,44,9,223,0,33,24,80,159,35,56,36,83,158,35,16,2,89,162,43,36, +48,67,103,101,116,45,100,105,114,223,0,33,25,80,159,35,55,36,83,158,35, +16,2,89,162,43,37,48,68,119,105,116,104,45,100,105,114,223,0,33,26,80, +159,35,54,36,83,158,35,16,2,248,22,176,7,69,115,111,45,115,117,102,102, +105,120,80,159,35,35,36,83,158,35,16,2,89,162,43,37,59,2,2,223,0, +33,35,80,159,35,36,36,83,158,35,16,2,32,0,89,162,8,44,36,41,2, +6,222,192,80,159,35,41,36,83,158,35,16,2,247,22,125,80,159,35,42,36, +83,158,35,16,2,247,22,124,80,159,35,43,36,83,158,35,16,2,247,22,60, +80,159,35,44,36,83,158,35,16,2,248,22,18,74,109,111,100,117,108,101,45, +108,111,97,100,105,110,103,80,159,35,45,36,83,158,35,16,2,11,80,158,35, +46,83,158,35,16,2,11,80,158,35,47,83,158,35,16,2,32,0,89,162,43, +37,44,2,13,222,33,41,80,159,35,48,36,83,158,35,16,2,89,162,8,44, +36,44,2,14,223,0,33,50,80,159,35,49,36,83,158,35,16,2,89,162,43, +35,43,2,15,223,0,33,51,80,159,35,53,36,95,29,94,2,3,68,35,37, +107,101,114,110,101,108,11,29,94,2,3,69,35,37,109,105,110,45,115,116,120, +11,2,4,9,9,9,35,0}; + EVAL_ONE_SIZED_STR((char *)expr, 4081); } diff --git a/src/mzscheme/src/env.c b/src/mzscheme/src/env.c index 3c25b28ce0..3b467e7e66 100644 --- a/src/mzscheme/src/env.c +++ b/src/mzscheme/src/env.c @@ -123,6 +123,8 @@ static Scheme_Object *write_toplevel(Scheme_Object *obj); static Scheme_Object *read_toplevel(Scheme_Object *obj); static Scheme_Object *write_variable(Scheme_Object *obj); static Scheme_Object *read_variable(Scheme_Object *obj); +static Scheme_Object *write_module_variable(Scheme_Object *obj); +static Scheme_Object *read_module_variable(Scheme_Object *obj); static Scheme_Object *write_local(Scheme_Object *obj); static Scheme_Object *read_local(Scheme_Object *obj); static Scheme_Object *read_local_unbox(Scheme_Object *obj); @@ -561,8 +563,8 @@ static void make_kernel_env(void) scheme_install_type_reader(scheme_toplevel_type, read_toplevel); scheme_install_type_writer(scheme_variable_type, write_variable); scheme_install_type_reader(scheme_variable_type, read_variable); - scheme_install_type_writer(scheme_module_variable_type, write_variable); - scheme_install_type_reader(scheme_module_variable_type, read_variable); + scheme_install_type_writer(scheme_module_variable_type, write_module_variable); + scheme_install_type_reader(scheme_module_variable_type, read_module_variable); scheme_install_type_writer(scheme_local_type, write_local); scheme_install_type_reader(scheme_local_type, read_local); scheme_install_type_writer(scheme_local_unbox_type, write_local); @@ -3319,7 +3321,7 @@ void scheme_optimize_info_done(Optimize_Info *info) Resolve_Prefix *scheme_resolve_prefix(int phase, Comp_Prefix *cp, int simplify) { Resolve_Prefix *rp; - Scheme_Object **tls, **stxes, *simplify_cache; + Scheme_Object **tls, **stxes, *simplify_cache, *m; Scheme_Hash_Table *ht; int i; @@ -3344,7 +3346,15 @@ Resolve_Prefix *scheme_resolve_prefix(int phase, Comp_Prefix *cp, int simplify) if (ht) { for (i = 0; i < ht->size; i++) { if (ht->vals[i]) { - tls[SCHEME_TOPLEVEL_POS(ht->vals[i])] = ht->keys[i]; + m = ht->keys[i]; + if (SAME_TYPE(SCHEME_TYPE(m), scheme_module_variable_type)) { + if (SCHEME_FALSEP(((Scheme_Modidx *)((Module_Variable *)m)->modidx)->base) + && SCHEME_FALSEP(((Scheme_Modidx *)((Module_Variable *)m)->modidx)->path)) { + /* Reduce self-referece to just a symbol: */ + m = ((Module_Variable *)m)->sym; + } + } + tls[SCHEME_TOPLEVEL_POS(ht->vals[i])] = m; } } } @@ -4941,92 +4951,54 @@ static Scheme_Object *read_toplevel(Scheme_Object *obj) } static Scheme_Object *write_variable(Scheme_Object *obj) - /* WARNING: phase-0 module variables and #%kernel references - are handled in print.c, instead */ + /* #%kernel references are handled in print.c, instead */ { - if (SAME_TYPE(scheme_variable_type, SCHEME_TYPE(obj))) { - Scheme_Object *sym; - Scheme_Env *home; - Scheme_Module *m; + Scheme_Object *sym; + Scheme_Env *home; + Scheme_Module *m; - sym = (Scheme_Object *)(SCHEME_VAR_BUCKET(obj))->key; + sym = (Scheme_Object *)(SCHEME_VAR_BUCKET(obj))->key; - home = ((Scheme_Bucket_With_Home *)obj)->home; - m = home->module; + home = ((Scheme_Bucket_With_Home *)obj)->home; + m = home->module; - /* If we get a writeable variable (instead of a module variable), - it must be a reference to a module referenced directly by its - a symbolic name (i.e., no path). */ + /* If we get a writeable variable (instead of a module variable), + it must be a reference to a module referenced directly by its + a symbolic name (i.e., no path). */ - if (m) { - sym = scheme_make_pair(m->modname, sym); - if (home->mod_phase) - sym = scheme_make_pair(scheme_make_integer(home->mod_phase), sym); - } - - return sym; - } else { - Module_Variable *mv = (Module_Variable *)obj; - - return scheme_make_pair(scheme_make_integer(mv->mod_phase), - scheme_make_pair(mv->modidx, - mv->sym)); + if (m) { + sym = scheme_make_pair(m->modname, sym); + if (home->mod_phase) + sym = scheme_make_pair(scheme_make_integer(home->mod_phase), sym); } + + return sym; } static Scheme_Object *read_variable(Scheme_Object *obj) - /* WARNING: phase-0 module variables and #%kernel references - are handled in read.c, instead */ + /* #%kernel references are handled in read.c, instead */ { Scheme_Env *env; env = scheme_get_env(NULL); - if (!SCHEME_SYMBOLP(obj)) { - /* Find variable from module. */ - Scheme_Object *modname, *varname; - int mod_phase = 0; - - if (!SCHEME_PAIRP(obj)) return NULL; - - modname = SCHEME_CAR(obj); - - if (SCHEME_INTP(modname)) { - mod_phase = SCHEME_INT_VAL(modname); - if (mod_phase != 1) return NULL; - - obj = SCHEME_CDR(obj); - - if (!SCHEME_PAIRP(obj)) return NULL; - modname = SCHEME_CAR(obj); - } - - varname = SCHEME_CDR(obj); - - if (SAME_OBJ(modname, kernel_symbol) && !mod_phase) { - return (Scheme_Object *)scheme_global_bucket(varname, scheme_get_kernel_env()); - } else { - Module_Variable *mv; - Scheme_Object *insp; - - insp = scheme_get_param(scheme_current_config(), MZCONFIG_CODE_INSPECTOR); - - mv = MALLOC_ONE_TAGGED(Module_Variable); - mv->so.type = scheme_module_variable_type; - - mv->modidx = modname; - mv->sym = varname; - mv->insp = insp; - mv->pos = -1; - mv->mod_phase = mod_phase; - - return (Scheme_Object *)mv; - } - } + if (!SCHEME_SYMBOLP(obj)) return NULL; return (Scheme_Object *)scheme_global_bucket(obj, env); } +static Scheme_Object *write_module_variable(Scheme_Object *obj) +{ + scheme_signal_error("module variables should have been handled in print.c"); + return NULL; +} + +static Scheme_Object *read_module_variable(Scheme_Object *obj) +{ + scheme_signal_error("module variables should have been handled in read.c"); + return NULL; +} + static Scheme_Object *write_local(Scheme_Object *obj) { return scheme_make_integer(SCHEME_LOCAL_POS(obj)); @@ -5128,9 +5100,16 @@ static Scheme_Object *read_resolve_prefix(Scheme_Object *obj) if (SCHEME_FALSEP(stx)) { stx = NULL; } else if (SCHEME_RPAIRP(stx)) { - rp->delay_info = (struct Scheme_Load_Delay *)SCHEME_CDR(stx); - rp->delay_refcount++; + struct Scheme_Load_Delay *d; + Scheme_Object *pr; + d = (struct Scheme_Load_Delay *)SCHEME_CDR(stx); stx = SCHEME_CAR(stx); + pr = rp->delay_info_rpair; + if (!pr) { + pr = scheme_make_raw_pair(scheme_make_integer(0), (Scheme_Object *)d); + rp->delay_info_rpair = pr; + } + SCHEME_CAR(pr) = scheme_make_integer(SCHEME_INT_VAL(SCHEME_CAR(pr)) + 1); } else { if (!SCHEME_STXP(stx)) return NULL; } diff --git a/src/mzscheme/src/eval.c b/src/mzscheme/src/eval.c index f30247d33c..5fb9529f3c 100644 --- a/src/mzscheme/src/eval.c +++ b/src/mzscheme/src/eval.c @@ -1721,20 +1721,23 @@ Scheme_Object *scheme_make_syntax_compiled(int idx, Scheme_Object *data) static Scheme_Object *link_module_variable(Scheme_Object *modidx, Scheme_Object *varname, - Scheme_Object *insp, + int check_access, Scheme_Object *insp, int pos, int mod_phase, - Scheme_Env *env) + Scheme_Env *env, + Scheme_Object **exprs, int which) { Scheme_Object *modname; Scheme_Env *menv; + int self = 0; /* If it's a name id, resolve the name. */ modname = scheme_module_resolve(modidx, 1); if (env->module && SAME_OBJ(env->module->modname, modname) - && (env->mod_phase == mod_phase)) + && (env->mod_phase == mod_phase)) { + self = 1; menv = env; - else { + } else { menv = scheme_module_access(modname, env, mod_phase); if (!menv && env->phase) { @@ -1757,22 +1760,57 @@ static Scheme_Object *link_module_variable(Scheme_Object *modidx, return NULL; } - if (!SAME_OBJ(menv, env)) { + if (check_access && !SAME_OBJ(menv, env)) { varname = scheme_check_accessible_in_module(menv, insp, NULL, varname, NULL, NULL, insp, pos, 0, NULL, env); } } + if (exprs) { + if (self) { + exprs[which] = varname; + } else { + if (mod_phase != 0) + modname = scheme_make_pair(modname, scheme_make_integer(mod_phase)); + modname = scheme_make_pair(varname, modname); + exprs[which] = modname; + } + } + return (Scheme_Object *)scheme_global_bucket(varname, menv); } -static Scheme_Object *link_toplevel(Scheme_Object *expr, Scheme_Env *env, +static Scheme_Object *link_toplevel(Scheme_Object **exprs, int which, Scheme_Env *env, Scheme_Object *src_modidx, Scheme_Object *dest_modidx) { - if (SCHEME_SYMBOLP(expr)) { + Scheme_Object *expr = exprs[which]; + + if (SCHEME_FALSEP(expr)) { /* See scheme_make_environment_dummy */ return (Scheme_Object *)scheme_global_bucket(begin_symbol, env); + } else if (SCHEME_PAIRP(expr) || SCHEME_SYMBOLP(expr)) { + /* Simplified module reference */ + Scheme_Object *modname, *varname; + int mod_phase = 0; + if (SCHEME_SYMBOLP(expr)) { + varname = expr; + modname = env->module->modname; + mod_phase = env->mod_phase; + } else { + varname = SCHEME_CAR(expr); + modname = SCHEME_CDR(expr); + if (SCHEME_PAIRP(modname)) { + mod_phase = SCHEME_INT_VAL(SCHEME_CDR(modname)); + modname = SCHEME_CAR(modname); + } + } + return link_module_variable(modname, + varname, + 0, NULL, + -1, mod_phase, + env, + NULL, 0); } else if (SAME_TYPE(SCHEME_TYPE(expr), scheme_variable_type)) { Scheme_Bucket_With_Home *b = (Scheme_Bucket_With_Home *)expr; @@ -1781,18 +1819,20 @@ static Scheme_Object *link_toplevel(Scheme_Object *expr, Scheme_Env *env, else return link_module_variable(b->home->module->modname, (Scheme_Object *)b->bucket.bucket.key, - b->home->module->insp, + 1, b->home->module->insp, -1, b->home->mod_phase, - env); + env, + exprs, which); } else { Module_Variable *mv = (Module_Variable *)expr; return link_module_variable(scheme_modidx_shift(mv->modidx, - src_modidx, - dest_modidx), - mv->sym, mv->insp, + src_modidx, + dest_modidx), + mv->sym, 1, mv->insp, mv->pos, mv->mod_phase, - env); + env, + exprs, which); } } @@ -8589,6 +8629,7 @@ static void *eval_k(void) v = _scheme_eval_linked_expr_wp(v, p); } else if (SAME_TYPE(SCHEME_TYPE(v), scheme_compilation_top_type)) { Scheme_Compilation_Top *top = (Scheme_Compilation_Top *)v; + Resolve_Prefix *rp; int depth; depth = top->max_let_depth + scheme_prefix_depth(top->prefix); @@ -8604,6 +8645,9 @@ static void *eval_k(void) if (use_jit) v = scheme_jit_expr(v); + else + v = scheme_eval_clone(v); + rp = scheme_prefix_eval_clone(top->prefix); save_runstack = scheme_push_prefix(env, top->prefix, NULL, NULL, 0, env->phase); @@ -9689,6 +9733,60 @@ local_eval(int argc, Scheme_Object **argv) return scheme_void; } +/*========================================================================*/ +/* cloning prefix information */ +/*========================================================================*/ + +Scheme_Object *scheme_eval_clone(Scheme_Object *expr) +{ + /* Clone as much as necessary of `expr' so that prefixes are + cloned. Cloned prefixes, in turn, can be updated by linking to + reduce the overhead of cross-module references. */ + if (SAME_TYPE(SCHEME_TYPE(expr), scheme_syntax_type)) { + int kind; + Scheme_Object *orig, *naya; + + kind = SCHEME_PINT_VAL(expr); + orig = SCHEME_IPTR_VAL(expr); + switch (kind) { + case MODULE_EXPD: + naya = scheme_module_eval_clone(orig); + break; + case DEFINE_SYNTAX_EXPD: + case DEFINE_FOR_SYNTAX_EXPD: + naya = scheme_syntaxes_eval_clone(orig); + break; + default: + naya = orig; + break; + } + + if (SAME_OBJ(orig, naya)) + return expr; + + return scheme_make_syntax_resolved(kind, naya); + } else + return expr; +} + +Resolve_Prefix *scheme_prefix_eval_clone(Resolve_Prefix *rp) +{ + Resolve_Prefix *naya; + Scheme_Object **tls; + + if (!rp->num_toplevels) + return rp; + + naya = MALLOC_ONE_TAGGED(Resolve_Prefix); + memcpy(naya, rp, sizeof(Resolve_Prefix)); + + tls = MALLOC_N(Scheme_Object*, rp->num_toplevels); + memcpy(tls, rp->toplevels, sizeof(Scheme_Object *) * rp->num_toplevels); + naya->toplevels = tls; + + return naya; +} + /*========================================================================*/ /* creating/pushing prefix for top-levels and syntax objects */ /*========================================================================*/ @@ -9725,7 +9823,7 @@ Scheme_Object **scheme_push_prefix(Scheme_Env *genv, Resolve_Prefix *rp, for (i = 0; i < rp->num_toplevels; i++) { v = rp->toplevels[i]; if (genv) - v = link_toplevel(rp->toplevels[i], genv, src_modidx, now_modidx); + v = link_toplevel(rp->toplevels, i, genv, src_modidx, now_modidx); a[i] = v; } @@ -9733,7 +9831,7 @@ Scheme_Object **scheme_push_prefix(Scheme_Env *genv, Resolve_Prefix *rp, i = rp->num_toplevels; v = scheme_stx_phase_shift_as_rename(now_phase - src_phase, src_modidx, now_modidx, genv ? genv->export_registry : NULL); - if (v || rp->delay_info) { + if (v || (rp->delay_info_rpair && SCHEME_CDR(rp->delay_info_rpair))) { /* Put lazy-shift info in a[i]: */ Scheme_Object **ls; ls = MALLOC_N(Scheme_Object *, 2); @@ -9926,15 +10024,17 @@ int scheme_validate_rator_wants_box(Scheme_Object *app_rator, int pos, int num_toplevels, int num_stxes, int num_lifts) { Scheme_Closure_Data *data = NULL; + Scheme_Type ty; while (1) { - if (SAME_TYPE(SCHEME_TYPE(app_rator), scheme_closure_type)) { + ty = SCHEME_TYPE(app_rator); + if (SAME_TYPE(ty, scheme_closure_type)) { data = SCHEME_COMPILED_CLOS_CODE(app_rator); break; - } else if (SAME_TYPE(SCHEME_TYPE(app_rator), scheme_unclosed_procedure_type)) { + } else if (SAME_TYPE(ty, scheme_unclosed_procedure_type)) { data = (Scheme_Closure_Data *)app_rator; break; - } else if (SAME_TYPE(SCHEME_TYPE(app_rator), scheme_toplevel_type)) { + } else if (SAME_TYPE(ty, scheme_toplevel_type)) { int p; p = SCHEME_TOPLEVEL_POS(app_rator); while (1) { diff --git a/src/mzscheme/src/module.c b/src/mzscheme/src/module.c index 5873332de8..a1c2b39b40 100644 --- a/src/mzscheme/src/module.c +++ b/src/mzscheme/src/module.c @@ -3942,6 +3942,9 @@ void scheme_run_module_exptime(Scheme_Env *menv, int set_ns) for_stx = SCHEME_TRUEP(SCHEME_VEC_ELS(e)[4]); e = SCHEME_VEC_ELS(e)[1]; + if (SCHEME_SYMBOLP(names)) + names = scheme_make_pair(names, scheme_null); + eval_exptime(names, scheme_list_length(names), e, exp_env, rhs_env, rp, let_depth, 1, (for_stx ? for_stx_globals : syntax), for_stx, NULL); @@ -4602,7 +4605,7 @@ module_execute(Scheme_Object *data) return scheme_void; } -static Scheme_Object *rebuild_et_vec(Scheme_Object *naya, Scheme_Object *vec) +static Scheme_Object *rebuild_et_vec(Scheme_Object *naya, Scheme_Object *vec, Resolve_Prefix *rp) { Scheme_Object *vec2; int i; @@ -4613,23 +4616,35 @@ static Scheme_Object *rebuild_et_vec(Scheme_Object *naya, Scheme_Object *vec) SCHEME_VEC_ELS(vec2)[i] = SCHEME_VEC_ELS(vec)[i]; } SCHEME_VEC_ELS(vec2)[1] = naya; + SCHEME_VEC_ELS(vec2)[3] = (Scheme_Object *)rp; return vec2; } -static Scheme_Object *jit_vector(Scheme_Object *orig_l, int in_vec) +static Scheme_Object *jit_vector(Scheme_Object *orig_l, int in_vec, int jit) { Scheme_Object *orig, *naya = NULL; + Resolve_Prefix *orig_rp, *rp; int i, cnt; cnt = SCHEME_VEC_SIZE(orig_l); for (i = 0; i < cnt; i++) { orig = SCHEME_VEC_ELS(orig_l)[i]; - if (in_vec) + if (in_vec) { + orig_rp = (Resolve_Prefix *)SCHEME_VEC_ELS(orig)[3]; + rp = scheme_prefix_eval_clone(orig_rp); orig = SCHEME_VEC_ELS(orig)[1]; + } else { + orig_rp = rp = NULL; + } - naya = scheme_jit_expr(orig); - if (!SAME_OBJ(orig, naya)) + if (jit) + naya = scheme_jit_expr(orig); + else + naya = orig; + + if (!SAME_OBJ(orig, naya) + || !SAME_OBJ(orig_rp, rp)) break; } @@ -4641,16 +4656,27 @@ static Scheme_Object *jit_vector(Scheme_Object *orig_l, int in_vec) SCHEME_VEC_ELS(new_l)[j] = SCHEME_VEC_ELS(orig_l)[j]; } if (in_vec) - naya = rebuild_et_vec(naya, SCHEME_VEC_ELS(orig_l)[i]); + naya = rebuild_et_vec(naya, SCHEME_VEC_ELS(orig_l)[i], rp); SCHEME_VEC_ELS(new_l)[i] = naya; for (i++; i < cnt; i++) { orig = SCHEME_VEC_ELS(orig_l)[i]; - if (in_vec) - orig = SCHEME_VEC_ELS(orig)[1]; - naya = scheme_jit_expr(orig); if (in_vec) { - if (!SAME_OBJ(orig, naya)) - naya = rebuild_et_vec(naya, SCHEME_VEC_ELS(orig_l)[i]); + orig_rp = (Resolve_Prefix *)SCHEME_VEC_ELS(orig)[3]; + rp = scheme_prefix_eval_clone(orig_rp); + orig = SCHEME_VEC_ELS(orig)[1]; + } else { + orig_rp = rp = NULL; + } + + if (jit) + naya = scheme_jit_expr(orig); + else + naya = orig; + + if (in_vec) { + if (!SAME_OBJ(orig, naya) + || !SAME_OBJ(rp, orig_rp)) + naya = rebuild_et_vec(naya, SCHEME_VEC_ELS(orig_l)[i], rp); else naya = SCHEME_VEC_ELS(orig_l)[i]; } @@ -4661,25 +4687,44 @@ static Scheme_Object *jit_vector(Scheme_Object *orig_l, int in_vec) return orig_l; } -static Scheme_Object *module_jit(Scheme_Object *data) +static Scheme_Object *do_module_clone(Scheme_Object *data, int jit) { Scheme_Module *m = (Scheme_Module *)data; Scheme_Object *l1, *l2; + Resolve_Prefix *rp; + + rp = scheme_prefix_eval_clone(m->prefix); - l1 = jit_vector(m->body, 0); - l2 = jit_vector(m->et_body, 1); + if (jit) + l1 = jit_vector(m->body, 0, jit); + else + l1 = m->body; + l2 = jit_vector(m->et_body, 1, jit); - if (SAME_OBJ(l1, m->body) && SAME_OBJ(l2, m->body)) + if (SAME_OBJ(l1, m->body) + && SAME_OBJ(l2, m->body) + && SAME_OBJ(rp, m->prefix)) return data; m = MALLOC_ONE_TAGGED(Scheme_Module); memcpy(m, data, sizeof(Scheme_Module)); m->body = l1; m->et_body = l2; + m->prefix = rp; return (Scheme_Object *)m; } +static Scheme_Object *module_jit(Scheme_Object *data) +{ + return do_module_clone(data, 1); +} + +Scheme_Object *scheme_module_eval_clone(Scheme_Object *data) +{ + return do_module_clone(data, 0); +} + static void module_validate(Scheme_Object *data, Mz_CPort *port, char *stack, Validate_TLS tls, int depth, int letlimit, int delta, @@ -6115,7 +6160,9 @@ static Scheme_Object *do_module_begin(Scheme_Object *form, Scheme_Comp_Env *env, /* Add code with names and lexical depth to exp-time body: */ vec = scheme_make_vector(5, NULL); - SCHEME_VEC_ELS(vec)[0] = names; + SCHEME_VEC_ELS(vec)[0] = ((SCHEME_PAIRP(names) && SCHEME_NULLP(SCHEME_CDR(names))) + ? SCHEME_CAR(names) + : names); SCHEME_VEC_ELS(vec)[1] = m; SCHEME_VEC_ELS(vec)[2] = scheme_make_integer(ri->max_let_depth); SCHEME_VEC_ELS(vec)[3] = (Scheme_Object *)rp; @@ -6125,6 +6172,7 @@ static Scheme_Object *do_module_begin(Scheme_Object *form, Scheme_Comp_Env *env, m = scheme_sfs(m, NULL, ri->max_let_depth); if (ri->use_jit) m = scheme_jit_expr(m); + rp = scheme_prefix_eval_clone(rp); eval_exptime(names, count, m, eenv->genv, rhs_env, rp, ri->max_let_depth, 0, (for_stx ? env->genv->exp_env->toplevel : env->genv->syntax), for_stx, diff --git a/src/mzscheme/src/mzmark.c b/src/mzscheme/src/mzmark.c index ec88cbf267..d9d1ed3e61 100644 --- a/src/mzscheme/src/mzmark.c +++ b/src/mzscheme/src/mzmark.c @@ -2191,7 +2191,7 @@ static int resolve_prefix_val_MARK(void *p) { Resolve_Prefix *rp = (Resolve_Prefix *)p; gcMARK(rp->toplevels); gcMARK(rp->stxes); - gcMARK(rp->delay_info); + gcMARK(rp->delay_info_rpair); return gcBYTES_TO_WORDS(sizeof(Resolve_Prefix)); @@ -2201,7 +2201,7 @@ static int resolve_prefix_val_FIXUP(void *p) { Resolve_Prefix *rp = (Resolve_Prefix *)p; gcFIXUP(rp->toplevels); gcFIXUP(rp->stxes); - gcFIXUP(rp->delay_info); + gcFIXUP(rp->delay_info_rpair); return gcBYTES_TO_WORDS(sizeof(Resolve_Prefix)); diff --git a/src/mzscheme/src/mzmarksrc.c b/src/mzscheme/src/mzmarksrc.c index 6b9bd076bd..b398e8113f 100644 --- a/src/mzscheme/src/mzmarksrc.c +++ b/src/mzscheme/src/mzmarksrc.c @@ -870,7 +870,7 @@ resolve_prefix_val { Resolve_Prefix *rp = (Resolve_Prefix *)p; gcMARK(rp->toplevels); gcMARK(rp->stxes); - gcMARK(rp->delay_info); + gcMARK(rp->delay_info_rpair); size: gcBYTES_TO_WORDS(sizeof(Resolve_Prefix)); diff --git a/src/mzscheme/src/print.c b/src/mzscheme/src/print.c index 0fbbc2fe6a..e148da794e 100644 --- a/src/mzscheme/src/print.c +++ b/src/mzscheme/src/print.c @@ -2358,8 +2358,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, symtab_set(pp, mt, obj); } } - else if (compact && SAME_TYPE(SCHEME_TYPE(obj), scheme_module_variable_type) - && !((Module_Variable *)obj)->mod_phase) + else if (compact && SAME_TYPE(SCHEME_TYPE(obj), scheme_module_variable_type)) { Scheme_Object *idx; @@ -2378,7 +2377,11 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, print(mv->modidx, notdisplay, 1, ht, mt, pp); } print(mv->sym, notdisplay, 1, ht, mt, pp); - print_compact_number(pp, mv->pos); + if (((Module_Variable *)obj)->mod_phase) { + /* mod_phase must be 1 */ + print_compact_number(pp, -2); + } + print_compact_number(pp, mv->pos); symtab_set(pp, mt, obj); } diff --git a/src/mzscheme/src/read.c b/src/mzscheme/src/read.c index f80452e61e..8ed4ee2c56 100644 --- a/src/mzscheme/src/read.c +++ b/src/mzscheme/src/read.c @@ -4357,7 +4357,7 @@ static Scheme_Object *read_compact_svector(CPort *port, int l) return o; } -static int cpt_branch[256]; +static unsigned char cpt_branch[256]; static Scheme_Object *read_compact(CPort *port, int use_stack); @@ -4377,8 +4377,7 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) unsigned int l; char *s, buffer[BLK_BUF_SIZE]; int ch; - int need_car = 0, proper = 0; - Scheme_Object *v, *first = NULL, *last = NULL; + Scheme_Object *v; #ifdef DO_STACK_CHECK { @@ -4392,7 +4391,7 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) } #endif - while (1) { + { ZO_CHECK(port->pos < port->size); ch = CP_GETC(port); @@ -4530,30 +4529,22 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) SCHEME_SET_IMMUTABLE(v); break; case CPT_PAIR: - if (need_car) { + { Scheme_Object *car, *cdr; car = read_compact(port, 0); cdr = read_compact(port, 0); v = scheme_make_pair(car, cdr); - } else { - need_car = 1; - continue; } break; case CPT_LIST: l = read_compact_number(port); - if (need_car) { - if (l == 1) { - Scheme_Object *car, *cdr; - car = read_compact(port, 0); - cdr = read_compact(port, 0); - v = scheme_make_pair(car, cdr); - } else - v = read_compact_list(l, 0, 0, port); - } else { - need_car = l; - continue; - } + if (l == 1) { + Scheme_Object *car, *cdr; + car = read_compact(port, 0); + cdr = read_compact(port, 0); + v = scheme_make_pair(car, cdr); + } else + v = read_compact_list(l, 0, 0, port); break; case CPT_VECTOR: { @@ -4761,7 +4752,12 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) mv->modidx = mod; mv->insp = port->insp; mv->sym = var; - mv->pos = pos; + if (pos == -2) { + mv->mod_phase = 1; + pos = read_compact_number(port); + mv->pos = pos; + } else + mv->pos = pos; v = (Scheme_Object *)mv; } @@ -4887,21 +4883,15 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) { int ppr = CPT_BETWEEN(ch, SMALL_PROPER_LIST); l = ch - (ppr ? CPT_SMALL_PROPER_LIST_START : CPT_SMALL_LIST_START); - if (need_car) { - if (l == 1) { - Scheme_Object *car, *cdr; - car = read_compact(port, 0); - cdr = (ppr - ? scheme_null - : read_compact(port, 0)); - v = scheme_make_pair(car, cdr); - } else - v = read_compact_list(l, ppr, /* use_stack */ 0, port); - } else { - proper = ppr; - need_car = l; - continue; - } + if (l == 1) { + Scheme_Object *car, *cdr; + car = read_compact(port, 0); + cdr = (ppr + ? scheme_null + : read_compact(port, 0)); + v = scheme_make_pair(car, cdr); + } else + v = read_compact_list(l, ppr, /* use_stack */ 0, port); } break; case CPT_SMALL_APPLICATION_START: @@ -4975,28 +4965,9 @@ static Scheme_Object *read_compact(CPort *port, int use_stack) if (!v) scheme_ill_formed_code(port); - - if (need_car) { - Scheme_Object *pair; - - pair = scheme_make_pair(v, scheme_null); - - if (last) - SCHEME_CDR(last) = pair; - else - first = pair; - last = pair; - --need_car; - if (!need_car && proper) - break; - } else { - if (last) - SCHEME_CDR(last) = v; - break; - } } - return first ? first : v; + return v; } static Scheme_Object *read_compact_list(int c, int proper, int use_stack, CPort *port) diff --git a/src/mzscheme/src/schpriv.h b/src/mzscheme/src/schpriv.h index 3fec63931a..79a6e1f889 100644 --- a/src/mzscheme/src/schpriv.h +++ b/src/mzscheme/src/schpriv.h @@ -1863,8 +1863,7 @@ typedef struct Resolve_Prefix int num_toplevels, num_stxes, num_lifts; Scheme_Object **toplevels; Scheme_Object **stxes; /* simplified */ - int delay_refcount; - struct Scheme_Load_Delay *delay_info; + Scheme_Object *delay_info_rpair; /* (rcons refcount Scheme_Load_Delay*) */ } Resolve_Prefix; typedef struct Resolve_Info @@ -2394,6 +2393,11 @@ Scheme_Object **scheme_push_prefix(Scheme_Env *genv, Resolve_Prefix *rp, int src_phase, int now_phase); void scheme_pop_prefix(Scheme_Object **rs); +Scheme_Object *scheme_eval_clone(Scheme_Object *expr); +Resolve_Prefix *scheme_prefix_eval_clone(Resolve_Prefix *rp); +Scheme_Object *scheme_module_eval_clone(Scheme_Object *data); +Scheme_Object *scheme_syntaxes_eval_clone(Scheme_Object *form); + Scheme_Object *scheme_make_environment_dummy(Scheme_Comp_Env *env); Scheme_Env *scheme_environment_from_dummy(Scheme_Object *dummy); diff --git a/src/mzscheme/src/schvers.h b/src/mzscheme/src/schvers.h index ae8e6871c9..d46f0d5598 100644 --- a/src/mzscheme/src/schvers.h +++ b/src/mzscheme/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "4.1.3.5" +#define MZSCHEME_VERSION "4.1.3.6" #define MZSCHEME_VERSION_X 4 #define MZSCHEME_VERSION_Y 1 #define MZSCHEME_VERSION_Z 3 -#define MZSCHEME_VERSION_W 5 +#define MZSCHEME_VERSION_W 6 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) diff --git a/src/mzscheme/src/stxobj.c b/src/mzscheme/src/stxobj.c index 0112f00437..9be87b2d56 100644 --- a/src/mzscheme/src/stxobj.c +++ b/src/mzscheme/src/stxobj.c @@ -1823,12 +1823,18 @@ Scheme_Object *scheme_add_rename(Scheme_Object *o, Scheme_Object *rename) void scheme_load_delayed_syntax(struct Resolve_Prefix *rp, long i) { Scheme_Object *stx; + int c; + stx = scheme_load_delayed_code(SCHEME_INT_VAL(rp->stxes[i]), - rp->delay_info); + (struct Scheme_Load_Delay *)SCHEME_CDR(rp->delay_info_rpair)); rp->stxes[i] = stx; - --rp->delay_refcount; - if (!rp->delay_refcount) - rp->delay_info = NULL; + c = SCHEME_INT_VAL(SCHEME_CAR(rp->delay_info_rpair)); + --c; + SCHEME_CAR(rp->delay_info_rpair) = scheme_make_integer(c); + if (!c) { + SCHEME_CDR(rp->delay_info_rpair) = NULL; + rp->delay_info_rpair = NULL; + } } Scheme_Object *scheme_delayed_rename(Scheme_Object **o, long i) diff --git a/src/mzscheme/src/syntax.c b/src/mzscheme/src/syntax.c index 7a1a60fc42..85a738ce65 100644 --- a/src/mzscheme/src/syntax.c +++ b/src/mzscheme/src/syntax.c @@ -5294,29 +5294,44 @@ define_for_syntaxes_execute(Scheme_Object *form) return do_define_syntaxes_execute(form, NULL, 1); } -static Scheme_Object *do_define_syntaxes_jit(Scheme_Object *expr) +static Scheme_Object *do_define_syntaxes_jit(Scheme_Object *expr, int jit) { - Scheme_Object *naya; + Resolve_Prefix *rp, *orig_rp; + Scheme_Object *naya, *rhs; - naya = scheme_jit_expr(SCHEME_VEC_ELS(expr)[0]); + rhs = SCHEME_VEC_ELS(expr)[0]; + if (jit) + naya = scheme_jit_expr(rhs); + else + naya = rhs; + + orig_rp = (Resolve_Prefix *)SCHEME_VEC_ELS(expr)[1]; + rp = scheme_prefix_eval_clone(orig_rp); - if (SAME_OBJ(naya, expr)) + if (SAME_OBJ(naya, rhs) + && SAME_OBJ(orig_rp, rp)) return expr; else { expr = clone_vector(expr, 0); SCHEME_VEC_ELS(expr)[0] = naya; + SCHEME_VEC_ELS(expr)[1] = (Scheme_Object *)rp; return expr; } } static Scheme_Object *define_syntaxes_jit(Scheme_Object *expr) { - return do_define_syntaxes_jit(expr); + return do_define_syntaxes_jit(expr, 1); } static Scheme_Object *define_for_syntaxes_jit(Scheme_Object *expr) { - return do_define_syntaxes_jit(expr); + return do_define_syntaxes_jit(expr, 1); +} + +Scheme_Object *scheme_syntaxes_eval_clone(Scheme_Object *expr) +{ + return do_define_syntaxes_jit(expr, 0); } static void do_define_syntaxes_validate(Scheme_Object *data, Mz_CPort *port, @@ -5611,10 +5626,9 @@ define_for_syntaxes_expand(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Exp Scheme_Object *scheme_make_environment_dummy(Scheme_Comp_Env *env) { /* Get a prefixed-based accessor for a dummy top-level bucket. It's - used to "link" to the right environment at run time. The `begin' - symbol is arbitrary; the top-level/prefix support handles a symbol - as a "toplevel" specially. */ - return scheme_register_toplevel_in_prefix(begin_symbol, env, NULL, 0); + used to "link" to the right environment at run time. The #f as + a toplevel is handled in the prefix linker specially. */ + return scheme_register_toplevel_in_prefix(scheme_false, env, NULL, 0); } Scheme_Env *scheme_environment_from_dummy(Scheme_Object *dummy) diff --git a/src/worksp/mred/mred.manifest b/src/worksp/mred/mred.manifest index 05ff6d22f6..0a148967f0 100644 --- a/src/worksp/mred/mred.manifest +++ b/src/worksp/mred/mred.manifest @@ -1,7 +1,7 @@