Changeset 15972 in project for chicken


Ignore:
Timestamp:
09/20/09 03:53:52 (10 years ago)
Author:
kon
Message:

Added predicate for lambda-info. moved make-lambda-info into library since used by compiler & eval.

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/eval.scm

    r15951 r15972  
    7676     ##sys#load ##sys#error ##sys#warn ##sys#hash-table-location ##sys#expand-home-path
    7777     ##sys#make-flonum ##sys#make-pointer ##sys#null-pointer ##sys#address->pointer
    78      ##sys#pointer->address ##sys#compile-to-closure ##sys#make-string ##sys#make-lambda-info
     78     ##sys#pointer->address ##sys#compile-to-closure ##sys#make-string ##sys#make-lambda-info ##sys#lambda-info?
    7979     ##sys#number? ##sys#symbol->qualified-string ##sys#decorate-lambda ##sys#string-append
    8080     ##sys#ensure-heap-reserve ##sys#syntax-error-hook ##sys#read-prompt-hook
     
    215215  (##sys#decorate-lambda
    216216   p
    217    (lambda (x) (and (not (##sys#immediate? x)) (##core#inline "C_lambdainfop" x)))
     217   ##sys#lambda-info?
    218218   (lambda (p i)
    219219     (##sys#setslot
     
    18721872(define-external (CHICKEN_get_error_message ((c-pointer "char") buf) (int bufsize)) void
    18731873  (store-string (or last-error "No error") bufsize buf) )
    1874 
    1875 
    1876 ;;; Create lambda-info object
    1877 
    1878 (define (##sys#make-lambda-info str)
    1879   (let* ((sz (##sys#size str))
    1880          (info (##sys#make-string sz)) )
    1881     (##core#inline "C_copy_memory" info str sz)
    1882     (##core#inline "C_string_to_lambdainfo" info)
    1883     info) )
  • chicken/trunk/library.scm

    r15907 r15972  
    156156     open-output-string get-output-string print-call-chain ##sys#symbol-has-toplevel-binding? repl
    157157     argv condition-property-accessor ##sys#decorate-lambda ##sys#become! ##sys#lambda-decoration
    158      getter-with-setter ##sys#lambda-info ##sys#lambda-info->string open-input-string ##sys#gc
     158     getter-with-setter ##sys#lambda-info? ##sys#lambda-info ##sys#lambda-info->string open-input-string ##sys#gc
    159159     ##sys#memory-info ##sys#make-c-string ##sys#find-symbol-table display
    160160     newline string-append ##sys#with-print-length-limit write print vector-fill! ##sys#context-switch
     
    46674667;;; Function debug info:
    46684668
     4669(define (##sys#make-lambda-info str)
     4670  (let* ((sz (##sys#size str))
     4671         (info (##sys#make-string sz)) )
     4672    (##core#inline "C_copy_memory" info str sz)
     4673    (##core#inline "C_string_to_lambdainfo" info)
     4674    info) )
     4675
     4676(define (##sys#lambda-info? x)
     4677  (and (not (##sys#immediate? x)) (##core#inline "C_lambdainfop" x)) )
     4678
    46694679(define (##sys#lambda-info proc)
    4670   (##sys#lambda-decoration
    4671    proc
    4672    (lambda (x) (and (not (##sys#immediate? x)) (##core#inline "C_lambdainfop" x))) ) )
     4680  (##sys#lambda-decoration proc ##sys#lambda-info?) )
    46734681
    46744682(define (##sys#lambda-info->string info)
Note: See TracChangeset for help on using the changeset viewer.