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

Unified Diff: src/objects-inl.h

Issue 767253002: Refactor Map::ConstructionCount. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix assert 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/objects.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f6f47e547606f8c7dfc89685504b8004adbe81e8..75b9918721708be26ff451d853f9294607f69ce2 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4627,24 +4627,12 @@ bool Map::is_migration_target() {
}
-void Map::set_done_inobject_slack_tracking(bool value) {
- set_bit_field3(DoneInobjectSlackTracking::update(bit_field3(), value));
+void Map::set_counter(int value) {
+ set_bit_field3(Counter::update(bit_field3(), value));
}
-bool Map::done_inobject_slack_tracking() {
- return DoneInobjectSlackTracking::decode(bit_field3());
-}
-
-
-void Map::set_construction_count(int value) {
- set_bit_field3(ConstructionCount::update(bit_field3(), value));
-}
-
-
-int Map::construction_count() {
- return ConstructionCount::decode(bit_field3());
-}
+int Map::counter() { return Counter::decode(bit_field3()); }
void Map::freeze() {
@@ -6052,7 +6040,7 @@ bool JSFunction::IsInOptimizationQueue() {
bool JSFunction::IsInobjectSlackTrackingInProgress() {
return has_initial_map() &&
- initial_map()->construction_count() != JSFunction::kNoSlackTracking;
+ initial_map()->counter() >= Map::kSlackTrackingCounterEnd;
}
« no previous file with comments | « src/objects.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698