using System;
using System.Linq.Expressions;
namespace System.Runtime.CompilerServices
{
/// Represents the runtime state of a dynamically generated method.
/// 2
// Token: 0x0200004B RID: 75
public class ExecutionScope
{
// Token: 0x0600044D RID: 1101 RVA: 0x00014648 File Offset: 0x00012848
private ExecutionScope(CompilationContext context, int compilation_unit)
{
this.context = context;
this.compilation_unit = compilation_unit;
this.Globals = context.GetGlobals();
}
// Token: 0x0600044E RID: 1102 RVA: 0x00014678 File Offset: 0x00012878
internal ExecutionScope(CompilationContext context)
: this(context, 0)
{
}
// Token: 0x0600044F RID: 1103 RVA: 0x00014684 File Offset: 0x00012884
internal ExecutionScope(CompilationContext context, int compilation_unit, ExecutionScope parent, object[] locals)
: this(context, compilation_unit)
{
this.Parent = parent;
this.Locals = locals;
}
/// Creates a delegate that can be used to execute a dynamically generated method.
/// A that can execute a dynamically generated method.
/// The index of the object that stores information about associated lambda expression of the dynamic method.
/// An array that contains the hoisted local variables from the parent context.
// Token: 0x06000450 RID: 1104 RVA: 0x000146A0 File Offset: 0x000128A0
public Delegate CreateDelegate(int indexLambda, object[] locals)
{
return this.context.CreateDelegate(indexLambda, new ExecutionScope(this.context, indexLambda, this, locals));
}
/// Creates an array to store the hoisted local variables.
/// An array to store hoisted local variables.
// Token: 0x06000451 RID: 1105 RVA: 0x000146BC File Offset: 0x000128BC
public object[] CreateHoistedLocals()
{
return this.context.CreateHoistedLocals(this.compilation_unit);
}
/// Frees a specified expression tree of external parameter references by replacing the parameter with its current value.
/// An expression tree that does not contain external parameter references.
/// An expression tree to free of external parameter references.
/// An array that contains the hoisted local variables.
// Token: 0x06000452 RID: 1106 RVA: 0x000146D0 File Offset: 0x000128D0
public Expression IsolateExpression(Expression expression, object[] locals)
{
return this.context.IsolateExpression(this, locals, expression);
}
/// Represents the non-trivial constants and locally executable expressions that are referenced by a dynamically generated method.
// Token: 0x040000FD RID: 253
public object[] Globals;
/// Represents the hoisted local variables from the parent context.
// Token: 0x040000FE RID: 254
public object[] Locals;
/// Represents the execution scope of the calling delegate.
// Token: 0x040000FF RID: 255
public ExecutionScope Parent;
// Token: 0x04000100 RID: 256
internal CompilationContext context;
// Token: 0x04000101 RID: 257
internal int compilation_unit;
}
}