示例#1
0
    public void VarExp(VarExp e)
    {
	switch(e.Pos){
	case 0:
	    il.Emit(OpCodes.Ldarg_0);
	    break;
	case 1:
	    il.Emit(OpCodes.Ldarg_1);
	    break;
	case 2:
	    il.Emit(OpCodes.Ldarg_2);
	    break;
	case 3:
	    il.Emit(OpCodes.Ldarg_3);
	    break;
	default:
	    if(e.Pos > -128 && e.Pos < 127)
		il.Emit(OpCodes.Ldarg_S, e.Pos);
	    else 
		il.Emit(OpCodes.Ldarg, e.Pos);
	    break;
	}
    }
示例#2
0
    public void VarExp(VarExp e)
    {
	if (CurrentFuncDef[e.Name] != null){
	    e.ExpType = (Type)CurrentFuncDef[e.Name];
	}
	else{
	    e.ExpType = typeof(void);
	}
	
    }