making "cafe" using narwhal and jison :urgent

7 views
Skip to first unread message

rohit jangid

unread,
Mar 25, 2011, 9:38:50 PM3/25/11
to Narwhal and Jack
hello my name is rohit and
i have installed narwhal on my fedora 13 system and used tusk to get
jison js parser generator on it

my goal is to install cafe ( a javascript compiler)
which depends on narwhal and jison

this is the makefile
https://github.com/zaach/cafe/blob/master/Makefile

narwhal and jison , both are working fine

when i try to build cafe , bytecode generated by narwhal exceeds 64 kb
limit which i believe is a problem of rhino

so basically i'm concernec with the 64 kb size limit of generated
bytecode and how to deal with it to successfully build cafe

pls suggest me some wayout , i am stuck on this for 2 days so now it's
urgent for me to get it working

thanks

Dean Landolt

unread,
Mar 28, 2011, 11:21:17 AM3/28/11
to narw...@googlegroups.com
There's not a whole lot you can do about the 64 kb limit per se, but you can bypass it completely (at the cost of performance) by skipping optimizations and running in interpreted mode. Just set NARWHAL_OPTIMIZATION=-1 and you  should be good to go. Also, you'll get better stack traces.

rohit jangid

unread,
Mar 28, 2011, 4:55:21 PM3/28/11
to narw...@googlegroups.com
hi, thanks for the reply.
in which file do i need to set the NARWHAL_OPTIMIZATION=-1 ?
i read that narwhal-jsc doesn't have 64kb size limitation, can be a
solution to my problem?

> --
> You received this message because you are subscribed to the Google Groups
> "Narwhal and Jack" group.
> To post to this group, send email to narw...@googlegroups.com.
> To unsubscribe from this group, send email to
> narwhaljs+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/narwhaljs?hl=en.
>

--
Rohit Jangid
Under graduate student,
Computer Engineering,
Netaji Subhas Institute Of Technology,
Dwarka,Delhi

Dean Landolt

unread,
Mar 28, 2011, 5:15:15 PM3/28/11
to narw...@googlegroups.com
On Mon, Mar 28, 2011 at 4:55 PM, rohit jangid <rohit....@gmail.com> wrote:
hi, thanks for the reply.
in which file do i need to set the NARWHAL_OPTIMIZATION=-1 ?

Sorry, I should have been more specific. NARWHAL_OPTIMIZATION is an environment variable, so set it however you'd like.

 
i read that narwhal-jsc doesn't have 64kb size limitation, can be a
solution to my problem?

Yeah, the 64kb limit is a rhino limitation (more specifically it's a java limitation). I've never used narwhal-jsc but IIRC it's pretty well fleshed out, so if it works for you it ought to be substantially faster than rhino as well.
Reply all
Reply to author
Forward
0 new messages