[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-14 Thread Bruce Johnson
It still sounds to me like the route Scott suggested and Bob agreed with would be better, so as to avoid the whole issue of re-lexing the JS during link. On Tue, Apr 14, 2009 at 1:19 AM, Vitali Lovich wrote: > Should've mentioned this in the original post, but probably the > TokenStream.java

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Vitali Lovich
Should've mentioned this in the original post, but probably the TokenStream.javaclass is the scanner you would be interested in I believe. On Tue, Apr 14, 2009 at 1:14 AM, Vitali Lovich wrote: > Hey guys,

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Vitali Lovich
Hey guys, Rhino (one of Mozilla's javascript engines) is written entirely in Java & supports JS 1.7 if that helps. I'm sure there's a parser component in there that can be extracted if the license is compatible (MPL/GPL). There's also GromJS

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Lex Spoon
On Mon, Apr 13, 2009 at 1:53 PM, John Tamplin wrote: > On Mon, Apr 13, 2009 at 3:51 PM, Scott Blum wrote: >> >> If we were playing Mao, I would give you a card penalty for stating the >> obvious. :-) >> >> But uh, reliably tracking whether or not you're in a string literal is >> about as much fu

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Ian Petersen
On Mon, Apr 13, 2009 at 1:53 PM, John Tamplin wrote: > On Mon, Apr 13, 2009 at 3:51 PM, Scott Blum wrote: >> >> If we were playing Mao, I would give you a card penalty for stating the >> obvious. :-) >> >> But uh, reliably tracking whether or not you're in a string literal is >> about as much fu

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread John Tamplin
On Mon, Apr 13, 2009 at 3:51 PM, Scott Blum wrote: > If we were playing Mao, I would give you a card penalty for stating the > obvious. :-) > > But uh, reliably tracking whether or not you're in a string literal is > about as much fun as writing a JavaScript parser. In fact, it might be > *exact

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Scott Blum
If we were playing Mao, I would give you a card penalty for stating the obvious. :-) But uh, reliably tracking whether or not you're in a string literal is about as much fun as writing a JavaScript parser. In fact, it might be *exactly* as fun, if you know what I mean. On Mon, Apr 13, 2009 at 3:

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread John Tamplin
On Mon, Apr 13, 2009 at 2:55 PM, Scott Blum wrote: > Actually, I am going to have to torpedo this (sorry!). It just occurred to > me that while comments are only a hypothetical problem, string literals are > a real, actual problem that could cause problems today. A string literal > with mismatc

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread BobV
On Mon, Apr 13, 2009 at 2:55 PM, Scott Blum wrote: > Actually, I am going to have to torpedo this (sorry!).  It just occurred to > me that while comments are only a hypothetical problem, string literals are > a real, actual problem that could cause problems today.  A string literal > with mismatc

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Scott Blum
Actually, I am going to have to torpedo this (sorry!). It just occurred to me that while comments are only a hypothetical problem, string literals are a real, actual problem that could cause problems today. A string literal with mismatched curly braces would break this. I know it seems hacky, but

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread BobV
On Mon, Apr 13, 2009 at 2:40 PM, wrote: > The code LG, one high-level comment about the design.  Assuming we're ok > with the design implications, this seems good. The never-fail way to do this would be to have JsSourceGeneration visitor indicate offset values of top-level statements in the str

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread scottb
The code LG, one high-level comment about the design. Assuming we're ok with the design implications, this seems good. http://gwt-code-reviews.appspot.com/21801/diff/1/2 File dev/core/src/com/google/gwt/core/ext/linker/impl/SelectionScriptLinker.java (right): http://gwt-code-reviews.appspot.co

[gwt-contrib] Re: RR : Chunk the JavaScript in the initial fragment

2009-04-13 Thread Bruce Johnson
On Mon, Apr 13, 2009 at 12:39 PM, wrote: > Discussion: > - What is the correct chunk size? It seems like this could (and should) be determined by an experiment. - Can runAsync fragments take advantage of this? One (possibly crazy) way in which we could do this is to chunk up the JS such t