mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Bug 1022081: SPS: Reset the pushedScript after generation of OOL code, r=djvj
This commit is contained in:
parent
feeaf7db9a
commit
e3a01489cd
8
js/src/jit-test/tests/ion/bug1022081.js
Normal file
8
js/src/jit-test/tests/ion/bug1022081.js
Normal file
@ -0,0 +1,8 @@
|
||||
function f() {
|
||||
(function() {
|
||||
gc()
|
||||
})()
|
||||
}
|
||||
enableSPSProfiling()
|
||||
f()
|
||||
f()
|
@ -85,6 +85,7 @@ CodeGeneratorShared::CodeGeneratorShared(MIRGenerator *gen, LIRGraph *graph, Mac
|
||||
bool
|
||||
CodeGeneratorShared::generateOutOfLineCode()
|
||||
{
|
||||
JSScript *topScript = sps_.getPushed();
|
||||
for (size_t i = 0; i < outOfLineCode_.length(); i++) {
|
||||
if (!gen->alloc().ensureBallast())
|
||||
return false;
|
||||
@ -103,6 +104,7 @@ CodeGeneratorShared::generateOutOfLineCode()
|
||||
return false;
|
||||
sps_.finishOOL();
|
||||
}
|
||||
sps_.setPushed(topScript);
|
||||
oolIns = nullptr;
|
||||
|
||||
return true;
|
||||
|
@ -403,6 +403,12 @@ class SPSInstrumentation
|
||||
frame->script = script;
|
||||
}
|
||||
|
||||
JSScript *getPushed() {
|
||||
if (!enabled())
|
||||
return nullptr;
|
||||
return frame->script;
|
||||
}
|
||||
|
||||
/*
|
||||
* Flags entry into a JS function for the first time. Before this is called,
|
||||
* no instrumentation is emitted, but after this instrumentation is emitted.
|
||||
|
Loading…
Reference in New Issue
Block a user