mirror of
https://github.com/corda/corda.git
synced 2025-06-22 09:08:49 +00:00
remove ir::Type::Invalid, no longer needed for Subroutine
This commit is contained in:
committed by
Joshua Warner
parent
5ad1a14a73
commit
746c0fa0e8
@ -34,10 +34,6 @@ class Type {
|
|||||||
// Represents the lack of a return value
|
// Represents the lack of a return value
|
||||||
// TODO: remove when possible
|
// TODO: remove when possible
|
||||||
Void,
|
Void,
|
||||||
|
|
||||||
// Represents some arbitrary type that should not be accessed
|
|
||||||
// TODO: remove when possible
|
|
||||||
Invalid
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1224,7 +1224,6 @@ unsigned typeFootprint(Context* c, ir::Type type)
|
|||||||
case ir::Type::Object:
|
case ir::Type::Object:
|
||||||
case ir::Type::Address:
|
case ir::Type::Address:
|
||||||
case ir::Type::Half:
|
case ir::Type::Half:
|
||||||
case ir::Type::Invalid:
|
|
||||||
return 1;
|
return 1;
|
||||||
case ir::Type::Void:
|
case ir::Type::Void:
|
||||||
return 0;
|
return 0;
|
||||||
@ -2465,12 +2464,7 @@ class MyCompiler: public Compiler {
|
|||||||
|
|
||||||
virtual void return_(ir::Type type, ir::Value* a)
|
virtual void return_(ir::Type type, ir::Value* a)
|
||||||
{
|
{
|
||||||
// TODO: once type information is flowed properly, enable this assert.
|
assert(&c, a->type == type);
|
||||||
// Some time later, we can remove the parameter.
|
|
||||||
assert(&c,
|
|
||||||
a->type == type
|
|
||||||
// TODO Temporary hack for Subroutine test!!!
|
|
||||||
|| a->type.flavor() == ir::Type::Invalid);
|
|
||||||
appendReturn(&c, type.size(), static_cast<Value*>(a));
|
appendReturn(&c, type.size(), static_cast<Value*>(a));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1278,7 +1278,6 @@ ir::Value* loadLocal(Context* context,
|
|||||||
&& (result->type.flavor() == ir::Type::Object
|
&& (result->type.flavor() == ir::Type::Object
|
||||||
|| result->type.flavor() == ir::Type::Address))
|
|| result->type.flavor() == ir::Type::Address))
|
||||||
// TODO Temporary hack for Subroutine test!!!
|
// TODO Temporary hack for Subroutine test!!!
|
||||||
|| result->type.flavor() == ir::Type::Invalid
|
|
||||||
|| result->type.flavor() == ir::Type::Integer);
|
|| result->type.flavor() == ir::Type::Integer);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -1295,7 +1294,6 @@ void storeLocal(Context* context,
|
|||||||
&& (value->type.flavor() == ir::Type::Object
|
&& (value->type.flavor() == ir::Type::Object
|
||||||
|| value->type.flavor() == ir::Type::Address))
|
|| value->type.flavor() == ir::Type::Address))
|
||||||
// TODO Temporary hack for Subroutine test!!!
|
// TODO Temporary hack for Subroutine test!!!
|
||||||
|| value->type.flavor() == ir::Type::Invalid
|
|
||||||
|| value->type.flavor() == ir::Type::Integer);
|
|| value->type.flavor() == ir::Type::Integer);
|
||||||
context->compiler->storeLocal
|
context->compiler->storeLocal
|
||||||
(footprint, value, translateLocalIndex(context, footprint, index));
|
(footprint, value, translateLocalIndex(context, footprint, index));
|
||||||
@ -1739,10 +1737,7 @@ class Frame {
|
|||||||
|
|
||||||
void pushInt(ir::Value* o)
|
void pushInt(ir::Value* o)
|
||||||
{
|
{
|
||||||
assert(t,
|
assert(t, o->type == types.i4);
|
||||||
o->type == types.i4
|
|
||||||
// TODO Temporary hack for Subroutine test!!!
|
|
||||||
|| o->type.flavor() == ir::Type::Invalid);
|
|
||||||
pushSmall(o);
|
pushSmall(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1780,10 +1775,7 @@ class Frame {
|
|||||||
|
|
||||||
void pushLong(ir::Value* o)
|
void pushLong(ir::Value* o)
|
||||||
{
|
{
|
||||||
assert(t,
|
assert(t, o->type == types.i8);
|
||||||
o->type == types.i8
|
|
||||||
// TODO Temporary hack for Subroutine test!!!
|
|
||||||
|| o->type.flavor() == ir::Type::Invalid);
|
|
||||||
pushLarge(o);
|
pushLarge(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user