Debug mode code could use inline caches now




JavaScript Engine
7 years ago
4 years ago


(Reporter: jimb, Unassigned)


Firefox Tracking Flags

(Not tracked)




7 years ago
At the moment, the code JaegerMonkey generates in compartments that are in debug mode avoids the use of inline caches; all calls are uncached calls. (See the check for debugMode() in mjit::Compiler::inlineCallHelper.)

Brian Hackett says that it should be possible to use ICs in debug mode now. Before type inference, we couldn't recompile scripts when ICs were active, but now we can. If we can get debug mode working with ICs now, those changes should carry over to IonMonkey.

One note: at present, debug mode code only uses the invokeEntry entry point for JITted code. This never reaches the out-of-line prologue functions like CheckArgumentTypes and FunctionFramePrologue, which means that their associated REJOIN tails in js_InternalInterpret are never exercised in debug mode. If we enable caches, those paths will need to be tested with the debugger.

Comment 1

7 years ago
Brian further argues that it would be best to do this sooner, rather than later, so we can become aware of the issues involved:

<bhackett> jimb: we would need to make sure to do the right thing when the
           debugger modifies variables in an optimized frame, or tries to
           access dead variables and so forth


4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.