| Index: src/variables.cc
|
| diff --git a/src/variables.cc b/src/variables.cc
|
| index 3bcd48a8b28d9956f43cd8721f85d86afd3e9255..d7c25320bcc1f9da6d1df3dbc00461f78948ae1d 100644
|
| --- a/src/variables.cc
|
| +++ b/src/variables.cc
|
| @@ -35,57 +35,6 @@ namespace v8 {
|
| namespace internal {
|
|
|
| // ----------------------------------------------------------------------------
|
| -// Implementation UseCount.
|
| -
|
| -UseCount::UseCount()
|
| - : nreads_(0),
|
| - nwrites_(0) {
|
| -}
|
| -
|
| -
|
| -void UseCount::RecordRead(int weight) {
|
| - ASSERT(weight > 0);
|
| - nreads_ += weight;
|
| - // We must have a positive nreads_ here. Handle
|
| - // any kind of overflow by setting nreads_ to
|
| - // some large-ish value.
|
| - if (nreads_ <= 0) nreads_ = 1000000;
|
| - ASSERT(is_read() & is_used());
|
| -}
|
| -
|
| -
|
| -void UseCount::RecordWrite(int weight) {
|
| - ASSERT(weight > 0);
|
| - nwrites_ += weight;
|
| - // We must have a positive nwrites_ here. Handle
|
| - // any kind of overflow by setting nwrites_ to
|
| - // some large-ish value.
|
| - if (nwrites_ <= 0) nwrites_ = 1000000;
|
| - ASSERT(is_written() && is_used());
|
| -}
|
| -
|
| -
|
| -void UseCount::RecordAccess(int weight) {
|
| - RecordRead(weight);
|
| - RecordWrite(weight);
|
| -}
|
| -
|
| -
|
| -void UseCount::RecordUses(UseCount* uses) {
|
| - if (uses->nreads() > 0) RecordRead(uses->nreads());
|
| - if (uses->nwrites() > 0) RecordWrite(uses->nwrites());
|
| -}
|
| -
|
| -
|
| -#ifdef DEBUG
|
| -void UseCount::Print() {
|
| - // PrintF("r = %d, w = %d", nreads_, nwrites_);
|
| - PrintF("%du = %dr + %dw", nuses(), nreads(), nwrites());
|
| -}
|
| -#endif
|
| -
|
| -
|
| -// ----------------------------------------------------------------------------
|
| // Implementation StaticType.
|
|
|
|
|
| @@ -148,6 +97,7 @@ Variable::Variable(Scope* scope,
|
| kind_(kind),
|
| local_if_not_shadowed_(NULL),
|
| is_accessed_from_inner_scope_(false),
|
| + is_used_(false),
|
| rewrite_(NULL) {
|
| // names must be canonicalized for fast equality checks
|
| ASSERT(name->IsSymbol());
|
|
|