Filter:   InfoImg
download class.inl
Language: C++
Copyright: (c) 2006 Microsoft Corporation. All rights reserved.
LOC: 173
Project Info
Shared Source Common Language Infrastructure(sscli20)
Server: Shared Source Common Language Infrastructure
Type: filesystem
...sscli20\sscli20\clr\src\vm\
   appdomain.cpp
   appdomain.hpp
   appdomain.inl
   appdomainhelper.cpp
   appdomainhelper.h
   appdomainnative.cpp
   appdomainnative.hpp
   appdomainstack.cpp
   appdomainstack.h
   appdomainstack.inl
   argslot.h
   array.cpp
   array.h
   assembly.cpp
   assembly.hpp
   assemblyname.cpp
   assemblyname.hpp
   assemblynative.cpp
   assemblynative.hpp
   assemblysink.cpp
   assemblysink.h
   assemblyspec.cpp
   assemblyspec.hpp
   binder.cpp
   binder.h
   cachelinealloc.cpp
   cachelinealloc.h
   ceeload.cpp
   ceeload.h
   ceeload.inl
   ceemain.cpp
   ceemain.h
   certificatecache.cpp
   certificatecache.h
   cgensys.h
   class.cpp
   class.h
   class.inl
   classloadlevel.h
   classnames.h
   clrex.cpp
   clrex.h
   clsload.cpp
   clsload.hpp
   clsload.inl
   codeman.cpp
   codeman.h
   codeman.inl
   comarrayhelpers.cpp
   comarrayhelpers.h
   comarrayinfo.cpp
   comarrayinfo.h
   comcallablewrapper.cpp
   comcallablewrapper.h
   comcurrency.cpp
   comcurrency.h
   comdatetime.cpp
   comdatetime.h
   comdecimal.cpp
   comdecimal.h
   comdelegate.cpp
   comdelegate.h
   comdynamic.cpp
   comdynamic.h
   comisolatedstorage.cpp
   comisolatedstorage.h
   commemoryfailpoint.cpp
   commemoryfailpoint.h
   commethodrental.cpp
   commethodrental.h
   commodule.cpp
   commodule.h
   common.cpp
   common.h
   comnumber.cpp
   comnumber.h
   comobject.cpp
   comobject.h
   comreflectioncache.hpp
   comreflectioncommon.cpp
   comreflectioncommon.h
   comstreams.cpp
   comstreams.h
   comstring.cpp
   comstring.h
   comstringbuffer.cpp
   comstringbuffer.h
   comstringcommon.h
   comsynchronizable.cpp
   comsynchronizable.h
   comsystem.cpp
   comsystem.h
   comthreadpool.cpp
   comthreadpool.h
   comutilnative.cpp
   comutilnative.h
   comvarargs.cpp
   comvarargs.h
   comvariant.cpp
   comvariant.h
   comwaithandle.cpp
   comwaithandle.h
   confighelper.cpp
   confighelper.h
   ...inedexecutionregion.cpp
   ...rainedexecutionregion.h
   context.h
   contexts.cpp
   contractimpl.cpp
   contractimpl.h
   corhost.cpp
   crossdomaincalls.cpp
   crossdomaincalls.h
   crst.cpp
   crst.h
   cryptapis.h
   ctxtcall.h
   customattribute.cpp
   customattribute.h
   custommarshalerinfo.cpp
   custommarshalerinfo.h
   dbginterface.h
   debugdebugger.cpp
   debugdebugger.h
   debughelp.cpp
   debuginfostore.cpp
   debuginfostore.h
   decodemd.cpp
   decodemd.h
   delegateinfo.h
   dllimport.cpp
   dllimport.h
   dllimportcallback.cpp
   dllimportcallback.h
   domainfile.cpp
   domainfile.h
   domainfile.inl
   dynamicmethod.cpp
   dynamicmethod.h
   ecall.cpp
   ecall.h
   ecmakey.h
   eecallconv.h
   eeconfig.cpp
   eeconfig.h
   eeconfigfactory.cpp
   eeconfigfactory.h
   eecontract.cpp
   eecontract.h
   eecontract.inl
   eedbginterface.h
   eedbginterfaceimpl.cpp
   eedbginterfaceimpl.h
   eedbginterfaceimpl.inl
   eehash.cpp
   eehash.h
   eemessagebox.cpp
   eemessagebox.h
   eepolicy.cpp
   eepolicy.h
   eeprofinterfaces.h
   eeprofinterfaces.inl
   ...rofinterfacewrapper.inl
   eetwain.cpp
   encee.h
   eventstore.cpp
   eventstore.hpp
   excep.cpp
   excep.h
   exceptmacros.h
   exinfo.cpp
   exinfo.h
   exstate.cpp
   exstate.h
   exstatecommon.h
   fcall.cpp
   fcall.h
   field.cpp
   field.h
   fieldmarshaler.cpp
   fieldmarshaler.h
   fjit_eetwain.cpp
   fjit_eetwain.h
   fptrstubs.cpp
   fptrstubs.h
   frames.cpp
   frames.h
   fusionbind.cpp
   fusioninit.cpp
   fusionsink.cpp
   fusionwrap.cpp
   fusionwrap.h
   gc.h
   gccommon.cpp
   gcdecode.cpp
   gcdesc.h
   gcee.cpp
   gceesvr.cpp
   gceewks.cpp
   gchost.cpp
   gcimpl.h
   gcscan.cpp
   gcscan.h
   gcsmp.cpp
   gcsmppriv.h
   gcsvr.cpp
   gcwks.cpp
   genericdict.cpp
   genericdict.h
   generics.cpp
   generics.h
   genmeth.cpp
   gmheap.cpp
   gmheap.hpp
   gms.h
   h2inc.pl
   handletable.cpp
   handletable.h
   handletable.inl
   handletablecache.cpp
   handletablecore.cpp
   handletablepriv.h
   handletablescan.cpp
   hash.cpp
   hash.h
   hostexecutioncontext.cpp
   hostexecutioncontext.h
   hosting.cpp
   hosting.h
   ibclogger.h
   ildump.h
   ilmarshalers.cpp
   ilmarshalers.h
   ilstubcache.cpp
   ilstubcache.h
   ilstubresolver.cpp
   ilstubresolver.h
   instmethhash.cpp
   instmethhash.h
   interopconverter.cpp
   interopconverter.h
   interoputil.cpp
   interoputil.h
   ...lidoverlappedwrappers.h
   invokeutil.cpp
   invokeutil.h
   jithelpers.cpp
   jitinterface.cpp
   jitinterface.h
   jitinterfacegen.cpp
   list.cpp
   list.h
   listlock.cpp
   listlock.h
   listlock.inl
   makefile.inc
   managedmdimport.cpp
   managedmdimport.hpp
   marshaler.h
   marshalnative.cpp
   marshalnative.h
   mdaassistants.h
   mdaassistantsptr.h
   memberload.cpp
   memberload.h
   message.cpp
   message.h
   metasig.h
   method.cpp
   method.hpp
   method.inl
   methodimpl.cpp
   methodimpl.h
   methoditer.cpp
   methoditer.h
   methodtable.cpp
   methodtable.h
   methodtable.inl
   ml.cpp
   ml.h
   mlcache.cpp
   mlcache.h
   mlgen.cpp
   mlgen.h
   mlinfo.cpp
   mlinfo.h
   mlopdef.h
   mscorlib.h
   mtypes.h
   namespace.h
   nativeoverlapped.cpp
   nativeoverlapped.h
   newcompressedstack.cpp
   newcompressedstack.h
   nsenums.h
   object.cpp
   object.h
   object.inl
   objectclone.cpp
   objectclone.h
   objecthandle.cpp
   objecthandle.h
   objectlist.cpp
   objectlist.h
   olevariant.cpp
   olevariant.h
   pefile.cpp
   pefile.h
   pefile.inl
   peimage.cpp
   peimage.h
   peimage.inl
   peimagelayout.cpp
   peimagelayout.h
   peimagelayout.inl
   pendingload.cpp
   pendingload.h
   precode.cpp
   precode.h
   prestub.cpp
   proftoeeinterfaceimpl.cpp
   proftoeeinterfaceimpl.h
   reflectclasswriter.cpp
   reflectclasswriter.h
   reflectioninvocation.cpp
   reflectioninvocation.h
   remoting.cpp
   remoting.h
   rexcep.h
   runtimeexceptionkind.h
   runtimehandles.cpp
   runtimehandles.h
   rwlock.cpp
   rwlock.h
   safehandle.cpp
   security.h
   security.inl
   securityattributes.cpp
   securityattributes.h
   securityconfig.cpp
   securityconfig.h
   securitydeclarative.cpp
   securitydeclarative.h
   securitydescriptor.cpp
   securitydescriptor.h
   ...descriptorappdomain.cpp
   ...tydescriptorappdomain.h
   ...ydescriptorassembly.cpp
   ...itydescriptorassembly.h
   securityhostprotection.cpp
   securityhostprotection.h
   securityimperative.cpp
   securityimperative.h
   securitymeta.cpp
   securitymeta.h
   securitypolicy.cpp
   securitypolicy.h
   securitystackwalk.cpp
   securitystackwalk.h
   ...transparentassembly.cpp
   ...tytransparentassembly.h
   sigformat.cpp
   sigformat.h
   siginfo.cpp
   siginfo.hpp
   simplerwlock.cpp
   simplerwlock.hpp
   sourceline.cpp
   sourceline.h
   sources.dac
   sources.inc
   specialstatics.h
   spinlock.cpp
   spinlock.h
   stackbuildersink.cpp
   stackbuildersink.h
   stackcompressor.cpp
   stackcompressor.h
   stackingallocator.cpp
   stackingallocator.h
   stackprobe.h
   stackprobe.inl
   stackwalk.cpp
   stackwalk.h
   stackwalktypes.h
   stringliteralmap.cpp
   stringliteralmap.h
   strongname.cpp
   stubgen.h
   stublink.cpp
   stublink.h
   stublink.inl
   stubmgr.cpp
   stubmgr.h
   syncblk.cpp
   syncblk.h
   syncblk.inl
   syncclean.cpp
   syncclean.hpp
   synch.cpp
   synch.h
   ...zationcontextnative.cpp
   ...nizationcontextnative.h
   testhookmgr.cpp
   testhookmgr.h
   thekey.h
   threads.cpp
   threads.h
   threads.inl
   tokeniter.cpp
   tokeniter.hpp
   typectxt.cpp
   typectxt.h
   typedesc.cpp
   typedesc.h
   typedesc.inl
   typehandle.cpp
   typehandle.h
   typehandle.inl
   typehash.cpp
   typehash.h
   typekey.h
   typeparse.cpp
   typeparse.h
   typestring.cpp
   typestring.h
   umthunkhash.cpp
   umthunkhash.h
   util.cpp
   util.hpp
   validator.cpp
   vars.cpp
   vars.hpp
   verifier.cpp
   verifier.hpp
   veropcodes.hpp
   vertable.h
   virtualcallstub.cpp
   virtualcallstub.h
   vmholder.h
   win32threadpool.cpp
   win32threadpool.h
   wrappers.h

