| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index b5fdf4902639d1a5db8ca9643d18478ea543caba..01d35a7d2da1d90dd6542b2aab46e36984633d14 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -455,12 +455,11 @@ class HEnvironment: public ZoneObject {
|
| // by 1 (receiver is parameter index -1 but environment index 0).
|
| // Stack-allocated local indices are shifted by the number of parameters.
|
| int IndexFor(Variable* variable) const {
|
| - Slot* slot = variable->AsSlot();
|
| - ASSERT(slot != NULL && slot->IsStackAllocated());
|
| - int shift = (slot->type() == Slot::PARAMETER)
|
| + ASSERT(variable->IsStackAllocated());
|
| + int shift = variable->IsParameter()
|
| ? 1
|
| : parameter_count_ + specials_count_;
|
| - return slot->index() + shift;
|
| + return variable->index() + shift;
|
| }
|
|
|
| Handle<JSFunction> closure_;
|
|
|