• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# LS2IL.FlatOperand类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LS2IL.FlatOperand的典型用法代码示例。如果您正苦于以下问题:C# FlatOperand类的具体用法?C# FlatOperand怎么用?C# FlatOperand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FlatOperand类属于LS2IL命名空间,在下文中一共展示了FlatOperand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Resolve

        public override FlatOperand Resolve(ExpressionSyntax expression, ArgumentListSyntax argumentList, TypeInfo result_type, SymbolInfo si, FlatOperand into_lvalue, Function function, List<FlatStatement> instructions)
        {
            FlatOperand fop_subject;
            if (expression is IdentifierNameSyntax)
            {
                // typeof this
                fop_subject = FlatOperand.ThisRef(FlatValue.FromType(result_type.ConvertedType));
            }
            else if (expression is MemberAccessExpressionSyntax)
            {
                MemberAccessExpressionSyntax meas = (MemberAccessExpressionSyntax)expression;

                fop_subject = function.ResolveExpression(meas.Expression, null, instructions);
            }
            else
            {
                throw new NotImplementedException("GetMetaTable on expression type " + expression.GetType().ToString());
            }

            if (into_lvalue == null)
            {
                FlatOperand fop_register = function.AllocateRegister("");
                into_lvalue = fop_register.GetLValue(function, instructions);
            }
            instructions.Add(FlatStatement.GETMETATABLE(into_lvalue, fop_subject));
            return into_lvalue.AsRValue(FlatValue.Table());
        }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:27,代码来源:Intrinsics.cs


示例2: Resolve

        public override FlatOperand Resolve(InvocationExpressionSyntax node, TypeInfo result_type, SymbolInfo si, FlatOperand into_lvalue, Function function, List<FlatStatement> instructions)
        {
            if (!(node.Expression is MemberAccessExpressionSyntax))
            {
                throw new NotImplementedException("GETPROPERTY not on MemberAccessExpressionSyntax");
            }

            MemberAccessExpressionSyntax meas = (MemberAccessExpressionSyntax)node.Expression;

            FlatOperand fop_subject = function.ResolveExpression(meas.Expression, null, instructions);

            if (into_lvalue == null)
            {
                FlatOperand fop_register = function.AllocateRegister("");
                into_lvalue = fop_register.GetLValue(function, instructions);
            }
            instructions.Add(FlatStatement.STRINGVAL(into_lvalue, fop_subject));
            return into_lvalue.AsRValue(FlatValue.String(string.Empty));
        }
开发者ID:Noob536,项目名称:ls2csc,代码行数:19,代码来源:Intrinsics.cs


