Beispiel #1
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        #region IBindToMethod Members

        void IBindToMethod.BindToMethod(MethodMember method)
        {
            if (m_HomeStatementBlock == null)
            {
                m_HomeStatementBlock = method.Body;
            }

            method.RegisterLocal(this, out m_LocalIndex);
        }
Beispiel #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        internal Local(MethodMember ownerMethod)
        {
            if (StatementScope.Exists)
            {
                m_HomeStatementBlock = StatementScope.Current.StatementBlock;
            }
            else if (ownerMethod != null)
            {
                m_HomeStatementBlock = ownerMethod.Body;
            }

            if (ownerMethod != null)
            {
                ownerMethod.RegisterLocal(this, out m_LocalIndex);
            }
            else
            {
                m_LocalIndex = -1;
            }
        }