Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: src/type-feedback-vector.cc

Issue 2019393002: VectorICs: Remove special code to increment call counts by two. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/type-feedback-vector.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index 752e6d262e06363fadd190af4beefa0442175160..05f510e865128ddf65c7d936fc8ada6eec3bdef3 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -523,7 +523,7 @@ InlineCacheState CallICNexus::StateFromFeedback() const {
int CallICNexus::ExtractCallCount() {
Object* call_count = GetFeedbackExtra();
if (call_count->IsSmi()) {
- int value = Smi::cast(call_count)->value() / 2;
+ int value = Smi::cast(call_count)->value();
return value;
}
return -1;
@@ -540,14 +540,14 @@ void CallICNexus::ConfigureMonomorphicArray() {
GetIsolate()->factory()->NewAllocationSite();
SetFeedback(*new_site);
}
- SetFeedbackExtra(Smi::FromInt(kCallCountIncrement), SKIP_WRITE_BARRIER);
+ SetFeedbackExtra(Smi::FromInt(1), SKIP_WRITE_BARRIER);
}
void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) {
Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function);
SetFeedback(*new_cell);
- SetFeedbackExtra(Smi::FromInt(kCallCountIncrement), SKIP_WRITE_BARRIER);
+ SetFeedbackExtra(Smi::FromInt(1), SKIP_WRITE_BARRIER);
}
@@ -559,8 +559,7 @@ void CallICNexus::ConfigureMegamorphic() {
void CallICNexus::ConfigureMegamorphic(int call_count) {
SetFeedback(*TypeFeedbackVector::MegamorphicSentinel(GetIsolate()),
SKIP_WRITE_BARRIER);
- SetFeedbackExtra(Smi::FromInt(call_count * kCallCountIncrement),
- SKIP_WRITE_BARRIER);
+ SetFeedbackExtra(Smi::FromInt(call_count), SKIP_WRITE_BARRIER);
}
« no previous file with comments | « src/type-feedback-vector.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698