further improve procedure? and procedure-arity-includes? optimization on procedure names bound in a module top-level
svn: r14725 original commit: f08649a00772def158bb0c7de05193c362166734
This commit is contained in:
parent
4f812fbd03
commit
8141fbd5cb
|
@ -1,6 +1,7 @@
|
||||||
#lang mzscheme
|
#lang scheme/base
|
||||||
|
|
||||||
(require mzlib/etc
|
(require (for-syntax scheme/base)
|
||||||
|
mzlib/etc
|
||||||
scheme/contract
|
scheme/contract
|
||||||
mzlib/list
|
mzlib/list
|
||||||
"private/port.ss")
|
"private/port.ss")
|
||||||
|
@ -1064,13 +1065,13 @@
|
||||||
(define-syntax (newline-rx stx)
|
(define-syntax (newline-rx stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ str)
|
[(_ str)
|
||||||
(datum->syntax-object
|
(datum->syntax
|
||||||
#'here
|
#'here
|
||||||
(byte-regexp (string->bytes/latin-1
|
(byte-regexp (string->bytes/latin-1
|
||||||
(format "^(?:(.*?)~a)|(.*?$)" (syntax-e #'str)))))]))
|
(format "^(?:(.*?)~a)|(.*?$)" (syntax-e #'str)))))]))
|
||||||
|
|
||||||
(define read-bytes-line-evt
|
(define read-bytes-line-evt
|
||||||
(opt-lambda (input-port [mode 'linefeed])
|
(lambda (input-port [mode 'linefeed])
|
||||||
(wrap-evt
|
(wrap-evt
|
||||||
(regexp-match-evt (case mode
|
(regexp-match-evt (case mode
|
||||||
[(linefeed) (newline-rx "\n")]
|
[(linefeed) (newline-rx "\n")]
|
||||||
|
@ -1085,7 +1086,7 @@
|
||||||
(if (and l (zero? (bytes-length l))) eof l)))))))
|
(if (and l (zero? (bytes-length l))) eof l)))))))
|
||||||
|
|
||||||
(define read-line-evt
|
(define read-line-evt
|
||||||
(opt-lambda (input-port [mode 'linefeed])
|
(lambda (input-port [mode 'linefeed])
|
||||||
(wrap-evt
|
(wrap-evt
|
||||||
(read-bytes-line-evt input-port mode)
|
(read-bytes-line-evt input-port mode)
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user