Changeset 14911
- Timestamp:
- 11/17/16 19:22:56 (7 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/jss/invoke.lisp
r14910 r14911 126 126 (defvar *muffle-warnings* t) 127 127 128 (defvar *muffle-warnings* t) 129 128 130 (defvar *imports-resolved-classes* (make-hash-table :test 'equalp)) 129 131 … … 289 291 (loop while (hasmore entries) 290 292 for name = (getname (next entries)) 291 with class-pattern = ( #"compile" '|java.util.regex.Pattern|".*\\.class$")292 with name-pattern = ( #"compile" '|java.util.regex.Pattern|".*?([^.]*)$")293 with class-pattern = (jstatic "compile" "java.util.regex.Pattern" ".*\\.class$") 294 with name-pattern = (jstatic "compile" "java.util.regex.Pattern" ".*?([^.]*)$") 293 295 when (matches (matcher class-pattern name)) 294 296 collect -
trunk/abcl/contrib/jss/jss.asd
r14910 r14911 2 2 (asdf:defsystem :jss 3 3 :author "Alan Ruttenberg, Mark Evenson" 4 :version "3. 1.1"5 :description "<> asdf:defsystem <urn:abcl.org/release/1.5.0/contrib/jss#3. 1.1>"4 :version "3.2.0" 5 :description "<> asdf:defsystem <urn:abcl.org/release/1.5.0/contrib/jss#3.2.0>" 6 6 :components ((:module base 7 7 :pathname "" :serial t 8 8 :components ((:file "packages") 9 9 (:file "invoke") 10 (:file "optimize-java-call") 10 11 (:file "classpath") 11 12 (:file "compat"))))) -
trunk/abcl/src/org/armedbear/lisp/precompiler.lisp
r14763 r14911 383 383 (when (and (consp op) (eq (%car op) 'LAMBDA)) 384 384 (return-from precompile-function-call 385 (cons (precompile-lambda op) 386 (mapcar #'precompile1 (cdr form))))) 385 (or (precompile-function-position-lambda op (cdr form)) 386 (cons (precompile-lambda op) 387 (mapcar #'precompile1 (cdr form)))))) 387 388 (when (or (not *in-jvm-compile*) (notinline-p op)) 388 389 (return-from precompile-function-call (precompile-cons form))) … … 399 400 (return-from precompile-function-call (precompile1 (expand-inline form expansion)))))) 400 401 (cons op (mapcar #'precompile1 (cdr form))))) 402 403 (defun precompile-function-position-lambda (lambda args) 404 (let* ((arglist (second lambda)) 405 (body (cddr lambda)) 406 (simple-arglist? (not (or (memq '&KEY arglist) (memq '&OPTIONAL arglist) (memq '&REST arglist))))) 407 (or 408 ;;give a chance for someone to transform single-form function bodies 409 (and (= (length body) 1) (consp (car body)) (get (caar body) 'sys::function-position-lambda-transform) 410 (funcall (get (caar body) 'sys::function-position-lambda-transform) (caar body) (car body) (mapcar #'precompile1 args))) 411 (and simple-arglist? 412 (let ((arglist-length (if (memq '&aux arglist) (position '&aux arglist) (length arglist)))) 413 (if (= (length args) arglist-length) 414 ;; simplest case - we have a simple arglist with as many 415 ;; arguments as call args. Transform to let. 416 (return-from precompile-function-position-lambda 417 `(let* ,(append 418 (loop for arg-name in arglist 419 for arg in (mapcar #'precompile1 args) 420 until (eq arg-name '&aux) 421 collect (list arg-name arg)) 422 (subseq arglist (1+ arglist-length))) 423 ,@body)) 424 (error "Argument mismatch for lambda in function position: ~a applied to ~a" `(lambda ,arglist body) args))))))) 425 426 (defmacro define-function-position-lambda-transform (body-function-name (arglist form args) &body body) 427 `(put ',body-function-name 'sys::function-position-lambda-transform 428 #'(lambda(,arglist ,form ,args) 429 ,@body))) 401 430 402 431 (defun precompile-locally (form)
Note: See TracChangeset
for help on using the changeset viewer.