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

Unified Diff: src/objects.h

Issue 817223003: Remove custom weak handling of monomorphic IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/ic/ic-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index dacbd837fce1cfca04e6065b1518f6d34e5804fd..750ceb3612b5fcd9a130f4b788630a2616462395 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2690,11 +2690,7 @@ class WeakFixedArray : public FixedArray {
//
class ConstantPoolArray: public HeapObject {
public:
- enum WeakObjectState {
- NO_WEAK_OBJECTS,
- WEAK_OBJECTS_IN_OPTIMIZED_CODE,
- WEAK_OBJECTS_IN_IC
- };
+ enum WeakObjectState { NO_WEAK_OBJECTS, WEAK_OBJECTS_IN_OPTIMIZED_CODE };
enum Type {
INT64 = 0,
@@ -5138,12 +5134,7 @@ class Code: public HeapObject {
inline bool is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
inline bool is_keyed_stub();
inline bool is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
- inline bool is_weak_stub();
- inline void mark_as_weak_stub();
- inline bool is_invalidated_weak_stub();
- inline void mark_as_invalidated_weak_stub();
-
- inline bool CanBeWeakStub() {
+ inline bool embeds_maps_weakly() {
Kind k = kind();
return (k == LOAD_IC || k == STORE_IC || k == KEYED_LOAD_IC ||
k == KEYED_STORE_IC || k == COMPARE_NIL_IC) &&
@@ -5424,18 +5415,14 @@ class Code: public HeapObject {
void VerifyEmbeddedObjectsInFullCode();
#endif // DEBUG
- inline bool CanContainWeakObjects() {
- return is_optimized_code() || is_weak_stub();
- }
+ inline bool CanContainWeakObjects() { return is_optimized_code(); }
inline bool IsWeakObject(Object* object) {
return (is_optimized_code() && !is_turbofanned() &&
- IsWeakObjectInOptimizedCode(object)) ||
- (is_weak_stub() && IsWeakObjectInIC(object));
+ IsWeakObjectInOptimizedCode(object));
}
static inline bool IsWeakObjectInOptimizedCode(Object* object);
- static inline bool IsWeakObjectInIC(Object* object);
// Max loop nesting marker used to postpose OSR. We don't take loop
// nesting that is deeper than 5 levels into account.
@@ -5497,9 +5484,7 @@ class Code: public HeapObject {
static const int kHasFunctionCacheBit =
kStackSlotsFirstBit + kStackSlotsBitCount;
static const int kMarkedForDeoptimizationBit = kHasFunctionCacheBit + 1;
- static const int kWeakStubBit = kMarkedForDeoptimizationBit + 1;
- static const int kInvalidatedWeakStubBit = kWeakStubBit + 1;
- static const int kIsTurbofannedBit = kInvalidatedWeakStubBit + 1;
+ static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1;
STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
STATIC_ASSERT(kIsTurbofannedBit + 1 <= 32);
@@ -5510,9 +5495,6 @@ class Code: public HeapObject {
}; // NOLINT
class MarkedForDeoptimizationField
: public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT
- class WeakStubField : public BitField<bool, kWeakStubBit, 1> {}; // NOLINT
- class InvalidatedWeakStubField
- : public BitField<bool, kInvalidatedWeakStubBit, 1> {}; // NOLINT
class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> {
}; // NOLINT
@@ -5594,11 +5576,6 @@ class CompilationInfo;
class DependentCode: public FixedArray {
public:
enum DependencyGroup {
- // Group of IC stubs that weakly embed this map and depend on being
- // invalidated when the map is garbage collected. Dependent IC stubs form
- // a linked list. This group stores only the head of the list. This means
- // that the number_of_entries(kWeakICGroup) is 0 or 1.
- kWeakICGroup,
// Group of code that weakly embed this map and depend on being
// deoptimized when the map is garbage collected.
kWeakCodeGroup,
@@ -5659,7 +5636,6 @@ class DependentCode: public FixedArray {
bool MarkCodeForDeoptimization(Isolate* isolate,
DependentCode::DependencyGroup group);
- void AddToDependentICList(Handle<Code> stub);
// The following low-level accessors should only be used by this class
// and the mark compact collector.
@@ -6278,8 +6254,6 @@ class Map: public HeapObject {
static void AddDependentCode(Handle<Map> map,
DependentCode::DependencyGroup group,
Handle<Code> code);
- static void AddDependentIC(Handle<Map> map,
- Handle<Code> stub);
bool IsMapInArrayPrototypeChain();
« no previous file with comments | « src/ic/ic-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698