コード例 #1
0
ファイル: NodeBlock.cs プロジェクト: z4cH3r/Spedit
 public void inherit(LGraph graph, NodeBlock other)
 {
     if (other == null)
     {
         stack_ = new AbstractStack(graph.nargs);
         for (int i = 0; i < graph.nargs; i++)
         {
             DDeclareLocal local = new DDeclareLocal(lir_.pc, null);
             local.setOffset((i * 4) + 12);
             add(local);
             stack_.init((i * 4) + 12, local);
         }
     }
     else if (stack_ == null)
     {
         //Debug.Assert(other.stack_ != null);
         stack_ = new AbstractStack(other.stack_);
     }
     else
     {
         // Right now we only create phis for pri/alt.
         joinRegs(Register.Pri, other.stack_.pri);
         joinRegs(Register.Alt, other.stack_.alt);
     }
 }
コード例 #2
0
ファイル: NodeBlock.cs プロジェクト: not1ce111/Spedit
 public AbstractStack(AbstractStack other)
 {
     stack_ = new List<StackEntry>();
     for (int i = 0; i < other.stack_.Count; i++)
         stack_.Add(new StackEntry(other.stack_[i].declaration, other.stack_[i].assignment));
     args_ = new StackEntry[other.args_.Length];
     for (int i = 0; i < args_.Length; i++)
         args_[i] = new StackEntry(other.args_[i].declaration, other.args_[i].assignment);
     pri_ = other.pri_;
     alt_ = other.alt_;
 }
コード例 #3
0
ファイル: NodeBlock.cs プロジェクト: z4cH3r/Spedit
 public AbstractStack(AbstractStack other)
 {
     stack_ = new List <StackEntry>();
     for (int i = 0; i < other.stack_.Count; i++)
     {
         stack_.Add(new StackEntry(other.stack_[i].declaration, other.stack_[i].assignment));
     }
     args_ = new StackEntry[other.args_.Length];
     for (int i = 0; i < args_.Length; i++)
     {
         args_[i] = new StackEntry(other.args_[i].declaration, other.args_[i].assignment);
     }
     pri_ = other.pri_;
     alt_ = other.alt_;
 }
コード例 #4
0
ファイル: NodeBlock.cs プロジェクト: not1ce111/Spedit
 public void inherit(LGraph graph, NodeBlock other)
 {
     if (other == null)
     {
         stack_ = new AbstractStack(graph.nargs);
         for (int i = 0; i < graph.nargs; i++)
         {
             DDeclareLocal local = new DDeclareLocal(lir_.pc, null);
             local.setOffset((i * 4) + 12);
             add(local);
             stack_.init((i * 4) + 12, local);
         }
     }
     else if (stack_ == null)
     {
         //Debug.Assert(other.stack_ != null);
         stack_ = new AbstractStack(other.stack_);
     }
     else
     {
         // Right now we only create phis for pri/alt.
         joinRegs(Register.Pri, other.stack_.pri);
         joinRegs(Register.Alt, other.stack_.alt);
     }
 }