Jurassic.Compiler.OptimizationInfo.MarkSequencePoint C# (CSharp) Метод

MarkSequencePoint() публичный Метод

Emits a sequence point, and sets the SourceSpan property.
public MarkSequencePoint ( ILGenerator generator, Jurassic.Compiler.SourceCodeSpan span ) : void
generator ILGenerator The IL generator used to emit the sequence point.
span Jurassic.Compiler.SourceCodeSpan The source code span.
Результат void
        public void MarkSequencePoint(ILGenerator generator, SourceCodeSpan span)
        {
            if (span == null)
                throw new ArgumentNullException("span");
            if (this.DebugDocument != null)
                generator.MarkSequencePoint(this.DebugDocument, span);
            this.SourceSpan = span;
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Generates CIL for the start of every statement.
        /// </summary>
        /// <param name="generator"> The generator to output the CIL to. </param>
        /// <param name="optimizationInfo"> Information about any optimizations that should be performed. </param>
        /// <param name="locals"> Variables common to both GenerateStartOfStatement() and GenerateEndOfStatement(). </param>
        public void GenerateStartOfStatement(ILGenerator generator, OptimizationInfo optimizationInfo, StatementLocals locals)
        {
#if DEBUG && !SILVERLIGHT
            // Statements must not produce or consume any values on the stack.
            if (generator is DynamicILGenerator)
            {
                locals.OriginalStackSize = ((DynamicILGenerator)generator).StackSize;
            }
#endif

            if (locals.NonDefaultBreakStatementBehavior == false && this.HasLabels == true)
            {
                // Set up the information needed by the break statement.
                locals.EndOfStatement = generator.CreateLabel();
                optimizationInfo.PushBreakOrContinueInfo(this.Labels, locals.EndOfStatement, null, labelledOnly: true);
            }

            // Emit debugging information.
            if (locals.NonDefaultSourceSpanBehavior == false)
            {
                optimizationInfo.MarkSequencePoint(generator, this.SourceSpan);
            }
        }
All Usage Examples Of Jurassic.Compiler.OptimizationInfo::MarkSequencePoint