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

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

Issue 881433002: Use a WeakCell in the CallIC type vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Now with fix for Mandreel Regression. Created 5 years, 11 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/interface-descriptors.h ('k') | src/type-info.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 c51d9877f1c27c4e31fcdb02316a36c1883e2c92..f5d4a69b5123f4eddca18aac37fbb4d39b4e4238 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -138,7 +138,7 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::Copy(
static bool ClearLogic(Heap* heap, int ic_age, Code::Kind kind,
InlineCacheState state) {
if (FLAG_cleanup_code_caches_at_gc &&
- (kind == Code::CALL_IC || heap->flush_monomorphic_ics() ||
+ (heap->flush_monomorphic_ics() ||
// TODO(mvstanton): is this ic_age granular enough? it comes from
// the SharedFunctionInfo which may change on a different schedule
// than ic targets.
@@ -285,7 +285,7 @@ InlineCacheState CallICNexus::StateFromFeedback() const {
if (feedback == *vector()->MegamorphicSentinel(isolate)) {
return GENERIC;
- } else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) {
+ } else if (feedback->IsAllocationSite() || feedback->IsWeakCell()) {
return MONOMORPHIC;
}
@@ -319,7 +319,8 @@ void CallICNexus::ConfigureUninitialized() {
void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) {
- SetFeedback(*function);
+ Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function);
+ SetFeedback(*new_cell);
}
« no previous file with comments | « src/interface-descriptors.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698