From: Suriya S. <su...@cs...> - 2009-01-01 19:30:15
|
Hi all, I guess this is the first post this year. I wish everyone a happy new year. I have a question about Trampolines in TIBs. In the code below, why is callAddress an offset from tibAddress? Shouldn't callAddress be an offset from address of (this.data[0])? Is there something special going on in the layout of TIB objects in MemoryManager.newTIB()? @NoInline public void setVirtualMethod(int virtualMethodIndex, CodeArray code) { if (VM.VerifyAssertions) VM._assert(virtualMethodIndex >= 0); if (VM.runningVM && code == LazyCompilationTrampoline.instructions) { Address tibAddress = Magic.objectAsAddress(this); Address callAddress = tibAddress.plus(Offset.fromIntZeroExtend(lazyMethodInvokerTrampolineIndex() << LOG_BYTES_IN_ADDRESS)); set(TIB_FIRST_VIRTUAL_METHOD_INDEX + virtualMethodIndex, callAddress); } ... Thanks, Suriya |