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

Unified Diff: src/transitions.h

Issue 1480873003: Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix zapping Created 5 years, 1 month 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/objects-printer.cc ('k') | src/transitions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.h
diff --git a/src/transitions.h b/src/transitions.h
index 4cac2ff3da79a1618704e3ca90228ca59aa70582..deda90ad6030786964d2753523b5351a24368df0 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -165,8 +165,11 @@ class TransitionArray: public FixedArray {
static int Capacity(Object* raw_transitions);
- // Casting.
- static inline TransitionArray* cast(Object* obj);
+ inline static TransitionArray* cast(Object* object);
+
+ // This field should be used only by GC.
+ inline void set_next_link(Object* next, WriteBarrierMode mode);
+ inline Object* next_link();
static const int kTransitionSize = 2;
static const int kProtoTransitionHeaderSize = 1;
@@ -180,6 +183,14 @@ class TransitionArray: public FixedArray {
bool print_header = true); // NOLINT
#endif
+#ifdef OBJECT_PRINT
+ void TransitionArrayPrint(std::ostream& os); // NOLINT
+#endif
+
+#ifdef VERIFY_HEAP
+ void TransitionArrayVerify();
+#endif
+
#ifdef DEBUG
bool IsSortedNoDuplicates(int valid_entries = -1);
static bool IsSortedNoDuplicates(Map* map);
@@ -199,9 +210,10 @@ class TransitionArray: public FixedArray {
private:
// Layout for full transition arrays.
- static const int kPrototypeTransitionsIndex = 0;
- static const int kTransitionLengthIndex = 1;
- static const int kFirstIndex = 2;
+ static const int kNextLinkIndex = 0;
+ static const int kPrototypeTransitionsIndex = 1;
+ static const int kTransitionLengthIndex = 2;
+ static const int kFirstIndex = 3;
// Layout of map transition entries in full transition arrays.
static const int kTransitionKey = 0;
@@ -304,6 +316,7 @@ class TransitionArray: public FixedArray {
TransitionArray* old_transitions,
Object* transitions);
#endif
+ static void ZapTransitionArray(TransitionArray* transitions);
DISALLOW_IMPLICIT_CONSTRUCTORS(TransitionArray);
};
« no previous file with comments | « src/objects-printer.cc ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698