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

Unified Diff: src/type-info.h

Issue 1020803004: Remove CanRetainOtherContext since embedded objects are now weak. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Less negations Created 5 years, 9 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
Index: src/type-info.h
diff --git a/src/type-info.h b/src/type-info.h
index 6866da2d1abb4eec433121777dec18cee63c859b..bd275e671a8c62809d6ab4c40880e481ceecb531 100644
--- a/src/type-info.h
+++ b/src/type-info.h
@@ -67,9 +67,12 @@ class TypeFeedbackOracle: public ZoneObject {
template <class T>
void CollectReceiverTypes(T* obj, SmallMapList* types);
- static bool CanRetainOtherContext(Map* map, Context* native_context);
- static bool CanRetainOtherContext(JSFunction* function,
- Context* native_context);
+ static bool IsRelevantFeedback(Map* map, Context* native_context) {
+ Object* constructor = map->GetConstructor();
+ return !constructor->IsJSFunction() ||
+ JSFunction::cast(constructor)->context()->native_context() ==
+ native_context;
+ }
Handle<JSFunction> GetCallTarget(FeedbackVectorICSlot slot);
Handle<AllocationSite> GetCallAllocationSite(FeedbackVectorICSlot slot);

Powered by Google App Engine
This is Rietveld 408576698