Better asserts/checks around bad function addresses.

This commit is contained in:
Ben Vanik
2013-05-26 03:26:49 -07:00
parent bf9e92c027
commit 22f186d713
4 changed files with 11 additions and 1 deletions

View File

@@ -106,6 +106,8 @@ int X64Emitter::PrepareFunction(FunctionSymbol* symbol) {
XESUCCEED();
}
XEASSERT(symbol->type != FunctionSymbol::Unknown);
// Create the custom redirector function.
// This function will jump to the on-demand compilation routine to
// generate the real function as required. Afterwards, it will be
@@ -592,6 +594,10 @@ void X64Emitter::GenerateBasicBlock(FunctionBlock* block) {
}
}
if (FLAGS_log_codegen) {
fflush(stdout);
}
TraceInstruction(i);
if (!i.type) {