Пример #1
0
 protected internal virtual void VisitLoadVarAddr(LoadVarAddr node, object data)
 {
     throw new NodeNotSupportedException(node);
 }
Пример #2
0
 protected internal override void VisitLoadVarAddr(LoadVarAddr node, object data)
 {
     StackTypes stack = data as StackTypes;
     stack.Push(TypeEx.BuildRefType(node.Var.Type));
     AddTask(node.Next,stack);
 }
Пример #3
0
 protected internal override void VisitLoadVarAddr(LoadVarAddr node, object data)
 {
     switch(node.Var.Kind)
     {
         case VariableKind.Local:
         {
             generator.Emit(OpCodes.Ldloca, GetLocal(node.Var));
         } break;
         case VariableKind.Parameter:
         {
             int index = GetArgIndex(node.Var);
             if(index <= 255)
               generator.Emit(OpCodes.Ldarga_S, (byte)index);
             else
       generator.Emit(OpCodes.Ldarga, index);
         } break;
         case VariableKind.ArgList:
             throw new EmissionException(); //Impossible!
     }
     AddTask(node.Next,null);
 }