| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 778bcb33d2e01867ea0bcb071c91b3f85b7e27bf..319e6a82dc2a401a17988e4775212b8335062f4e 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -4072,6 +4072,19 @@ 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));
|
| }
|
| @@ -4138,26 +4151,6 @@ 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));
|
| }
|
| @@ -5058,6 +5051,7 @@ 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)
|
| @@ -5182,6 +5176,28 @@ 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,
|
| @@ -5232,6 +5248,7 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
|
| BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
|
|
|
| void SharedFunctionInfo::BeforeVisitingPointers() {
|
| + if (IsInobjectSlackTrackingInProgress()) DetachInitialMap();
|
| }
|
|
|
|
|
| @@ -5456,12 +5473,6 @@ 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)));
|
|
|