public short AddConstantNameAndType(string name, IMember type)
        {
            if (name == null || type == null) return 0;

            short nameIndex = AddConstantUtf8(name);
            short typeIndex = AddConstantUtf8(type.GetDescriptor());
            CompileConstantNameAndType nameAndTypeConst =
                ConstantPool.OfType<CompileConstantNameAndType>().FirstOrDefault(
                    x => x.NameIndex == nameIndex && x.DescriptorIndex == typeIndex);

            if (nameAndTypeConst == null)
            {
                nameAndTypeConst = new CompileConstantNameAndType
                                       {
                                           PoolIndex = nextConstantIndex++,
                                           NameIndex = nameIndex,
                                           DescriptorIndex = typeIndex
                                       };

                ConstantPool.Add(nameAndTypeConst);
            }

            return nameAndTypeConst.PoolIndex;
        }