[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terribly complex syntax objects in syntax parse

From: Mark H Weaver
Subject: Re: terribly complex syntax objects in syntax parse
Date: Mon, 14 May 2012 18:04:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Hi Stefan,

Stefan Israelsson Tampe <address@hidden> writes:
> syntax-parse is kind of heavy right now. The parser function produced
> are huge and the main reason 
> is that the stored syntax objects are enormous.

Yes, this is very unfortunate.  These syntax-objects add a huge amount
of bloat to our entire system.  The vast majority of each syntax-object
is used only if the syntax-object is passed as the first argument to
'datum->syntax'.  Of course, most syntax-objects are never passed to
'datum->syntax', but unless the compiler can prove that this will never
happen, the bloat must be kept around.

> I know that Mark Weaver had done something to make these creatures
> less fatty.

I wrote a hack to minimize the size of syntax objects in psyntax-pp.scm.
However, the hack cannot safely be used in the general case.  It is only
safe because I convinced myself and others that the syntax-objects
embedded within psyntax-pp.scm will never be passed to 'datum->syntax'.

> The question is if there is anything a guile user can do?

My hack cannot be used by users because it makes assumptions about the
internals of psyntax and of our compiler: assumptions that will
certainly to be violated in future versions of Guile.

I wish I had a better answer for you, but unfortunately these enormous
syntax-objects are a core part of the 'syntax-case' system.  I see no
way to eliminate this bloat without moving to a different macro system.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]