Minor cleaning for valgrind output.
This commit is contained in:
parent
5ed60a151f
commit
69b145e216
|
|
@ -519,7 +519,7 @@ const VType* ExpAttribute::probe_type(Entity*ent, Architecture*arc) const
|
|||
base_->probe_type(ent, arc);
|
||||
|
||||
if (name_ == "length") {
|
||||
return primitive_INTEGER;
|
||||
return &primitive_INTEGER;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -676,7 +676,7 @@ int ExpFunc::elaborate_expr(Entity*ent, Architecture*arc, const VType*)
|
|||
|
||||
const VType* ExpInteger::probe_type(Entity*, Architecture*) const
|
||||
{
|
||||
return primitive_INTEGER;
|
||||
return &primitive_INTEGER;
|
||||
}
|
||||
|
||||
int ExpInteger::elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype)
|
||||
|
|
@ -694,7 +694,7 @@ int ExpInteger::elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype)
|
|||
|
||||
const VType* ExpReal::probe_type(Entity*, Architecture*) const
|
||||
{
|
||||
return primitive_REAL;
|
||||
return &primitive_REAL;
|
||||
}
|
||||
|
||||
int ExpReal::elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype)
|
||||
|
|
@ -830,7 +830,7 @@ const VType* ExpRelation::probe_type(Entity*ent, Architecture*arc) const
|
|||
/* const VType*type1 = */ peek_operand1()->probe_type(ent, arc);
|
||||
/* const VType*type2 = */ peek_operand2()->probe_type(ent, arc);
|
||||
|
||||
return primitive_BOOLEAN;
|
||||
return &primitive_BOOLEAN;
|
||||
}
|
||||
|
||||
int ExpRelation::elaborate_expr(Entity*ent, Architecture*arc, const VType*ltype)
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ static void import_ieee_use_std_logic_1164(ActiveScope*res, perm_string name)
|
|||
if (all_flag || name == "std_logic_vector") {
|
||||
vector<VTypeArray::range_t> dims (1);
|
||||
res->use_name(perm_string::literal("std_logic_vector"),
|
||||
new VTypeArray(primitive_STDLOGIC, dims, false));
|
||||
new VTypeArray(&primitive_STDLOGIC, dims, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -295,12 +295,12 @@ static void import_ieee_use_numeric_bit(ActiveScope*res, perm_string name)
|
|||
if (all_flag || name == "signed") {
|
||||
vector<VTypeArray::range_t> dims (1);
|
||||
res->use_name(perm_string::literal("signed"),
|
||||
new VTypeArray(primitive_STDLOGIC, dims, true));
|
||||
new VTypeArray(&primitive_STDLOGIC, dims, true));
|
||||
}
|
||||
if (all_flag || name == "unsigned") {
|
||||
vector<VTypeArray::range_t> dims (1);
|
||||
res->use_name(perm_string::literal("unsigned"),
|
||||
new VTypeArray(primitive_BIT, dims, false));
|
||||
new VTypeArray(&primitive_BIT, dims, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -311,12 +311,12 @@ static void import_ieee_use_numeric_std(ActiveScope*res, perm_string name)
|
|||
if (all_flag || name == "signed") {
|
||||
vector<VTypeArray::range_t> dims (1);
|
||||
res->use_name(perm_string::literal("signed"),
|
||||
new VTypeArray(primitive_STDLOGIC, dims, true));
|
||||
new VTypeArray(&primitive_STDLOGIC, dims, true));
|
||||
}
|
||||
if (all_flag || name == "unsigned") {
|
||||
vector<VTypeArray::range_t> dims (1);
|
||||
res->use_name(perm_string::literal("unsigned"),
|
||||
new VTypeArray(primitive_STDLOGIC, dims, false));
|
||||
new VTypeArray(&primitive_STDLOGIC, dims, false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -343,30 +343,30 @@ static void import_ieee_use(ActiveScope*res, perm_string package, perm_string na
|
|||
}
|
||||
}
|
||||
|
||||
const VTypePrimitive* primitive_BOOLEAN = new VTypePrimitive(VTypePrimitive::BOOLEAN);
|
||||
const VTypePrimitive* primitive_BIT = new VTypePrimitive(VTypePrimitive::BIT);
|
||||
const VTypePrimitive* primitive_INTEGER = new VTypePrimitive(VTypePrimitive::INTEGER);
|
||||
const VTypePrimitive* primitive_REAL = new VTypePrimitive(VTypePrimitive::REAL);
|
||||
const VTypePrimitive* primitive_STDLOGIC = new VTypePrimitive(VTypePrimitive::STDLOGIC);
|
||||
const VTypePrimitive* primitive_CHARACTER= new VTypePrimitive(VTypePrimitive::CHARACTER);
|
||||
const VTypePrimitive primitive_BOOLEAN(VTypePrimitive::BOOLEAN);
|
||||
const VTypePrimitive primitive_BIT(VTypePrimitive::BIT);
|
||||
const VTypePrimitive primitive_INTEGER(VTypePrimitive::INTEGER);
|
||||
const VTypePrimitive primitive_REAL(VTypePrimitive::REAL);
|
||||
const VTypePrimitive primitive_STDLOGIC(VTypePrimitive::STDLOGIC);
|
||||
const VTypePrimitive primitive_CHARACTER(VTypePrimitive::CHARACTER);
|
||||
|
||||
const VTypeRange* primitive_NATURAL = new VTypeRange(primitive_INTEGER, INT64_MAX, 0);
|
||||
const VTypeRange primitive_NATURAL(&primitive_INTEGER, INT64_MAX, 0);
|
||||
|
||||
static const VTypeArray* primitive_BIT_VECTOR = new VTypeArray(primitive_BIT, vector<VTypeArray::range_t> (1));
|
||||
static const VTypeArray* primitive_BOOL_VECTOR = new VTypeArray(primitive_BOOLEAN, vector<VTypeArray::range_t> (1));
|
||||
static const VTypeArray* primitive_STRING = new VTypeArray(primitive_CHARACTER, vector<VTypeArray::range_t> (1));
|
||||
static const VTypeArray primitive_BIT_VECTOR(&primitive_BIT, vector<VTypeArray::range_t> (1));
|
||||
static const VTypeArray primitive_BOOL_VECTOR(&primitive_BOOLEAN, vector<VTypeArray::range_t> (1));
|
||||
static const VTypeArray primitive_STRING(&primitive_CHARACTER, vector<VTypeArray::range_t> (1));
|
||||
|
||||
void generate_global_types(ActiveScope*res)
|
||||
{
|
||||
res->use_name(perm_string::literal("boolean"), primitive_BOOLEAN);
|
||||
res->use_name(perm_string::literal("bit"), primitive_BIT);
|
||||
res->use_name(perm_string::literal("integer"), primitive_INTEGER);
|
||||
res->use_name(perm_string::literal("real"), primitive_REAL);
|
||||
res->use_name(perm_string::literal("std_logic"), primitive_STDLOGIC);
|
||||
res->use_name(perm_string::literal("character"), primitive_CHARACTER);
|
||||
res->use_name(perm_string::literal("bit_vector"),primitive_BOOL_VECTOR);
|
||||
res->use_name(perm_string::literal("string"), primitive_STRING);
|
||||
res->use_name(perm_string::literal("natural"), primitive_NATURAL);
|
||||
res->use_name(perm_string::literal("boolean"), &primitive_BOOLEAN);
|
||||
res->use_name(perm_string::literal("bit"), &primitive_BIT);
|
||||
res->use_name(perm_string::literal("integer"), &primitive_INTEGER);
|
||||
res->use_name(perm_string::literal("real"), &primitive_REAL);
|
||||
res->use_name(perm_string::literal("std_logic"), &primitive_STDLOGIC);
|
||||
res->use_name(perm_string::literal("character"), &primitive_CHARACTER);
|
||||
res->use_name(perm_string::literal("bit_vector"),&primitive_BOOL_VECTOR);
|
||||
res->use_name(perm_string::literal("string"), &primitive_STRING);
|
||||
res->use_name(perm_string::literal("natural"), &primitive_NATURAL);
|
||||
}
|
||||
|
||||
bool is_global_type(perm_string name)
|
||||
|
|
|
|||
|
|
@ -143,12 +143,12 @@ class VTypePrimitive : public VType {
|
|||
type_t type_;
|
||||
};
|
||||
|
||||
extern const VTypePrimitive* primitive_BOOLEAN;
|
||||
extern const VTypePrimitive* primitive_BIT;
|
||||
extern const VTypePrimitive* primitive_INTEGER;
|
||||
extern const VTypePrimitive* primitive_REAL;
|
||||
extern const VTypePrimitive* primitive_STDLOGIC;
|
||||
extern const VTypePrimitive* primitive_CHARACTER;
|
||||
extern const VTypePrimitive primitive_BOOLEAN;
|
||||
extern const VTypePrimitive primitive_BIT;
|
||||
extern const VTypePrimitive primitive_INTEGER;
|
||||
extern const VTypePrimitive primitive_REAL;
|
||||
extern const VTypePrimitive primitive_STDLOGIC;
|
||||
extern const VTypePrimitive primitive_CHARACTER;
|
||||
|
||||
/*
|
||||
* An array is a compound N-dimensional array of element type. The
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ void VType::write_type_to_stream(ostream&fd) const
|
|||
void VTypeArray::write_to_stream(ostream&fd) const
|
||||
{
|
||||
// Special case: std_logic_vector
|
||||
if (etype_ == primitive_STDLOGIC) {
|
||||
if (etype_ == &primitive_STDLOGIC) {
|
||||
fd << "std_logic_vector";
|
||||
if (! ranges_.empty() && ! ranges_[0].is_box()) {
|
||||
assert(ranges_.size() < 2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue