TT (Tom Tempelaere) wrote:
> If .NET does not have a documentation entry that limits this, then the
> vendor's code does not have a bug. Although I think 23000 lines is a
> lot, there is by my knowledge no limit to the number of executed
> statements inside a function.
Well, I think that is passing the buck, although I take your point
(albeit a double negative point) that if the spec doesn't say you cannot
do it, then that means that you should be able to do it.
As to a limit, well, of course there is one. The spec says that IL of a
method is preceded by a header, either fat format or tiny format. Tiny
format uses 6 bits to say how many bytes (not opcodes, but the total of
opcodes and their parameters) that make up the method. Clearly tiny
format is not used in this monster method <g>. The fat format uses 4
bytes (ie it's a uint) to give the number of bytes. (Partitian II 24.4.1
to 24.4.3) Of course, it's very doubtful that in this case the number of
bytes has been exceeded.
> Anyway, documentation on InvalidProgramException:
> <quote>
> The exception that is thrown when a program contains invalid Microsoft
> intermediate language (MSIL) or metadata. Generally this indicates a
> bug in the compiler that generated the program.
> </quote>
>
> Since the compiler was able to compile the generated program without
> compilation errors or ICE's, the compiler in question generated bad
> IL.
True. Someone on the C# team should have put in a count the number of
local variable (as another poster suggested was the problem) and threw
an error. However, having said that, I would not recommend anyone to buy
a tool that produces such monsterous code, regardless of whether it was
'correct' or not.
Richard
--
http://www.grimes.demon.co.uk/workshops/fusionWS.htm
http://www.grimes.demon.co.uk/workshops/securityWS.htm