summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-01-18 05:12:49 +0000
committerfche <fche>2006-01-18 05:12:49 +0000
commitc01d3d3d0881a9d639f68bc54c82a5829c179d60 (patch)
treee4e6be75ce44b388aef2750ec0776c073166dfd7 /translate.cxx
parenta92fb2983e5244cd3181b54ff9ef29c2803e3ff1 (diff)
downloadsystemtap-steved-c01d3d3d0881a9d639f68bc54c82a5829c179d60.tar.gz
systemtap-steved-c01d3d3d0881a9d639f68bc54c82a5829c179d60.tar.xz
systemtap-steved-c01d3d3d0881a9d639f68bc54c82a5829c179d60.zip
2006-01-18 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (c_unparser_assignment::visit_arrayindex): Eliminate dummy assignments for "<<<" code.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/translate.cxx b/translate.cxx
index ba383682..4fb608db 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -3156,7 +3156,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e)
// There is an exception to the above form: if we're doign a <<< assigment to
// a statistic-valued map, there's a special form we follow:
//
- // ({ tmp0=(idx0); ... tmpN=(idxN); rvar=(rhs); lvar; res;
+ // ({ tmp0=(idx0); ... tmpN=(idxN); rvar=(rhs);
// *no need to* lock (array);
// _stp_map_add_stat (array, idx0...N, rvar);
// *no need to* unlock (array);
@@ -3177,9 +3177,10 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e)
o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";";
// NB: *no need to* varlock_w guard (*parent, mvar);
o->newline() << mvar.add (idx, rvar) << ";";
- // dummy assignments
- o->newline() << lvar << " = " << rvar << ";";
- o->newline() << res << " = " << rvar << ";";
+ res = rvar;
+ // no need for these dummy assignments
+ // o->newline() << lvar << " = " << rvar << ";";
+ // o->newline() << res << " = " << rvar << ";";
}
else
{ // block used to control varlock_w lifespan