зеркало из https://github.com/mono/ikvm-fork.git
Improved handling of missing types (from missing assemblies in ikvmc).
This commit is contained in:
Родитель
86c89421e9
Коммит
2ba0163cdb
|
@ -389,7 +389,11 @@ sealed class InstructionState
|
|||
st2.Push(t2);
|
||||
t2 = t2.BaseTypeWrapper;
|
||||
}
|
||||
TypeWrapper type = null;
|
||||
if(HasMissingBaseType(st1) || HasMissingBaseType(st2))
|
||||
{
|
||||
return VerifierTypeWrapper.Unloadable;
|
||||
}
|
||||
TypeWrapper type = CoreClasses.java.lang.Object.Wrapper;
|
||||
for(;;)
|
||||
{
|
||||
t1 = st1.Count > 0 ? st1.Pop() : null;
|
||||
|
@ -402,6 +406,19 @@ sealed class InstructionState
|
|||
}
|
||||
}
|
||||
|
||||
private static bool HasMissingBaseType(Stack<TypeWrapper> st)
|
||||
{
|
||||
#if STATIC_COMPILER
|
||||
if (st.Pop().IsUnloadable)
|
||||
{
|
||||
// we have a missing type in base class hierarchy
|
||||
StaticCompiler.IssueMissingTypeMessage(st.Pop().TypeAsBaseType.BaseType);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
private void SetLocal1(int index, TypeWrapper type)
|
||||
{
|
||||
try
|
||||
|
|
Загрузка…
Ссылка в новой задаче