[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] jit coder problem
From: |
ktreichel |
Subject: |
[Pnet-developers] jit coder problem |
Date: |
Thu, 16 Feb 2006 20:06:29 +0100 |
Hi,
i have found the following code in mscorlib for Hashtable.get_Item:
.method public virtual hidebysig newslot specialname instance class
System.Object get_Item(class System.Object key) cil managed
{
// Start of method header: 2849c
.maxstack 3
.locals init (int32,
int32)
?L284a8:
ldarg.0
ldarg.1
ldloca.s 0
callvirt instance int32
System.Collections.Hashtable::FindSlot(class System.Object, int32 &)
stloc.1
ldloc.1
ldc.i4.m1
bne.un.s ?L284b9
ldnull
br.s ?L284ca
?L284b9:
ldarg.0
ldfld valuetype System.Collections.Hashtable/HashBucket[]
System.Collections.Hashtable::table
ldloc.1
ldelema valuetype System.Collections.Hashtable/HashBucket
ldfld class System.Object
System.Collections.Hashtable/HashBucket::value
?L284ca:
ret
}
My problem with the coder is the branch directly to the ret instruction which
should return either null or the HashBucket value.
Should we fix this by examining the instruction at the branch target and see if
it's a ret instruction and do the ret instead of the branch then ?
That's just my first idea how we could handle this issue.
Any other ideas are welcome.
Cheers,
Klaus
______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
- [Pnet-developers] jit coder problem,
ktreichel <=