Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 6c2b5e2c5315f1288108c99f0ff663aa28386b66..8b4807152ebaad1c6763187cf37914e532c138af 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4069,19 +4069,6 @@ bool Map::is_extensible() { |
} |
-void Map::set_attached_to_shared_function_info(bool value) { |
- if (value) { |
- set_bit_field2(bit_field2() | (1 << kAttachedToSharedFunctionInfo)); |
- } else { |
- set_bit_field2(bit_field2() & ~(1 << kAttachedToSharedFunctionInfo)); |
- } |
-} |
- |
-bool Map::attached_to_shared_function_info() { |
- return ((1 << kAttachedToSharedFunctionInfo) & bit_field2()) != 0; |
-} |
- |
- |
void Map::set_is_shared(bool value) { |
set_bit_field3(IsShared::update(bit_field3(), value)); |
} |
@@ -4148,6 +4135,26 @@ bool Map::is_migration_target() { |
} |
+void Map::set_done_inobject_slack_tracking(bool value) { |
+ set_bit_field3(DoneInobjectSlackTracking::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()); |
+} |
+ |
+ |
void Map::freeze() { |
set_bit_field3(IsFrozen::update(bit_field3(), true)); |
} |
@@ -5048,7 +5055,6 @@ ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
ACCESSORS(SharedFunctionInfo, feedback_vector, FixedArray, |
kFeedbackVectorOffset) |
-ACCESSORS(SharedFunctionInfo, initial_map, Object, kInitialMapOffset) |
ACCESSORS(SharedFunctionInfo, instance_class_name, Object, |
kInstanceClassNameOffset) |
ACCESSORS(SharedFunctionInfo, function_data, Object, kFunctionDataOffset) |
@@ -5173,28 +5179,6 @@ PSEUDO_SMI_ACCESSORS_HI(SharedFunctionInfo, |
#endif |
-int SharedFunctionInfo::construction_count() { |
- return READ_BYTE_FIELD(this, kConstructionCountOffset); |
-} |
- |
- |
-void SharedFunctionInfo::set_construction_count(int value) { |
- ASSERT(0 <= value && value < 256); |
- WRITE_BYTE_FIELD(this, kConstructionCountOffset, static_cast<byte>(value)); |
-} |
- |
- |
-BOOL_ACCESSORS(SharedFunctionInfo, |
- compiler_hints, |
- live_objects_may_exist, |
- kLiveObjectsMayExist) |
- |
- |
-bool SharedFunctionInfo::IsInobjectSlackTrackingInProgress() { |
- return initial_map() != GetHeap()->undefined_value(); |
-} |
- |
- |
BOOL_GETTER(SharedFunctionInfo, |
compiler_hints, |
optimization_disabled, |
@@ -5245,7 +5229,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) |
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) |
void SharedFunctionInfo::BeforeVisitingPointers() { |
- if (IsInobjectSlackTrackingInProgress()) DetachInitialMap(); |
} |
@@ -5470,6 +5453,12 @@ bool JSFunction::IsInOptimizationQueue() { |
} |
+bool JSFunction::IsInobjectSlackTrackingInProgress() { |
+ return has_initial_map() && |
+ initial_map()->construction_count() != JSFunction::kNoSlackTracking; |
+} |
+ |
+ |
Code* JSFunction::code() { |
return Code::cast( |
Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); |