[Mono-bugs] [Bug 69182][Wis] New - Use only one trampoline for jitting virtual functions

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 6 Nov 2004 12:13:23 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=69182

--- shadow/69182	2004-11-06 12:13:23.000000000 -0500
+++ shadow/69182.tmp.10348	2004-11-06 12:13:23.000000000 -0500
@@ -0,0 +1,33 @@
+Bug#: 69182
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Use only one trampoline for jitting virtual functions
+
+Today, when we create a vtable, we create a new trampoline for every
+virtual function in the method. However, it is possible to create one
+trampoline for all of them.
+
+The code for calling a virtual function is something like:
+
+mov eax, [obj+vtable_offset]
+call [eax+method_offset]
+
+In the trampoline, we can take eax, which will hold the MonoVTable for the
+class. Then, we can decode method_offset. From there, we will know what
+MonoMethod* we want to compile. Thus, the trampoline is not specific to the
+virtual call.
+
+Jikes uses this technique, and probably other runtimes do as well.