Hi, I’ve created an irc.rb (attached) which mimics IronPython’s pyc.py.
It
is failing on this line:
Microsoft::Scripting::ScriptCode.save_to_assembly(outfile,
codes.to_array())
With the following exception… Any help would be greatly appreciated.
The
test file I’m trying to compile is also attached. I am building on
revision
140. I have also tried with the Microsoft.Scripting and
Microsoft.Scripting.Core dlls from IronPython with the same result.
C:\work\ironruby\co\svn\trunk\build\release>.\ir.exe irc.rb -target:dll
-verbose test.rb
Compiling C:\work\ironruby\co\svn\trunk\build\release\test.rb…
Creating output file
C:\work\ironruby\co\svn\trunk\build\release\test.dll…
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression
.cs:88:in New': Value cannot be null. Parameter name: constructor (System::ArgumentNullException) from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\NewExpression .cs:83:in
New’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:294:in DefaultVisitDynamicExpression' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:191:in
VisitNode’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.cs:40:in VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in
Visit’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:264:in DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in
VisitNode’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.cs:40:in VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in
Visit’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:264:in DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in
VisitNode’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.cs:40:in VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in
Visit’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:264:in DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in
VisitNode’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.cs:40:in VisitNodes' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:108:in
Visit’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:264:in DefaultVisitBlock' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:176:in
VisitNode’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.cs:272:in Visit' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.Generated.cs:374:in
DefaultVisitScopeExpression’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre
eVisitor.Generated.cs:218:in VisitNode' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Ast\ExpressionTre eVisitor.cs:189:in
Visit’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\MatchCall
er.Generated.cs:40:in Call4' from C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\CallSite. cs:275:in
UpdateAndExecute’
from
C:\work\ironruby\co\svn\trunk\src\Microsoft.Scripting.Core\Actions\UpdateDel
egates.Generated.cs:52:in `Update4’
from :0