public EmulatedState GetState() // TODO: get rid of this? { if (state == null) { state = new EmulatedState(); } return(state); }
public BasicBlock(MethodCompiler compiler, LLVMValueRef fn, Instruction firstInstructionRef, string name) { this.compiler = compiler; this.LLVMBlock = LLVM.AppendBasicBlock(fn, name); // By default no state is assigned yet. this.state = null; this.FirstInstructionRef = firstInstructionRef; }
public void InheritState(LLVMBuilderRef builder, BasicBlock origin) { if (state == null) { state = new EmulatedState(builder, origin); } else { state.Merge(builder, origin); } }