[Mono-devel-list] Mono Interpreter: Dietmar's idea.

Miguel de Icaza miguel at ximian.com
Mon Jul 14 13:08:43 EDT 2003


Hey guys,

   I just saw some commits from Zoltan to the interpreter to speed it
up, and that reminded me of a proof-of-concept work that Dietmar did
with the old JIT engine that might be useful again.

   Our interpreter is not very fast, because it has to track type
information on the stack, for certain opcodes, like this:

	ldc.i4.1
	ldc.i4.2
	add

    That will be an integer add, while:

	ldc.r4 1.0
	ldc.r3 2.0
	add

    Would be a 4-byte floating point addition.

    What Dietmar did before, is that he made the interpreter work not on
the original CIL byte sequence, but on the forest-of-trees that we
generated later.

    With the new JIT, we have a structure like this:

	CIL -> IR1 (forest of trees) -> IR2 (list of instructions) -> native code

    So it occurs to me that we could plug an interpreter for the IR2
set of operations, this would have many benefits: it would reuse many
of the optimizations we perform on IR1 and IR2, and it would reuse more
of the JIT code.

Miguel



More information about the Mono-devel-list mailing list