[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ECMAScript support broken?
From: |
Kan-Ru Chen |
Subject: |
Re: ECMAScript support broken? |
Date: |
Mon, 03 Jan 2011 16:19:14 +0800 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Hi,
Noah Lavine <address@hidden> writes:
> Hi all,
>
> I looked at this. For the first error, I think the bug is in (language
> ecmascript compile-tree-il), where the file around line 369 says:
>
> ((object . ,args)
> (@impl new-object
> (map (lambda (x)
> (pmatch x
> ((,prop ,val)
> (-> (apply (-> (primitive 'cons))
> (-> (const prop))
> (comp val e))))
> (else
> (error "bad prop-val pair" x))))
> args)))
I don't know the guile internal (yet), but after looking around
(language tree-il) and (language ecmascript base) it seems `new-object'
want a list of pairs instead a list of lists. I changed the above code
to
`(apply ,(@implv new-object)
,@(map (lambda (x)
(pmatch x
((,prop ,val)
(-> (apply (-> (primitive 'cons))
(-> (const prop))
(comp val e))))
(else
(error "bad prop-val pair" x))))
args)))
and it works.
Hope this helps you to diagnose the problem.
Cheers,
Kanru
--
A badly written book is only a blunder. A bad translation of a good
book is a crime.
-- Gilbert Highet
- Re: Sputnik test result (was Re: ECMAScript support broken?), (continued)
- Re: Sputnik test result, Andy Wingo, 2011/01/27
- Re: Sputnik test result, Noah Lavine, 2011/01/27
- Re: Sputnik test result, Kan-Ru Chen, 2011/01/27
- Re: ECMAScript support broken?, Ludovic Courtès, 2011/01/03
- Re: ECMAScript support broken?, Noah Lavine, 2011/01/03
- Re: ECMAScript support broken?, Kan-Ru Chen, 2011/01/04
- Re: ECMAScript support broken?, Noah Lavine, 2011/01/04
- Re: ECMAScript support broken?, Ludovic Courtès, 2011/01/04
Re: ECMAScript support broken?,
Kan-Ru Chen <=