| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index 9dd825a6f96b96065806e9b8f489dd96364776a5..624d462323a9574c278af3e01a240976509239ac 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -102,7 +102,7 @@ void VariableProxy::SetFirstFeedbackICSlot(FeedbackVectorICSlot slot,
|
| ICSlotCache* cache) {
|
| variable_feedback_slot_ = slot;
|
| if (var()->IsUnallocated()) {
|
| - cache->Add(VariableICSlotPair(var(), slot));
|
| + cache->Put(var(), slot);
|
| }
|
| }
|
|
|
| @@ -113,12 +113,11 @@ FeedbackVectorRequirements VariableProxy::ComputeFeedbackRequirements(
|
| // VariableProxies that point to the same Variable within a function can
|
| // make their loads from the same IC slot.
|
| if (var()->IsUnallocated()) {
|
| - for (int i = 0; i < cache->length(); i++) {
|
| - VariableICSlotPair& pair = cache->at(i);
|
| - if (pair.variable() == var()) {
|
| - variable_feedback_slot_ = pair.slot();
|
| - return FeedbackVectorRequirements(0, 0);
|
| - }
|
| + ZoneHashMap::Entry* entry = cache->Get(var());
|
| + if (entry != NULL) {
|
| + variable_feedback_slot_ = FeedbackVectorICSlot(
|
| + static_cast<int>(reinterpret_cast<intptr_t>(entry->value)));
|
| + return FeedbackVectorRequirements(0, 0);
|
| }
|
| }
|
| return FeedbackVectorRequirements(0, 1);
|
|
|