我的同事和我刚刚发现vb.net代码中可以使用的参数数量似乎有限制.
原文链接:https://www.f2er.com/vb/255017.html对我来说很奇怪的是,这个代码将构建,但是当我运行它时,它会抛出一个InvalidProgramException,说“JIT编译器遇到内部限制”.
以前有人见过这样的事吗?你能指出我为什么会这样吗?
(我在VS 2010中使用.net 4.0.我们在VS 2008中发现了这一点,结果略有不同.)
示例代码:
Dim bigVariable As Double = 10.35 Dim factor As Double = 1.3 Dim hugeNumberOfArgs As Double = (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) + (bigVariable * factor) Console.WriteLine("Result: " & hugeNumberOfArgs) Console.ReadKey()