mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 926837 - Add missing OOM checks for debug-only regalloc checker. r=bhackett
This commit is contained in:
parent
5e59a14a9a
commit
57e4f66466
@ -1391,7 +1391,8 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
switch (js_IonOptions.registerAllocator) {
|
switch (js_IonOptions.registerAllocator) {
|
||||||
case RegisterAllocator_LSRA: {
|
case RegisterAllocator_LSRA: {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
integrity.record();
|
if (!integrity.record())
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
LinearScanAllocator regalloc(mir, &lirgen, *lir);
|
||||||
@ -1399,7 +1400,8 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
integrity.check(false);
|
if (!integrity.check(false))
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
IonSpewPass("Allocate Registers [LSRA]", ®alloc);
|
||||||
@ -1408,7 +1410,8 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
|
|
||||||
case RegisterAllocator_Backtracking: {
|
case RegisterAllocator_Backtracking: {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
integrity.record();
|
if (!integrity.record())
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
BacktrackingAllocator regalloc(mir, &lirgen, *lir);
|
||||||
@ -1416,7 +1419,8 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
integrity.check(false);
|
if (!integrity.check(false))
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IonSpewPass("Allocate Registers [Backtracking]");
|
IonSpewPass("Allocate Registers [Backtracking]");
|
||||||
@ -1426,7 +1430,8 @@ GenerateLIR(MIRGenerator *mir)
|
|||||||
case RegisterAllocator_Stupid: {
|
case RegisterAllocator_Stupid: {
|
||||||
// Use the integrity checker to populate safepoint information, so
|
// Use the integrity checker to populate safepoint information, so
|
||||||
// run it in all builds.
|
// run it in all builds.
|
||||||
integrity.record();
|
if (!integrity.record())
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
StupidAllocator regalloc(mir, &lirgen, *lir);
|
StupidAllocator regalloc(mir, &lirgen, *lir);
|
||||||
if (!regalloc.go())
|
if (!regalloc.go())
|
||||||
|
Loading…
Reference in New Issue
Block a user