OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 } else { | 2086 } else { |
2087 new_map = is_internalized | 2087 new_map = is_internalized |
2088 ? heap->external_one_byte_internalized_string_map() | 2088 ? heap->external_one_byte_internalized_string_map() |
2089 : heap->external_one_byte_string_map(); | 2089 : heap->external_one_byte_string_map(); |
2090 } | 2090 } |
2091 | 2091 |
2092 // Byte size of the external String object. | 2092 // Byte size of the external String object. |
2093 int new_size = this->SizeFromMap(new_map); | 2093 int new_size = this->SizeFromMap(new_map); |
2094 heap->CreateFillerObjectAt(this->address() + new_size, size - new_size, | 2094 heap->CreateFillerObjectAt(this->address() + new_size, size - new_size, |
2095 ClearRecordedSlots::kNo); | 2095 ClearRecordedSlots::kNo); |
| 2096 heap->ClearRecordedSlotRange(this->address(), this->address() + new_size); |
2096 | 2097 |
2097 // We are storing the new map using release store after creating a filler for | 2098 // We are storing the new map using release store after creating a filler for |
2098 // the left-over space to avoid races with the sweeper thread. | 2099 // the left-over space to avoid races with the sweeper thread. |
2099 this->synchronized_set_map(new_map); | 2100 this->synchronized_set_map(new_map); |
2100 | 2101 |
2101 ExternalOneByteString* self = ExternalOneByteString::cast(this); | 2102 ExternalOneByteString* self = ExternalOneByteString::cast(this); |
2102 self->set_resource(resource); | 2103 self->set_resource(resource); |
2103 if (is_internalized) self->Hash(); // Force regeneration of the hash value. | 2104 if (is_internalized) self->Hash(); // Force regeneration of the hash value. |
2104 | 2105 |
2105 heap->AdjustLiveBytes(this, new_size - size, Heap::CONCURRENT_TO_SWEEPER); | 2106 heap->AdjustLiveBytes(this, new_size - size, Heap::CONCURRENT_TO_SWEEPER); |
(...skipping 16921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19027 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, | 19028 for (PrototypeIterator iter(isolate, this, kStartAtReceiver, |
19028 PrototypeIterator::END_AT_NULL); | 19029 PrototypeIterator::END_AT_NULL); |
19029 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { | 19030 !iter.IsAtEnd(); iter.AdvanceIgnoringProxies()) { |
19030 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; | 19031 if (iter.GetCurrent<Object>()->IsJSProxy()) return true; |
19031 } | 19032 } |
19032 return false; | 19033 return false; |
19033 } | 19034 } |
19034 | 19035 |
19035 } // namespace internal | 19036 } // namespace internal |
19036 } // namespace v8 | 19037 } // namespace v8 |
OLD | NEW |