| 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 6747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6758 } | 6758 } |
| 6759 } | 6759 } |
| 6760 } | 6760 } |
| 6761 return GetHeap()->undefined_value(); | 6761 return GetHeap()->undefined_value(); |
| 6762 } else { | 6762 } else { |
| 6763 return property_dictionary()->SlowReverseLookup(value); | 6763 return property_dictionary()->SlowReverseLookup(value); |
| 6764 } | 6764 } |
| 6765 } | 6765 } |
| 6766 | 6766 |
| 6767 | 6767 |
| 6768 Handle<Map> Map::RawCopy(Handle<Map> map, | 6768 Handle<Map> Map::RawCopy(Handle<Map> map, int instance_size) { |
| 6769 int instance_size) { | 6769 Handle<Map> result = map->GetIsolate()->factory()->NewMap( |
| 6770 CALL_HEAP_FUNCTION(map->GetIsolate(), | 6770 map->instance_type(), instance_size); |
| 6771 map->RawCopy(instance_size), | 6771 result->set_prototype(map->prototype()); |
| 6772 Map); | 6772 result->set_constructor(map->constructor()); |
| 6773 } | 6773 result->set_bit_field(map->bit_field()); |
| 6774 | 6774 result->set_bit_field2(map->bit_field2()); |
| 6775 | 6775 int new_bit_field3 = map->bit_field3(); |
| 6776 MaybeObject* Map::RawCopy(int instance_size) { | |
| 6777 Map* result; | |
| 6778 MaybeObject* maybe_result = | |
| 6779 GetHeap()->AllocateMap(instance_type(), instance_size); | |
| 6780 if (!maybe_result->To(&result)) return maybe_result; | |
| 6781 | |
| 6782 result->set_prototype(prototype()); | |
| 6783 result->set_constructor(constructor()); | |
| 6784 result->set_bit_field(bit_field()); | |
| 6785 result->set_bit_field2(bit_field2()); | |
| 6786 int new_bit_field3 = bit_field3(); | |
| 6787 new_bit_field3 = OwnsDescriptors::update(new_bit_field3, true); | 6776 new_bit_field3 = OwnsDescriptors::update(new_bit_field3, true); |
| 6788 new_bit_field3 = NumberOfOwnDescriptorsBits::update(new_bit_field3, 0); | 6777 new_bit_field3 = NumberOfOwnDescriptorsBits::update(new_bit_field3, 0); |
| 6789 new_bit_field3 = EnumLengthBits::update(new_bit_field3, | 6778 new_bit_field3 = EnumLengthBits::update(new_bit_field3, |
| 6790 kInvalidEnumCacheSentinel); | 6779 kInvalidEnumCacheSentinel); |
| 6791 new_bit_field3 = Deprecated::update(new_bit_field3, false); | 6780 new_bit_field3 = Deprecated::update(new_bit_field3, false); |
| 6792 if (!is_dictionary_map()) { | 6781 if (!map->is_dictionary_map()) { |
| 6793 new_bit_field3 = IsUnstable::update(new_bit_field3, false); | 6782 new_bit_field3 = IsUnstable::update(new_bit_field3, false); |
| 6794 } | 6783 } |
| 6795 result->set_bit_field3(new_bit_field3); | 6784 result->set_bit_field3(new_bit_field3); |
| 6796 return result; | 6785 return result; |
| 6797 } | 6786 } |
| 6798 | 6787 |
| 6799 | 6788 |
| 6800 Handle<Map> Map::CopyNormalized(Handle<Map> map, | 6789 Handle<Map> Map::CopyNormalized(Handle<Map> map, |
| 6801 PropertyNormalizationMode mode, | 6790 PropertyNormalizationMode mode, |
| 6802 NormalizedMapSharingMode sharing) { | 6791 NormalizedMapSharingMode sharing) { |
| (...skipping 9725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16528 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16517 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16529 static const char* error_messages_[] = { | 16518 static const char* error_messages_[] = { |
| 16530 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16519 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16531 }; | 16520 }; |
| 16532 #undef ERROR_MESSAGES_TEXTS | 16521 #undef ERROR_MESSAGES_TEXTS |
| 16533 return error_messages_[reason]; | 16522 return error_messages_[reason]; |
| 16534 } | 16523 } |
| 16535 | 16524 |
| 16536 | 16525 |
| 16537 } } // namespace v8::internal | 16526 } } // namespace v8::internal |
| OLD | NEW |