[Bese-devel] parenscript bug

Henrik Hjelte henrik.hjelte at poboxes.com
Mon Jan 9 12:17:07 UTC 2006


On fre, 2006-01-06 at 16:04 +0100, Ties Stuij wrote:
> it seems i have a bug in my parenscript on cmucl on freebsd. i guess
> it might have to do with the recent changes from henrik hjelte, since
> my compilation stops at the macro css-inline and he added it two weeks
> ago. parenscript works fine under my sbcl under linux.

I found the bug on cmucl under Linux as well. Strange one this. The
solution is simply to change the last line of the file js-html to call
js-compile instead of js-compile-to-expression (darcs patch is
attached).

darcs whatsnew
{
hunk ./js-html.lisp 72
-  (js-compile-to-expression (cons '+ (process-css-forms forms))))
+  (js-compile (cons '+ (process-css-forms forms))))
}

But why? All that js-compile-to-expression does is wrap the call to
js-compile in a typecheck. 

(defun js-compile-to-expression (form)
  (let ((res (js-compile form)))
    (assert (typep res 'expression))
    res))

Why this makes the cmucl compiler complain about an invalid structure I
don't know. It will remain one of the worlds unresolved mysteries if no
one can explain this, I am just a pragmatic guy happy that it works now.

/Henrik Hjelte


> 
> here the top part of the debugger message:
> 
> Error in function C::DUMP-STRUCTURE:  Attempt to dump invalid
> structure:
>   #<KERNEL::STANDARD-CLASS JS::EXPRESSION {488EE195}>
> How did this happen?
>    [Condition of type SIMPLE-ERROR]

-------------- next part --------------

New patches:

[css-inline compiles with cmucl
henrik.hjelte at poboxes.com**20060109113602] {
hunk ./js-html.lisp 72
-  (js-compile-to-expression (cons '+ (process-css-forms forms))))
+  (js-compile (cons '+ (process-css-forms forms))))
}

Context:

[New function gen-js-name-string
Marco Baringer <mb at bese.it>**20051219160435
 This allows you to get a unique javascript name as a string and not
 just as a symbol.
] 
[bugfix slot-value
henrik.hjelte at poboxes.com**20051219131901] 
[bug in dwim-join
henrik.hjelte at poboxes.com**20051218171724] 
[css-inline generator
henrik.hjelte at poboxes.com**20051218111426] 
[cleaned reference
henrik.hjelte at poboxes.com**20051217095257] 
[tests from the reference
henrik.hjelte at poboxes.com**20051216180844] 
[quotes in introduction
henrik.hjelte at poboxes.com**20051216153949] 
[Added defgenerics for all the defmethods
Alan-Shields at omrf.ouhsc.edu**20051201191709
 Ze style warnings! Zey drive me craaaazy.
] 
[enable #+parenscript
Alan-Shields at omrf.ouhsc.edu**20051115235351
 To integrate Parenscript with Araneida without requiring Parenscript,
 I had to do some compile conditionals. This would make it much easier.
 
 Marco, eventually I am going to add this to every last one of your projects.
 ;-p
] 
[need a function for css-inlining
Alan-Shields at omrf.ouhsc.edu**20051115235233
 If you have code that needs to inline CSS across an array, it's difficult
 to use the current macro.
 Having a function helps - mapping the macro to the function only completes
 things.
] 
[Proper concatenation of inline CSS
Alan-Shields at omrf.ouhsc.edu**20051115234812
 CSS-INLINE does a simple concatenation of the results of CSS directives.
 This looks like:
 	color:blacksize:200%
 Unfortunately, it should look like this:
 	color:black;size:200%
 
 It now does.
] 
[added COPYING file
Luca Capello <luca at pca.it>**20051107123047] 
[Escape { and } chars in boring regexps
Marco Baringer <mb at bese.it>**20051107102118] 
[Need to escape #\' in javascript strings
Marco Baringer <mb at bese.it>**20051005090942] 
[Fix buf in JS-INLINE causing infinite macro expansion
Marco Baringer <mb at bese.it>**20051005082900] 
[Add in checks to deal with functions/macros whose names aren't symbols
Marco Baringer <mb at bese.it>**20050912081700] 
[Use strings, and not symbols, to name javascript functions/macros
Marco Baringer <mb at bese.it>**20050905082735
 
 This effectivly flattens the namespace of javascript code. While this
 change makes js similar to javascript, and removes the need to export
 symbols from the JS package, it may break previous code which depended
 on, for expample, js:and not being equivalent to js:and.
 
] 
[Added support for literal objects ( "{ ... }" syntax)
Marco Baringer <mb at bese.it>**20050905081702] 
[Export cen-js-names and with-unique-js-names
Marco Baringer <mb at bese.it>**20050831115820] 
[Added docstrings to previous patch
Marco Baringer <mb at bese.it>**20050815135128] 
[Added GEN-JS-NAME and WITH-UNIQUE-JS-NAMES
Marco Baringer <mb at bese.it>**20050815134940] 
[dotimes-dolist-fix
Ivan Toshkov <itoshkov at gmail.com>**20050815080906
 
 Fixes the infinite loop problems of `dotimes' and `dolist'.
] 
[Parenscript, documentation not withstandanding, does not depend on htmlgen
Marco Baringer <mb at bese.it>**20050815080053] 
[Attempt to improve the conversion of (js ((lambda ...) ...))
Marco Baringer <mb at bese.it>**20050815074902] 
[Introduce the JS-LAMBDA class. Make JS-DEFUN a subclass of JS-LAMBDA
Marco Baringer <mb at bese.it>**20050815074836] 
[Implement JS and JS-INLINE in terms of JS* and JS-INLINE*
Marco Baringer <mb at bese.it>**20050815063921] 
[Symbols starting with #\: are left as is, no case conversion or other mangling
Marco Baringer <mb at bese.it>**20050814141629] 
[Added JS* and JS-INLINE*. 
Marco Baringer <mb at bese.it>**20050814134534] 
[Javascript strings need to be quated with ' and not " to avoid interfering with the surrounding HTML.
Marco Baringer <mb at bese.it>**20050814134344] 
[Ugly hack to support ((lambda ...) ...)
Marco Baringer <mb at bese.it>**20050813142023] 
[Mention that I'm maintaining this version of parenscript
Marco Baringer <mb at bese.it>**20050813135238] 
[Rename the system/package in the system definition, just renaming the file doesn't cut it :(.
Marco Baringer <mb at bese.it>**20050813135107] 
[Added images used in documentation
Marco Baringer <mb at bese.it>**20050813134441] 
[Added the pbook.py file used to generate the documentation
Marco Baringer <mb at bese.it>**20050813133732] 
[Added declare ignore forms for unused function arguments
Marco Baringer <mb at bese.it>**20050808154843] 
[Rename system def
Marco Baringer <mb at bese.it>**20050808154836] 
[Setup boringfile
Marco Baringer <mb at bese.it>**20050726100549] 
[Added files from parenscript 0.1.0 as distributed by Manuel Odendahl
Marco Baringer <mb at bese.it>**20050726100416] 
Patch bundle hash:
7443a55534c2a05ed58e178be3e0b896fc828298


More information about the bese-devel mailing list