On Wed, Jun 15, 2011 at 8:36 AM, Axel Rauschmayer <a...@rauschma.de> wrote:
> > The point is that the callSiteId captures all the > literal/constant/loop-invariant parts of the quasi, both raw and cooked > ("expandedLP"). The remaining quasi handler parameters are the necessarily > variable, evaluated-at-runtime substitution expression results. > > > That makes sense. The ID then allows one to do caching. But I don’t see how > the same quasi-literal can be “invoked” multiple times. > At <http://wiki.ecmascript.org/doku.php?id=harmony:quasis#nesting> the inner safehtml`<td>${cell}</td>` is invoked multiple times. The safehtml quasiparser can parse the html literal text fragments once and cache something that will accept and plug in data in the remaining hole positions. When the literal text fragments represent code in a substantial DSL, this caching matters. > -- > Dr. Axel Rauschmayer > > a...@rauschma.de > twitter.com/rauschma > > home: rauschma.de > blog: 2ality.com > > > > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss