mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS: VERIFY on unknown terminator opcodes in GenerateCFG
If we mess up in here it could break promises later optimization stages assume, so rather than having wrong results, make it scream as load as it can.
This commit is contained in:
parent
09fa3a17c7
commit
5181957da5
1 changed files with 6 additions and 3 deletions
|
@ -90,12 +90,15 @@ void GenerateCFG::perform(PassPipelineExecutable& executable)
|
|||
enter_label(&resume_target, current_block);
|
||||
continue;
|
||||
}
|
||||
default:
|
||||
// Otherwise, pop the current block off, it doesn't jump anywhere.
|
||||
case Throw:
|
||||
case Return:
|
||||
iterators.take_last();
|
||||
entered_blocks.take_last();
|
||||
continue;
|
||||
}
|
||||
default:
|
||||
dbgln("Unhandled terminator instruction: `{}`", instruction.to_deprecated_string(executable.executable));
|
||||
VERIFY_NOT_REACHED();
|
||||
};
|
||||
}
|
||||
|
||||
finished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue