The big catch/finally rework, part 1

Never generates any landing pads or invoke instructions right now
for simplicity. The code for emitting them will be added back in
the next step.

The "after..." blocks without any precedessors remain for now, as
we need a clean way to suppress any codegen for that block (but
not new blocks, which might resolve labels) before tackling that
one.

Builds druntime/Phobos on OS X x86_64 (albeit without EH, of course).
This commit is contained in:
David Nadlinger 2015-08-19 00:56:33 +02:00
parent bfc20df4c8
commit 4236ae9ce5
12 changed files with 861 additions and 1315 deletions

View file

@ -41,23 +41,6 @@ const IRScope& IRScope::operator=(const IRScope& rhs)
return *this;
}
//////////////////////////////////////////////////////////////////////////////////////////
IRTargetScope::IRTargetScope(
Statement* s,
EnclosingTryFinally* enclosinghandler,
llvm::BasicBlock* continueTarget,
llvm::BasicBlock* breakTarget,
bool onlyLabeledBreak
)
{
this->s = s;
this->enclosinghandler = enclosinghandler;
this->breakTarget = breakTarget;
this->continueTarget = continueTarget;
this->onlyLabeledBreak = onlyLabeledBreak;
}
//////////////////////////////////////////////////////////////////////////////////////////
IRState::IRState(const char *name, llvm::LLVMContext &context)
: module(name, context), DBuilder(this)