Closed Bug 820159 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Increment script useCount on entry and loopentry.

Categories

(Core :: JavaScript Engine, defect)

17 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: djvj, Unassigned)

References

Details

Attachments

(1 file)

This is in preparation for enabling ion compilation of scripts that are executing in baseline.  First we need to be able to tell when to kick off ion compile, which means keeping track of useCounts within baseline-compiled scripts.
This adds code to increment a script's useCount on script entry and LOOPENTRY ops.  The increment of useCount itself is done inline.  If the usecount exceeds the usesBeforeCompile for ion, then the UseCount IC is entered, which contains a single UseCount_Fallback entry which can later be altered to implement bailout.
Attachment #690991 - Flags: review?(jdemooij)
Comment on attachment 690991 [details] [diff] [review]
Increment usecount on script and loop entry.

Review of attachment 690991 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/ion/BaselineCompiler.cpp
@@ +484,5 @@
>  
>  bool
>  BaselineCompiler::emit_JSOP_LOOPENTRY()
>  {
> +    return emitUseCountIncrement();

NOTE: emit_JSOP_LOOPHEAD needs a popRegsAndSync(0) before calling emitUseCountIncrement().  That change has been made locally on my patch already.
Attachment #690991 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/ce645189e528
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: