[jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Andrea Ercolino
Hi there. I've refactored the filter core function of jQuery, merging my Chili parser into it. Now it should be cleaner, faster and tighter (I hope so) I passed it through coreTest.js, and all is fine for these browsers: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Andrea Ercolino
http://jquery.com/dev/bugs/bug/447/ -- View this message in context: http://www.nabble.com/filter-refactored-with-the-engine-of-Chili-tf2718426.html#a7583601 Sent from the JQuery mailing list archive at Nabble.com. ___ jQuery mailing list

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi if( jQuery.parse2RE == 0 ) { // this is the first call to filter_opt, so // replace S and T macros in the parse2 regexps var S = ([a-z*_-][\\w-]*); You can not be shure that a JavaScript Engine is not

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Mike Alsup
You can not be shure that a JavaScript Engine is not threaded. This code is not threadsave. Is there an implementation of javascript that supports context switching? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Andrea Ercolino
Christof Donat wrote: You can not be shure that a JavaScript Engine is not threaded. This code is not threadsave. Imagine the following situation: Thread 1Thread 2 $.filter() parse2RE is set to e.g. 1 Thread is stopped by OS Sceduler - $.filter()

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi, Yes, but if it's not 0 it's ok I guess. I have not analyzed your code deeply. It was just something I sumbled across. There is a preprocessing step that sets parse2RE, and if it's not 0 isn't it safe to suppose it holds the correct RegExp object set during preprocessing? Ah, I

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi, You can not be shure that a JavaScript Engine is not threaded. This code is not threadsave. Is there an implementation of javascript that supports context switching? The engine itsself usually does no contextswitch, but it may start multiple threads to handle multiple Events