Custom Query (1630 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (43 - 45 of 1630)

Ticket Resolution Summary Owner Reporter
#1424 fixed (const c-string) as result type breaks with NULL Vasilij Schneidermann
Description

I'm writing bindings to a library which uses const on both string argument and return types. If I declare a foreign function returning NULL to have (const c-string) as return type, I get a segmentation violation, c-string as return type however returns #f as expected.

Minimal repro:

(import chicken scheme foreign)

#> static const char* test() { return NULL; } <#

(define test (foreign-lambda c-string "test"))
(define test2 (foreign-lambda (const c-string) "test"))

(test) ;=> #f
(test2) ;=> segfault
#543 fixed (declare (lambda-lift)) infinite loop. felix winkelmann Alan Post
Description

I have done some refactoring to my package genturfa'i. After completing my refactoring, the lambda-lift option now never terminates while compiling genturfa'i.

To recreate this problem:

svn co -r23157 https://code.call-cc.org/svn/chicken-eggs/release/4/genturfahi/trunk
cd trunk
chicken-install

The problem is occurring in the function compute-extra-variables in optimizer.scm. I narrowed this down using the verbose option to the compiler invoked by chicken-install, but attempts on my part to provide a simpler test case have failed.

Turning off (declare (lambda-lift)) causes genturfa'i to compile normally. I would expect to be able to compile my module with lambda lifting, rather than having in never terminate.

#986 fixed (define ++ string-append) defeats constant-folding evhan Jim Ursetto
Description

Using (define ++ string-append) prevents constant-folding into a literal string when using ++. It does work when using -block, but not inside a module, even when ++ is hidden. Or at least, I can't get it to work.

;; app2.scm
;; although string-append is substituted for ++, the result is not
;; constant-folded, unlike plain string-append

(module foo (bar baz)
 (import scheme chicken)

 (define ++ string-append)
 (define (bar)
   (print (string-append "foo" "bar" "baz")))
 (define (baz)
   (print (++ "quux" "poop")))

)

(import foo)
(bar)
(baz)
;; ----------

$ csc -O3 -debug o app2.scm

hiding nonexported module bindings: foo#++
specializations:
  1 (string-append string string)
safe globals: (foo#baz foo#bar foo#++)
removed side-effect free assignment to unused variable: foo#++
folded constant expression: (string-append (quote "foo") (quote "bar") (quote "baz"))
substituted constant variable: a213
substituted constant variable: a214
replaced variables: 2
removed binding forms: 3
contracted procedure: k202
removed binding forms: 6
substituted constant variable: a201
inlining procedure: "(app2.scm:15) foo#baz"
inlining procedure: "(app2.scm:14) foo#bar"
substituted constant variable: a201229
replaced variables: 2
removed binding forms: 1
removed binding forms: 3
Note: See TracQuery for help on using queries.