当前位置: 首页>>代码示例>>C#>>正文


C# VirtualMachine.SetPendingAnnotation方法代码示例

本文整理汇总了C#中VirtualMachine.SetPendingAnnotation方法的典型用法代码示例。如果您正苦于以下问题:C# VirtualMachine.SetPendingAnnotation方法的具体用法?C# VirtualMachine.SetPendingAnnotation怎么用?C# VirtualMachine.SetPendingAnnotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VirtualMachine的用法示例。


在下文中一共展示了VirtualMachine.SetPendingAnnotation方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            Value.Emit(into, OperationDestination.Stack);
            (LHS as IAssignable).EmitAssignment(into);
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:7,代码来源:Let.cs

示例2: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            into.AddInstructions("ALLOC_RSO NEXT PUSH", ResultType.Size);
            into.AddInstructions("STORE_RSO_M NEXT PEEK NEXT", ResultType.ID, 0); //Store type id

            if (Constructor != null)
            {
                if (Constructor.OwnerContextID == Scope.EnvironmentContext.ID && Constructor.OwnerContextID != 0)
                {
                    into.AddInstructions("CALL NEXT #" + Constructor.DescriptiveHeader, 0);
                    Constructor.Body.CallPoints.Add(into.Count - 1);
                }
                else
                {
                    into.AddInstructions("STACK_INVOKE NEXT", Constructor.MakeInvokableFunction());
                }
            }

            if (Initializers != null)
            {
                foreach (var initializer in Initializers)
                    initializer.Emit(into, OperationDestination.Discard);

            }

            if (Destination != OperationDestination.Stack)
                into.AddInstructions("MOVE POP " + WriteOperand(Destination));
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:30,代码来源:New.cs

示例3: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            //Assumes the RSO is on the top of the stack.
            Value.Emit(into, OperationDestination.R);
            into.AddInstructions("STORE_RSO_M R PEEK NEXT", Member.Offset);
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:8,代码来源:Initializer.cs

示例4: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            foreach (var n in Parameters)
                n.Emit(into, OperationDestination.Stack);
            into.AddInstructions("COMPAT_INVOKE NEXT", Parameters.Count);
            if (Destination != OperationDestination.R && Destination != OperationDestination.Discard)
                into.AddInstructions("MOVE R " + Node.WriteOperand(Destination));
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:10,代码来源:CompatibleCall.cs

示例5: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            foreach (var arg in Arguments)
                arg.Emit(into, OperationDestination.Stack);
            into.AddInstructions("STACK_INVOKE NEXT", Function.MakeInvokableFunction());
            if (Arguments.Count > 0) into.AddInstructions("CLEANUP NEXT", Arguments.Count);
            if (Destination != OperationDestination.R && Destination != OperationDestination.Discard)
                into.AddInstructions("MOVE R " + Node.WriteOperand(Destination));
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:11,代码来源:StackCall.cs

示例6: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            if (Value != null)
                Value.Emit(into, OperationDestination.R);
            else
                into.AddInstructions("MOVE NEXT R", 0);

            into.AddInstructions("JUMP NEXT", 0);
            DeclarationScope.RecordReturnJumpSource(into.Count - 1);
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:12,代码来源:Return.cs

示例7: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            if (Value != null)
            {
                Value.Emit(into, OperationDestination.Stack);
            }
            else
            {
                into.AddInstructions("MOVE NEXT PUSH", 0); //Just make room on the stack for it...
            }
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:13,代码来源:LocalDeclaration.cs

示例8: Emit

        public override void Emit(VirtualMachine.InstructionList into, OperationDestination Destination)
        {
            into.SetPendingAnnotation(this.ToString());

            Header.Emit(into, OperationDestination.R);
            into.AddInstructions("IF_FALSE R", "JUMP NEXT", 0);
            var jumpFrom = into.Count - 1;
            ThenBlock.Emit(into, OperationDestination.Discard);
            if (ElseBlock != null)
            {
                into.AddInstructions("JUMP NEXT", 0);
                into[jumpFrom] = into.Count;
                jumpFrom = into.Count - 1;
                ElseBlock.Emit(into, OperationDestination.Discard);
            }
            into[jumpFrom] = into.Count;
        }
开发者ID:Blecki,项目名称:EtcScript,代码行数:17,代码来源:If.cs


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