// ==++==
//
//   
//    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
//   
//    The use and distribution terms for this software are contained in the file
//    named license.txt, which can be found in the root of this distribution.
//    By using this software in any fashion, you are agreeing to be bound by the
//    terms of this license.
//   
//    You must not remove this notice, or any other, from this software.
//   
//
// ==--==
// ===========================================================================
// File: CLASS.INL
//


#ifndef _CLASS_INL_
#define _CLASS_INL_

//*******************************************************************************
inline PTR_MethodDescChunk EEClass::GetChunks()
{
    LEAF_CONTRACT;
    return m_pChunks;
}

//*******************************************************************************
inline PTR_MethodDescChunk *EEClass::GetChunksPtr()
{
    LEAF_CONTRACT;
    return &m_pChunks;
}

//*******************************************************************************
// Our more optimised case if we are an interface - we know that the vtable won't be pointing to JITd code
// EXCEPT when it's a <clinit>
inline MethodDesc *EEClass::InterfaceFindMethod(LPCUTF8 pszName,
                                                PCCOR_SIGNATURE pSignature,
                                                DWORD cSignature,
                                                Module* pModule,
                                                FM_Flags flags,
                                                const Substitution *subst)
{
    CONTRACTL {
        THROWS;
        GC_TRIGGERS;
        INJECT_FAULT(COMPlusThrowOM(););
        PRECONDITION(IsInterface());
        PRECONDITION(!IsThunking());
        MODE_ANY;
    } CONTRACTL_END;

    return FindMethod(pszName, pSignature, cSignature, pModule, NULL, flags, subst);
}

