Jurassic.Compiler.Scope.GenerateScopeDestruction C# (CSharp) Method

GenerateScopeDestruction() private method

Generates code that restores the parent scope as the active scope.
private GenerateScopeDestruction ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void
generator ILGenerator The generator to output the CIL to.
optimizationInfo OptimizationInfo Information about any optimizations that should be performed.
return void
        internal void GenerateScopeDestruction(ILGenerator generator, OptimizationInfo optimizationInfo)
        {
            if (this.ExistsAtRuntime == false)
                return;

            // Modify the scope variable so it points at the parent scope.
            EmitHelpers.LoadScope(generator);
            generator.Call(ReflectionHelpers.Scope_ParentScope);
            EmitHelpers.StoreScope(generator);
        }