Last Comment Bug 661974 - Make option hook that disables YARR-JIT so regexp test suite can be tested on fallback
: Make option hook that disables YARR-JIT so regexp test suite can be tested on...
Status: RESOLVED INVALID
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: general
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 369778 691898
  Show dependency treegraph
 
Reported: 2011-06-03 16:33 PDT by Chris Leary [:cdleary] (not checking bugmail)
Modified: 2014-07-11 16:18 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
WIP: Add regexpjit enable JSOptions. (27.22 KB, patch)
2011-06-03 21:54 PDT, Chris Leary [:cdleary] (not checking bugmail)
no flags Details | Diff | Splinter Review

Description User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-03 16:33:13 PDT
The problem with having two regexp implementations, one of which compiles a subset of the other, is that the overlap may not yield consistent results. For tests like those in bug 576828 we really want to be able to run the comparison twice if there is a disable-the-JIT capability available to the shell, once with the JIT enabled and once with the JIT disabled.

This bug should also make a little effort to convert some of the existing tests over to a harness that could compare regexp results with the JIT both on and off, but I really would like to have it for tests going forward.
Comment 1 User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-03 21:54:51 PDT
Created attachment 537311 [details] [diff] [review]
WIP: Add regexpjit enable JSOptions.

No test changes, I may punt that to another bug.

This creates an options interface that doesn't suck. I've dealt with it on several occasions and I still can't remember what options() tells me. I think it's something like "whether these things I put in as varargs strings have been toggled since initialization", which tells you almost nothing.

optionsNG returns you an object that describes the state of all the available options. It optionally takes a single object argument with some subset of those options corresponding to property values whose truthiness is evaluated... this is what I would expect. Example:

js> optionsNG()
({anonfunfix:true, atline:false, jitprofiling:false, tracejit:false, methodjit:false, methodjit_always:false, regexpjit:true, relimit:false, strict:false, werror:false, xml:false})
js> optionsNG({regexpjit: false})
({anonfunfix:true, atline:false, jitprofiling:false, tracejit:false, methodjit:false, methodjit_always:false, regexpjit:false, relimit:false, strict:false, werror:false, xml:false})

In addition, this makes JS_REGEXPJIT into an AC_DEFINE thing, puts a --disable-regexpjit and javascript.options.regexpjit.{chrome,content} into the flow.

Think it's close to ready for review, just have to grep through the millions of pref changing things that we have in the tree to see if they need to know about the new prefs.
Comment 2 User image Chris Leary [:cdleary] (not checking bugmail) 2011-06-03 21:57:40 PDT
(In reply to comment #1)

Oh yeah, and the reason I don't want to rip out options (and instead have added a new interface, optionsNG) is because the test infrastructure is intertwingled with the way that the options() functionality currently works, which is a bit of an overhaul. Now that I think about it, I probably need to make an optionsNG() interface like the current one in js/tests/browser.js for compatibility with browser reftests.
Comment 3 User image Chris Leary [:cdleary] (not checking bugmail) 2011-10-07 16:26:21 PDT
Right now in the code base:

You enable YARR (instead of PCRE) by turning on |ENABLE_YARR_JIT|
You turn on the YARR JIT by having |ENABLE_YARR_JIT && defined(METHODJIT)|

This is clearly broken and should only require some quick lovin' to fix. Luckily, that's the kind of lovin' I'm good at.
Comment 4 User image Chris Leary [:cdleary] (not checking bugmail) 2012-02-15 14:37:57 PST
For bug 691898 we'll want a preprocessor seam, as well as the runtime option we want for fuzz testing.
Comment 5 User image Till Schneidereit [till] 2013-03-27 04:41:49 PDT
Mass-reassigning cdleary's bugs to default. He won't work on any of them, anymore. I guess, at least.

@cdleary: shout if you take issue with this.
Comment 6 User image Chris Peterson [:cpeterson] 2014-06-25 22:22:41 PDT
bhackett: is this "disable regexp JIT" option still relevant now that YARR has been with irregexp?
Comment 7 User image Brian Hackett (:bhackett) 2014-07-11 16:18:03 PDT
No, this bug is just about yarr, which has been removed entirely.  Irregexp has both an interpreter and a JIT and there is an option for using the former instead of the latter (--no-native-regexp in the shell).

Note You need to log in before you can comment on or make changes to this bug.