//*******************************************************************************
inline size_t MethodTableBuilder::InstanceSliceOffsetForExplicit(
    BOOL containsPointers,
    MethodTable* pParentMethodTable)
{
    LEAF_CONTRACT;
    size_t dwInstanceSliceOffset =
        (pParentMethodTable != NULL) ? pParentMethodTable->GetClass()->m_dwNumInstanceFieldBytes : 0;

    // Since this class contains pointers, align it on a 4-byte
    // (32-bit) or 8-byte (64-bit) boundary if we aren't already
    if (containsPointers && !IS_ALIGNED(dwInstanceSliceOffset, sizeof(void*)))
    {
        dwInstanceSliceOffset = ALIGN_UP(dwInstanceSliceOffset, sizeof(void*));
    }

    return dwInstanceSliceOffset;
}

//*******************************************************************************
inline MethodTableBuilder::DeclaredMethodIterator::DeclaredMethodIterator(
            MethodTableBuilder &mtb) : m_mtb(mtb), m_idx(-1)
{
    LEAF_CONTRACT;
    CONSISTENCY_CHECK(FitsInI4(m_mtb.bmtMetaData->cMethAndGaps));
}

//*******************************************************************************
inline int MethodTableBuilder::DeclaredMethodIterator::CurrentIndex()
{
    LEAF_CONTRACT;
    CONSISTENCY_CHECK_MSG(0 <= m_idx && m_idx < (int)m_mtb.NumDeclaredMethods(),
                          "Invalid iterator state.");
    return m_idx;
}

