| 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 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 for (; descriptor < descriptors; descriptor++) { | 2712 for (; descriptor < descriptors; descriptor++) { |
| 2713 MaybeObject* maybe_map = new_map->CopyInstallDescriptors( | 2713 MaybeObject* maybe_map = new_map->CopyInstallDescriptors( |
| 2714 descriptor, new_descriptors); | 2714 descriptor, new_descriptors); |
| 2715 if (!maybe_map->To(&new_map)) { | 2715 if (!maybe_map->To(&new_map)) { |
| 2716 // Create a handle for the last created map to ensure it stays alive | 2716 // Create a handle for the last created map to ensure it stays alive |
| 2717 // during GC. Its descriptor array is too large, but it will be | 2717 // during GC. Its descriptor array is too large, but it will be |
| 2718 // overwritten during retry anyway. | 2718 // overwritten during retry anyway. |
| 2719 Handle<Map>(new_map); | 2719 Handle<Map>(new_map); |
| 2720 return maybe_map; | 2720 return maybe_map; |
| 2721 } | 2721 } |
| 2722 new_map->set_migration_target(true); |
| 2722 } | 2723 } |
| 2723 | 2724 |
| 2724 new_map->set_owns_descriptors(true); | 2725 new_map->set_owns_descriptors(true); |
| 2725 return new_map; | 2726 return new_map; |
| 2726 } | 2727 } |
| 2727 | 2728 |
| 2728 | 2729 |
| 2729 Map* Map::CurrentMapForDeprecated() { | 2730 Map* Map::CurrentMapForDeprecated() { |
| 2730 DisallowHeapAllocation no_allocation; | 2731 DisallowHeapAllocation no_allocation; |
| 2731 if (!is_deprecated()) return this; | 2732 if (!is_deprecated()) return this; |
| (...skipping 3778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6510 Map* result; | 6511 Map* result; |
| 6511 MaybeObject* maybe_result = RawCopy(new_instance_size); | 6512 MaybeObject* maybe_result = RawCopy(new_instance_size); |
| 6512 if (!maybe_result->To(&result)) return maybe_result; | 6513 if (!maybe_result->To(&result)) return maybe_result; |
| 6513 | 6514 |
| 6514 if (mode != CLEAR_INOBJECT_PROPERTIES) { | 6515 if (mode != CLEAR_INOBJECT_PROPERTIES) { |
| 6515 result->set_inobject_properties(inobject_properties()); | 6516 result->set_inobject_properties(inobject_properties()); |
| 6516 } | 6517 } |
| 6517 | 6518 |
| 6518 result->set_is_shared(sharing == SHARED_NORMALIZED_MAP); | 6519 result->set_is_shared(sharing == SHARED_NORMALIZED_MAP); |
| 6519 result->set_dictionary_map(true); | 6520 result->set_dictionary_map(true); |
| 6521 result->set_migration_target(false); |
| 6520 | 6522 |
| 6521 #ifdef VERIFY_HEAP | 6523 #ifdef VERIFY_HEAP |
| 6522 if (FLAG_verify_heap && result->is_shared()) { | 6524 if (FLAG_verify_heap && result->is_shared()) { |
| 6523 result->SharedMapVerify(); | 6525 result->SharedMapVerify(); |
| 6524 } | 6526 } |
| 6525 #endif | 6527 #endif |
| 6526 | 6528 |
| 6527 return result; | 6529 return result; |
| 6528 } | 6530 } |
| 6529 | 6531 |
| (...skipping 9428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15958 | 15960 |
| 15959 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15961 void PropertyCell::AddDependentCode(Handle<Code> code) { |
| 15960 Handle<DependentCode> codes = DependentCode::Insert( | 15962 Handle<DependentCode> codes = DependentCode::Insert( |
| 15961 Handle<DependentCode>(dependent_code()), | 15963 Handle<DependentCode>(dependent_code()), |
| 15962 DependentCode::kPropertyCellChangedGroup, code); | 15964 DependentCode::kPropertyCellChangedGroup, code); |
| 15963 if (*codes != dependent_code()) set_dependent_code(*codes); | 15965 if (*codes != dependent_code()) set_dependent_code(*codes); |
| 15964 } | 15966 } |
| 15965 | 15967 |
| 15966 | 15968 |
| 15967 } } // namespace v8::internal | 15969 } } // namespace v8::internal |
| OLD | NEW |