Beispiel #1
0
 public EmulatedState GetState() // TODO: get rid of this?
 {
     if (state == null)
     {
         state = new EmulatedState();
     }
     return(state);
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 public void InheritState(LLVMBuilderRef builder, BasicBlock origin)
 {
     if (state == null)
     {
         state = new EmulatedState(builder, origin);
     }
     else
     {
         state.Merge(builder, origin);
     }
 }