summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2006-11-01 18:21:04 +0000
committerdsmith <dsmith>2006-11-01 18:21:04 +0000
commited238a160aebfe1c3241c25eb3162c02ea8c0b6f (patch)
tree611c868bd083f1f40494a29425a9dce9eeef7b8c /translate.cxx
parentb20febf337c78ba5793a72fccb0acaef6273239d (diff)
downloadsystemtap-steved-ed238a160aebfe1c3241c25eb3162c02ea8c0b6f.tar.gz
systemtap-steved-ed238a160aebfe1c3241c25eb3162c02ea8c0b6f.tar.xz
systemtap-steved-ed238a160aebfe1c3241c25eb3162c02ea8c0b6f.zip
2006-11-01 <dsmith@redhat.com>
* translate.cxx (delete_statement_operand_visitor::visit_symbol): Added referent assert. (delete_statement_operand_tmp_visitor::visit_arrayindex): Ditto. (c_tmpcounter::visit_array_in): Ditto. (c_unparser::visit_symbol): Ditto. (c_unparser_assignment::visit_symbol): Ditto. (c_unparser::load_map_indices): Ditto. (c_tmpcounter::visit_arrayindex): Ditto. (c_tmpcounter_assignment::visit_arrayindex): Ditto. (c_tmpcounter::visit_functioncall): Ditto. (c_unparser::visit_functioncall): Ditto.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx
index f762bdf7..55e701fe 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -2376,6 +2376,7 @@ struct delete_statement_operand_visitor:
void
delete_statement_operand_visitor::visit_symbol (symbol* e)
{
+ assert (e->referent != 0);
if (e->referent->arity > 0)
{
mapvar mvar = parent->getmap(e->referent, e->tok);
@@ -2419,6 +2420,7 @@ delete_statement_operand_tmp_visitor::visit_arrayindex (arrayindex* e)
if (array)
{
+ assert (array->referent != 0);
vardecl* r = array->referent;
// One temporary per index dimension.
@@ -2652,6 +2654,7 @@ c_tmpcounter::visit_array_in (array_in* e)
if (array)
{
+ assert (array->referent != 0);
vardecl* r = array->referent;
// One temporary per index dimension.
@@ -2887,6 +2890,7 @@ c_unparser::visit_post_crement (post_crement* e)
void
c_unparser::visit_symbol (symbol* e)
{
+ assert (e->referent != 0);
vardecl* r = e->referent;
if (r->index_types.size() != 0)
@@ -2959,6 +2963,7 @@ c_unparser_assignment::visit_symbol (symbol *e)
{
stmt_expr block(*parent);
+ assert (e->referent != 0);
if (e->referent->index_types.size() != 0)
throw semantic_error ("unexpected reference to array", e->tok);
@@ -2995,6 +3000,7 @@ c_unparser::load_map_indices(arrayindex *e,
{
idx.clear();
+ assert (array->referent != 0);
vardecl* r = array->referent;
if (r->index_types.size() == 0 ||
@@ -3073,6 +3079,7 @@ c_tmpcounter::visit_arrayindex (arrayindex *e)
if (array)
{
+ assert (array->referent != 0);
vardecl* r = array->referent;
// One temporary per index dimension.
@@ -3259,7 +3266,7 @@ c_tmpcounter_assignment::visit_arrayindex (arrayindex *e)
if (array)
{
-
+ assert (array->referent != 0);
vardecl* r = array->referent;
// One temporary per index dimension.
@@ -3384,6 +3391,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e)
void
c_tmpcounter::visit_functioncall (functioncall *e)
{
+ assert (e->referent != 0);
functiondecl* r = e->referent;
// one temporary per argument
for (unsigned i=0; i<r->formal_args.size(); i++)
@@ -3398,6 +3406,7 @@ c_tmpcounter::visit_functioncall (functioncall *e)
void
c_unparser::visit_functioncall (functioncall* e)
{
+ assert (e->referent != 0);
functiondecl* r = e->referent;
if (r->formal_args.size() != e->args.size())