//*******************************************************************************
inline BOOL MethodTableBuilder::DeclaredMethodIterator::Next()
{
    LEAF_CONTRACT;
    if (m_idx + 1 >= (int)m_mtb.NumDeclaredMethods())
        return FALSE;
    m_idx++;
    return TRUE;
}

//*******************************************************************************
inline mdMethodDef MethodTableBuilder::DeclaredMethodIterator::Token()
{
    LEAF_CONTRACT;
    CONSISTENCY_CHECK(TypeFromToken(m_mtb.bmtMetaData->pMethods[m_idx]) == mdtMethodDef);
    return m_mtb.bmtMetaData->pMethods[m_idx];
}

//*******************************************************************************
inline DWORD MethodTableBuilder::DeclaredMethodIterator::Attrs()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodAttrs[m_idx];
}

//*******************************************************************************
inline DWORD MethodTableBuilder::DeclaredMethodIterator::RVA()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodRVA[m_idx];
}

//*******************************************************************************
inline DWORD MethodTableBuilder::DeclaredMethodIterator::ImplFlags()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodImplFlags[m_idx];
}

//*******************************************************************************
inline DWORD MethodTableBuilder::DeclaredMethodIterator::Classification()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodClassifications[m_idx];
}

//*******************************************************************************
inline LPCSTR MethodTableBuilder::DeclaredMethodIterator::Name()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pstrMethodName[m_idx];
}

