From 8616e84e10c240791bed6f1ce7d4da3476078acc Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 4 Jan 2006 20:19:01 +0000 Subject: [PATCH] 2006-01-04 Frank Ch. Eigler PR 2057. * translate.cxx (c_unparser_assignment::visit_arrayindex): Don't take write lock around pmap accumulation. --- ChangeLog | 6 ++++++ translate.cxx | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65cca6306..892e8460f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-04 Frank Ch. Eigler + + PR 2057. + * translate.cxx (c_unparser_assignment::visit_arrayindex): Don't take + write lock around pmap accumulation. + 2006-01-04 Will Cohen * testsuite/buildok/printf.stp: Improve test coverage. diff --git a/translate.cxx b/translate.cxx index 78788de95..5bad6bdf3 100644 --- a/translate.cxx +++ b/translate.cxx @@ -2964,9 +2964,9 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) // a statistic-valued map, there's a special form we follow: // // ({ tmp0=(idx0); ... tmpN=(idxN); rvar=(rhs); lvar; res; - // lock (array); + // *no need to* lock (array); // _stp_map_add_stat (array, idx0...N, rvar); - // unlock (array); + // *no need to* unlock (array); // rvar; }) // // To simplify variable-allocation rules, we assign rvar to lvar and @@ -2982,7 +2982,7 @@ c_unparser_assignment::visit_arrayindex (arrayindex *e) mapvar mvar = parent->getmap (array->referent, e->tok); o->newline() << "c->last_stmt = " << lex_cast_qstring(*e->tok) << ";"; - varlock_w guard (*parent, mvar); + // NB: *no need to* varlock_w guard (*parent, mvar); o->newline() << mvar.add (idx, rvar) << ";"; // dummy assignments o->newline() << lvar << " = " << rvar << ";"; -- 2.43.5