Open Bug 699196 Opened 13 years ago Updated 2 years ago

Debug mode code could use inline caches now

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: jimb, Unassigned)

References

Details

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.
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
Blocks: 699528
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.