//*******************************************************************************
inline PCCOR_SIGNATURE MethodTableBuilder::DeclaredMethodIterator::GetSig(DWORD *pcbSig)
{
    LEAF_CONTRACT;
    return m_mtb.bmtInternal->pInternalImport->GetSigOfMethodDef(Token(), pcbSig);
}

//*******************************************************************************
inline BYTE  MethodTableBuilder::DeclaredMethodIterator::MethodImpl()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodImpl[m_idx];
}

//*******************************************************************************
inline BOOL  MethodTableBuilder::DeclaredMethodIterator::IsMethodImpl()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodImpl[m_idx] == METHOD_IMPL;
}

//*******************************************************************************
inline BYTE  MethodTableBuilder::DeclaredMethodIterator::MethodType()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMetaData->pMethodType[m_idx];
}

//*******************************************************************************
inline MethodDesc *MethodTableBuilder::DeclaredMethodIterator::GetMethodDesc()
{
    LEAF_CONTRACT;
    return m_mtb.bmtMFDescs->ppMethodDescList[m_idx];
}

//*******************************************************************************
inline void MethodTableBuilder::DeclaredMethodIterator::SetMethodDesc(MethodDesc *pMD)
{
    LEAF_CONTRACT;
    m_mtb.bmtMFDescs->ppMethodDescList[m_idx] = pMD;
    m_mtb.bmtParent->ppParentMethodDescBuf[(m_idx * 2) + 1] = pMD;
}

//*******************************************************************************
inline class MethodDesc *MethodTableBuilder::DeclaredMethodIterator::GetParentMethodDesc()
{
    LEAF_CONTRACT;
    return m_mtb.bmtParent->ppParentMethodDescBuf[m_idx * 2];
}

//*******************************************************************************
inline void MethodTableBuilder::DeclaredMethodIterator::SetParentMethodDesc(MethodDesc *pMD)
{
    LEAF_CONTRACT;
    m_mtb.bmtParent->ppParentMethodDescBuf[m_idx * 2] = pMD;
}

//*******************************************************************************
inline MethodDesc *MethodTableBuilder::DeclaredMethodIterator::GetUnboxedMethodDesc()
{
    LEAF_CONTRACT;
    if (m_mtb.bmtMFDescs->ppUnboxMethodDescList != NULL)
    {
        return m_mtb.bmtMFDescs->ppUnboxMethodDescList[m_idx];
    }
    return NULL;
}

//*******************************************************************************
inline DWORD EEClass::SomeMethodsRequireInheritanceCheck()
{
    return (m_VMFlags & VMFLAG_METHODS_REQUIRE_INHERITANCE_CHECKS);
}

//*******************************************************************************
inline void EEClass::SetSomeMethodsRequireInheritanceCheck()
{
    m_VMFlags = m_VMFlags | VMFLAG_METHODS_REQUIRE_INHERITANCE_CHECKS;
}

//*******************************************************************************
inline Module *EEClass::GetLoaderModule()
{
    WRAPPER_CONTRACT;
    return GetMethodTable()->GetLoaderModule();
}

//*******************************************************************************
inline Module *EEClass::GetZapModule()
{
    WRAPPER_CONTRACT;
    return GetMethodTable()->GetZapModule();
}

//*******************************************************************************
inline BOOL EEClass::IsIntrospectionOnly()
{
    WRAPPER_CONTRACT;
    return GetAssembly()->IsIntrospectionOnly();
}

//*******************************************************************************
inline VOID EEClass::EnsureActive()
{
    WRAPPER_CONTRACT;
    GetModule()->EnsureActive();
}

#endif  // _CLASS_INL_