22// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33// See the LICENSE file in the project root for more information.
44
5- using System . Linq . Expressions ;
6- using Microsoft . Scripting . Ast ;
7-
85using System ;
96using System . Collections . Generic ;
107using System . Diagnostics ;
8+ using System . Linq . Expressions ;
119using System . Reflection ;
1210using System . Runtime . CompilerServices ;
1311using System . Threading ;
1412
13+ using IronPython . Compiler ;
14+ using IronPython . Runtime . Operations ;
15+ using IronPython . Runtime . Types ;
16+
1517using Microsoft . Scripting ;
18+ using Microsoft . Scripting . Ast ;
1619using Microsoft . Scripting . Debugging . CompilerServices ;
1720using Microsoft . Scripting . Generation ;
1821using Microsoft . Scripting . Interpreter ;
1922using Microsoft . Scripting . Runtime ;
2023using Microsoft . Scripting . Utils ;
2124
22- using IronPython . Compiler ;
23- using IronPython . Runtime . Operations ;
24- using IronPython . Runtime . Types ;
25-
2625namespace IronPython . Runtime {
2726 /// <summary>
2827 /// Represents a piece of code. This can reference either a CompiledCode
@@ -601,7 +600,7 @@ internal object Call(CodeContext/*!*/ context) {
601600 return optimizedModuleCode ( this ) ;
602601 }
603602
604- var func = new PythonFunction ( context , this , null , ArrayUtils . EmptyObjects , null , null , new MutableTuple < object > ( ) ) ;
603+ var func = new PythonFunction ( context , this , null , [ ] , null , null , new MutableTuple < object > ( ) ) ;
605604 CallSite < Func < CallSite , CodeContext , PythonFunction , object > > site = context . LanguageContext . FunctionCallSite ;
606605 return site . Target ( site , context , func ) ;
607606 }
@@ -772,7 +771,7 @@ private LambdaExpression GetGeneratorOrNormalLambdaTracing(PythonContext context
772771 ) ;
773772 }
774773
775-
774+
776775 /// <summary>
777776 /// Gets the correct final LambdaExpression for this piece of code.
778777 ///
@@ -784,8 +783,8 @@ private LightLambdaExpression GetGeneratorOrNormalLambda() {
784783 finalCode = Code ;
785784 } else {
786785 finalCode = Code . ToGenerator (
787- _lambda . ShouldInterpret ,
788- _lambda . EmitDebugSymbols ,
786+ _lambda . ShouldInterpret ,
787+ _lambda . EmitDebugSymbols ,
789788 _lambda . GlobalParent . PyContext . Options . CompilationThreshold
790789 ) ;
791790 }
@@ -838,7 +837,7 @@ private Delegate CompileLambda(LambdaExpression code, EventHandler<LightLambdaCo
838837
839838 internal Delegate AddRecursionCheck ( PythonContext context , Delegate finalTarget ) {
840839 if ( context . RecursionLimit != Int32 . MaxValue ) {
841- if ( finalTarget is Func < CodeContext , CodeContext > ||
840+ if ( finalTarget is Func < CodeContext , CodeContext > ||
842841 finalTarget is Func < FunctionCode , object > ||
843842 finalTarget is LookupCompilationDelegate ) {
844843 // no recursion enforcement on classes or modules
@@ -1185,7 +1184,6 @@ public Dictionary<int, bool> LoopOrFinallyIds {
11851184 return _loopIds ;
11861185 }
11871186 }
1188-
11891187 }
11901188 }
11911189}
0 commit comments