示例3: AddSuccessorByRelativeOpnd

 void AddSuccessorByRelativeOpnd(FlatOperand opnd)
 {
     switch (opnd.OperandType)
     {
         case FlatOperandType.OPND_LABEL:
             {
                 AddSuccessorByLabel(opnd.ImmediateValue.ValueText);
                 return;
             }
             break;
     }
     throw new NotImplementedException();
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:13,代码来源:ControlFlowGraph.cs


示例4: EHInfo

 public EHInfo(EHInfo oldState,int numTryInstruction, FlatOperand catchesLabel, string ehendLabel)
 {
     CatchesLabel = catchesLabel.ImmediateValue.ValueText;
     ehEndLabel = ehendLabel;
     PreviousState = oldState;
     EHPart = EHPart.Try;
     NumTryInstruction = numTryInstruction;
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:8,代码来源:ControlFlowGraph.cs


示例5: TYPEOF

 public static FlatStatement TYPEOF(FlatOperand lvalue, FlatOperand right)
 {
     if (lvalue.OperandType != FlatOperandType.OPND_IMMEDIATE)
     {
         throw new NotSupportedException("expected register number (LValue) in left");
     }
     return new FlatStatement(Instruction.TYPEOF, lvalue, right);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:8,代码来源:FlatStatement.cs


示例6: TRY

 public static FlatStatement TRY(FlatOperand ehbeginLabel, string ehendLabel)
 {
     return new FlatStatement(Instruction.TRY, ehbeginLabel) { Comment = ehendLabel };
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例7: TABLESET

 public static FlatStatement TABLESET(FlatOperand table, FlatOperand key, FlatOperand rvalue)
 {
     return new FlatStatement(Instruction.TABLESET, table, key, rvalue);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例8: SWITCH

 public static FlatStatement SWITCH(FlatOperand array_or_table, FlatOperand key)
 {
     return new FlatStatement(Instruction.SWITCH, array_or_table, key);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例9: NEWARRAY

 public static FlatStatement NEWARRAY(FlatOperand lvalue, FlatOperand size, FlatOperand fop_type)
 {
     if (lvalue.OperandType != FlatOperandType.OPND_IMMEDIATE)
     {
         throw new NotSupportedException("expected register number (LValue) in left");
     }
     return new FlatStatement(Instruction.NEWARRAY, lvalue, size, fop_type);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:8,代码来源:FlatStatement.cs


示例10: NEGATE

 public static FlatStatement NEGATE(FlatOperand lvalue, FlatOperand left)
 {
     return new FlatStatement(Instruction.NEGATE, lvalue, left);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例11: LABEL

 public static FlatStatement LABEL(FlatOperand label)
 {
     return new FlatStatement(Instruction.meta_LABEL, label);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例12: JZ

 public static FlatStatement JZ(FlatOperand label, FlatOperand left)
 {
     return new FlatStatement(Instruction.JZ, label, left);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例13: JNE

 public static FlatStatement JNE(FlatOperand label, FlatOperand left, FlatOperand right)
 {
     return new FlatStatement(Instruction.JNE, label, left, right);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例14: JMP

 public static FlatStatement JMP(FlatOperand label)
 {
     return new FlatStatement(Instruction.JMP, label);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例15: IS

 public static FlatStatement IS(FlatOperand lvalue, FlatOperand subject, FlatOperand is_type)
 {
     return new FlatStatement(Instruction.IS, lvalue, subject, is_type);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例16: SETSTATICFIELD

 public static FlatStatement SETSTATICFIELD(FlatOperand field, FlatOperand rvalue)
 {
     return new FlatStatement(Instruction.SETSTATICFIELD, field, rvalue);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例17: SETSTATICPROPERTY

 public static FlatStatement SETSTATICPROPERTY(FlatOperand property, FlatOperand rvalue)
 {
     return new FlatStatement(Instruction.SETSTATICPROPERTY, property, rvalue);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:4,代码来源:FlatStatement.cs


示例18: NEWDELEGATE

 public static FlatStatement NEWDELEGATE(FlatOperand lvalue, FlatOperand type, FlatOperand array_with_method_and_optional_type)
 {
     if (lvalue.OperandType != FlatOperandType.OPND_IMMEDIATE)
     {
         throw new NotSupportedException("expected register number (LValue) in left");
     }
     return new FlatStatement(Instruction.NEWDELEGATE, lvalue, type, array_with_method_and_optional_type);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:8,代码来源:FlatStatement.cs


示例19: TABLEGET

        public static FlatStatement TABLEGET(FlatOperand lvalue, FlatOperand table, FlatOperand key)
        {
            if (lvalue.OperandType != FlatOperandType.OPND_IMMEDIATE)
            {
                throw new NotSupportedException("expected register number (LValue) in left");
            }

            return new FlatStatement(Instruction.TABLEGET, lvalue, table, key);
        }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:9,代码来源:FlatStatement.cs


示例20: NEWOBJECT

 public static FlatStatement NEWOBJECT(FlatOperand lvalue, FlatOperand constructor, FlatOperand arguments)
 {
     if (lvalue.OperandType != FlatOperandType.OPND_IMMEDIATE)
     {
         throw new NotSupportedException("expected register number (LValue) in left");
     }
     return new FlatStatement(Instruction.NEWOBJECT, lvalue, constructor, arguments);
 }
开发者ID:LaxLacks,项目名称:ls2csc,代码行数:8,代码来源:FlatStatement.cs



注:本文中的LS2IL.FlatOperand类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LSharp.Cons类代码示例发布时间:2022-05-26
下一篇:
C# Modelo.LQCEEntities类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap