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

Unified Diff: src/objects.h

Issue 1488023002: Fix inobject slack tracking for both subclassing and non-subclassing cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup 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/mips64/builtins-mips64.cc ('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 2480df002e32720c6579103ec95991a0c48dadd6..d155c17d05b5bd3c28b170a6ef892d49ecbbd0fb 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -777,6 +777,9 @@ STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType);
STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType);
+std::ostream& operator<<(std::ostream& os, InstanceType instance_type);
+
+
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \
V(FAST_ELEMENTS_SUB_TYPE) \
V(DICTIONARY_ELEMENTS_SUB_TYPE) \
@@ -5505,6 +5508,14 @@ class Map: public HeapObject {
static const int kRetainingCounterStart = kSlackTrackingCounterEnd - 1;
static const int kRetainingCounterEnd = 0;
+ // Starts the tracking by initializing object constructions countdown counter.
+ void StartInobjectSlackTracking();
+
+ inline bool IsInobjectSlackTrackingInProgress();
+
+ // Does the tracking step.
+ inline void InobjectSlackTrackingStep();
+
// Completes inobject slack tracking for the transition tree starting at this
// initial map.
void CompleteInobjectSlackTracking();
@@ -7255,14 +7266,9 @@ class JSFunction: public JSObject {
// counter is not zero.
static const int kGenerousAllocationCount =
Map::kSlackTrackingCounterStart - Map::kSlackTrackingCounterEnd + 1;
- inline bool IsInobjectSlackTrackingInProgress();
- // Starts the tracking.
- // Initializes object constructions countdown counter in the initial map.
- void StartInobjectSlackTracking();
-
- // Completes the tracking.
- void CompleteInobjectSlackTracking();
+ // Completes the tracking on initial map if it is active.
+ inline void CompleteInobjectSlackTrackingIfActive();
// [literals_or_bindings]: Fixed array holding either
// the materialized literals or the bindings of a bound function.
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698