mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1022081: SPS: Reset the pushedScript after generation of OOL code, r=djvj
This commit is contained in:
parent
355f7423fd
commit
dd2885a065
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