OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 if (is_deprecated()) return; | 2479 if (is_deprecated()) return; |
2480 if (HasTransitionArray()) { | 2480 if (HasTransitionArray()) { |
2481 TransitionArray* transitions = this->transitions(); | 2481 TransitionArray* transitions = this->transitions(); |
2482 for (int i = 0; i < transitions->number_of_transitions(); i++) { | 2482 for (int i = 0; i < transitions->number_of_transitions(); i++) { |
2483 transitions->GetTarget(i)->DeprecateTransitionTree(); | 2483 transitions->GetTarget(i)->DeprecateTransitionTree(); |
2484 } | 2484 } |
2485 } | 2485 } |
2486 deprecate(); | 2486 deprecate(); |
2487 dependent_code()->DeoptimizeDependentCodeGroup( | 2487 dependent_code()->DeoptimizeDependentCodeGroup( |
2488 GetIsolate(), DependentCode::kTransitionGroup); | 2488 GetIsolate(), DependentCode::kTransitionGroup); |
2489 dependent_code()->DeoptimizeDependentCodeGroup( | 2489 NotifyLeafMapLayoutChange(); |
2490 GetIsolate(), DependentCode::kPrototypeCheckGroup); | |
2491 } | 2490 } |
2492 | 2491 |
2493 | 2492 |
2494 // Invalidates a transition target at |key|, and installs |new_descriptors| over | 2493 // Invalidates a transition target at |key|, and installs |new_descriptors| over |
2495 // the current instance_descriptors to ensure proper sharing of descriptor | 2494 // the current instance_descriptors to ensure proper sharing of descriptor |
2496 // arrays. | 2495 // arrays. |
2497 void Map::DeprecateTarget(Name* key, DescriptorArray* new_descriptors) { | 2496 void Map::DeprecateTarget(Name* key, DescriptorArray* new_descriptors) { |
2498 if (HasTransitionArray()) { | 2497 if (HasTransitionArray()) { |
2499 TransitionArray* transitions = this->transitions(); | 2498 TransitionArray* transitions = this->transitions(); |
2500 int transition = transitions->Search(key); | 2499 int transition = transitions->Search(key); |
(...skipping 3987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6488 | 6487 |
6489 result->set_prototype(prototype()); | 6488 result->set_prototype(prototype()); |
6490 result->set_constructor(constructor()); | 6489 result->set_constructor(constructor()); |
6491 result->set_bit_field(bit_field()); | 6490 result->set_bit_field(bit_field()); |
6492 result->set_bit_field2(bit_field2()); | 6491 result->set_bit_field2(bit_field2()); |
6493 int new_bit_field3 = bit_field3(); | 6492 int new_bit_field3 = bit_field3(); |
6494 new_bit_field3 = OwnsDescriptors::update(new_bit_field3, true); | 6493 new_bit_field3 = OwnsDescriptors::update(new_bit_field3, true); |
6495 new_bit_field3 = NumberOfOwnDescriptorsBits::update(new_bit_field3, 0); | 6494 new_bit_field3 = NumberOfOwnDescriptorsBits::update(new_bit_field3, 0); |
6496 new_bit_field3 = EnumLengthBits::update(new_bit_field3, kInvalidEnumCache); | 6495 new_bit_field3 = EnumLengthBits::update(new_bit_field3, kInvalidEnumCache); |
6497 new_bit_field3 = Deprecated::update(new_bit_field3, false); | 6496 new_bit_field3 = Deprecated::update(new_bit_field3, false); |
| 6497 new_bit_field3 = IsUnstable::update(new_bit_field3, false); |
6498 result->set_bit_field3(new_bit_field3); | 6498 result->set_bit_field3(new_bit_field3); |
6499 return result; | 6499 return result; |
6500 } | 6500 } |
6501 | 6501 |
6502 | 6502 |
6503 MaybeObject* Map::CopyNormalized(PropertyNormalizationMode mode, | 6503 MaybeObject* Map::CopyNormalized(PropertyNormalizationMode mode, |
6504 NormalizedMapSharingMode sharing) { | 6504 NormalizedMapSharingMode sharing) { |
6505 int new_instance_size = instance_size(); | 6505 int new_instance_size = instance_size(); |
6506 if (mode == CLEAR_INOBJECT_PROPERTIES) { | 6506 if (mode == CLEAR_INOBJECT_PROPERTIES) { |
6507 new_instance_size -= inobject_properties() * kPointerSize; | 6507 new_instance_size -= inobject_properties() * kPointerSize; |
(...skipping 9464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15972 | 15972 |
15973 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15973 void PropertyCell::AddDependentCode(Handle<Code> code) { |
15974 Handle<DependentCode> codes = DependentCode::Insert( | 15974 Handle<DependentCode> codes = DependentCode::Insert( |
15975 Handle<DependentCode>(dependent_code()), | 15975 Handle<DependentCode>(dependent_code()), |
15976 DependentCode::kPropertyCellChangedGroup, code); | 15976 DependentCode::kPropertyCellChangedGroup, code); |
15977 if (*codes != dependent_code()) set_dependent_code(*codes); | 15977 if (*codes != dependent_code()) set_dependent_code(*codes); |
15978 } | 15978 } |
15979 | 15979 |
15980 | 15980 |
15981 } } // namespace v8::internal | 15981 } } // namespace v8::internal |
OLD | NEW |