Ejemplo n.º 1
0
 protected internal override void VisitLoadVar(LoadVar node, object data)
 {
     StackTypes stack = data as StackTypes;
     stack.Push(node.Var.Type);
     AddTask(node.Next,stack);
 }
Ejemplo n.º 2
0
 internal void addUsage(StoreVar storer, LoadVar loader)
 {
     usageHash.Add(storer,loader);
 }
Ejemplo n.º 3
0
 protected internal virtual void VisitLoadVar(LoadVar node, object data)
 {
     throw new NodeNotSupportedException(node);
 }
Ejemplo n.º 4
0
 protected override void VisitLoadVar(LoadVar downNode, object o)
 {
     PointerValue ptr = new PointerToLocationValue(this.state.Pool[downNode.Var]);
     this.loadVar(downNode, ptr, o);
 }
Ejemplo n.º 5
0
        protected override void VisitLoadVar(LoadVar upNode, object o)
        {
            State state = o as State;
            BTValue val = state.Pool[upNode.Var].Val as BTValue;
            state.Stack.Push(val);

            BTType btType;
            if (val.BTType == BTType.Dynamic)
                btType = BTType.eXclusive;
            else
                btType = BTType.Static;
            Annotation.SetNodeBTType(upNode, btType);
        }
Ejemplo n.º 6
0
 protected override void VisitLoadVar(LoadVar upNode, object o)
 {
     DepthContainer cnt = o as DepthContainer;
     cnt.Depth -= 1;
 }
Ejemplo n.º 7
0
 protected internal override void VisitLoadVar(LoadVar node, object data)
 {
     switch(node.Var.Kind)
     {
         case VariableKind.Local:
         {
             generator.Emit(OpCodes.Ldloc, GetLocal(node.Var));
         } break;
         case VariableKind.Parameter:
         {
             int index = GetArgIndex(node.Var);
             switch(index)
             {
                 case 0:
                     generator.Emit(OpCodes.Ldarg_0);
                     break;
                 case 1:
                     generator.Emit(OpCodes.Ldarg_1);
                     break;
                 case 2:
                     generator.Emit(OpCodes.Ldarg_2);
                     break;
                 case 3:
                     generator.Emit(OpCodes.Ldarg_3);
                     break;
                 default:
                     if(index <= 255)
                         generator.Emit(OpCodes.Ldarg_S, (byte)index);
                     else
                         generator.Emit(OpCodes.Ldarg, index);
                     break;
             }
         } break;
         case VariableKind.ArgList:
             throw new EmissionException(); //TODO: not supported yet
     }
     AddTask(node.Next,null);
 }