Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Niko Matsakis
Interesting thought. You could also use an embedding involving either coded no-ops at the start of each instruction and/or an unconditional jump over some meta-data. This would reduce coupling at the cost of somewhat more memory. Naturally you'd want to measure the effect on performance too, though

Re: [dev-servo] character encoding in the HTML parser

2014-03-31 Thread James Graham
On 10/03/14 23:54, Keegan McAllister wrote: Should we implement character encoding detection [1] at the same time as the rest of the HTML parser? It seems to be separable; the only design interactions I see are: - The character decoder and script APIs can write into the same input stream - The

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread David Rajchenbach-Teller
Still nice. Perhaps it would make a nice project for research students. Cheers, David On Mon Mar 31 04:37:55 2014, Patrick Walton wrote: > Of course, I should try on a snapshot of a real Web page (the HTML5 > spec, perhaps), but I don't expect to do much better. 27% is not bad, > but there are o

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Patrick Walton
On 3/31/14 3:10 AM, Niko Matsakis wrote: Interesting thought. You could also use an embedding involving either coded no-ops at the start of each instruction and/or an unconditional jump over some meta-data. This would reduce coupling at the cost of somewhat more memory. Naturally you'd want to me

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Niko Matsakis
On Mon, Mar 31, 2014 at 08:11:32AM -0700, Patrick Walton wrote: > I also realized yesterday that one could just re-parse the style > sheet into the AST if the CSSOM or debugging tools are used. I wonder > whether that would be just as fast as disassembling. Good point. I imagine perf of parsing is

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Simon Sapin
On 31/03/2014 16:11, Patrick Walton wrote: On 3/31/14 3:10 AM, Niko Matsakis wrote: Interesting thought. You could also use an embedding involving either coded no-ops at the start of each instruction and/or an unconditional jump over some meta-data. This would reduce coupling at the cost of some

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Keegan McAllister
Or store the metadata immediately before the code, as GHC does for thunk entry code. keegan - Original Message - From: "Niko Matsakis" To: "Patrick Walton" Cc: dev-servo@lists.mozilla.org Sent: Monday, March 31, 2014 3:10:39 AM Subject: Re: [dev-servo] Crazy idea: CSS selector JITting

[dev-servo] 3/31 meeting notes (acid 2; Q2 plans; interns; android status; acid 2 post-mortem)

2014-03-31 Thread Josh Matthews
https://github.com/mozilla/servo/wiki/Meeting-2014-03-31 ___ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo

Re: [dev-servo] 3/31 meeting notes (acid 2; Q2 plans; interns; android status; acid 2 post-mortem)

2014-03-31 Thread Boris Zbarsky
On 3/31/14 8:44 PM, Josh Matthews wrote: https://github.com/mozilla/servo/wiki/Meeting-2014-03-31 A note on tables and pagination: that's a place where you won't really be able to lean on Gecko experience. Or more precisely, table pagination in Gecko is at the state where all pagination is i

Re: [dev-servo] character encoding in the HTML parser

2014-03-31 Thread Keegan McAllister
> Unfortunately I’d be less surprised if someone relies on having the two > halves of a surrogate pair in separate document.write() call, as this > seems more interoperable: > > data:text/html,document.write("\uD83D");document.write("\uDCA9") The tokenizer's input is a queue of buffers, and I'm

Re: [dev-servo] character encoding in the HTML parser

2014-03-31 Thread Boris Zbarsky
On 3/31/14 10:01 PM, Keegan McAllister wrote: Good point. Even if the DOM is a mix of UTF-8 lazily converted to UCS-2, the argument to document.write or the innerHTML setter is a JS string. Which may itself in the future be some mix of UCS-2 and ascii, or UCS-2 and "evil UTF-8", or just UTF-