[interpreter] Revert due to regression reported by golem.

This reverts commit 74aad1162e to the interpreter.
Changes to the dbc simulator were already reverted.

Change-Id: I42193464fedc70738a998fd77902685707ac071e
Reviewed-on: https://dart-review.googlesource.com/c/86249
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Régis Crelier <regis@google.com>
This commit is contained in:
Régis Crelier 2018-12-05 20:18:00 +00:00 committed by commit-bot@chromium.org
parent 78db20cc8f
commit af081ddde2

View file

@ -117,6 +117,13 @@ class InterpreterHelpers {
: static_cast<intptr_t>(kSmiCid);
}
// The usage counter is actually a 'hotness' counter.
// For an instance call, both the usage counters of the caller and of the
// calle will get incremented, as well as the ICdata counter at the call site.
DART_FORCE_INLINE static void IncrementUsageCounter(RawFunction* f) {
f->ptr()->usage_counter_++;
}
DART_FORCE_INLINE static void IncrementICUsageCount(RawObject** entries,
intptr_t offset,
intptr_t args_tested) {
@ -2119,6 +2126,8 @@ SwitchDispatch:
RawObject** call_top = SP + 1;
RawICData* icdata = RAW_CAST(ICData, LOAD_CONSTANT(kidx));
InterpreterHelpers::IncrementUsageCounter(
RAW_CAST(Function, icdata->ptr()->owner_));
if (ICData::NumArgsTestedBits::decode(icdata->ptr()->state_bits_) == 1) {
if (!InstanceCall1(thread, icdata, call_base, call_top, &pc, &FP, &SP,
false /* optimized */)) {