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

Unified Diff: src/transitions.h

Issue 1500623002: Reland of Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/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 @@
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;
@@ -178,6 +181,14 @@
// Print all the transitions.
static void PrintTransitions(std::ostream& os, Object* transitions,
bool print_header = true); // NOLINT
+#endif
+
+#ifdef OBJECT_PRINT
+ void TransitionArrayPrint(std::ostream& os); // NOLINT
+#endif
+
+#ifdef VERIFY_HEAP
+ void TransitionArrayVerify();
#endif
#ifdef DEBUG
@@ -199,9 +210,10 @@
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 @@
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