| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1857   // Expand the properties array. | 1857   // Expand the properties array. | 
| 1858   FixedArray* old_storage = object->properties(); | 1858   FixedArray* old_storage = object->properties(); | 
| 1859   int new_unused = transition->unused_property_fields(); | 1859   int new_unused = transition->unused_property_fields(); | 
| 1860   int new_size = old_storage->length() + new_unused + 1; | 1860   int new_size = old_storage->length() + new_unused + 1; | 
| 1861   Object* result; | 1861   Object* result; | 
| 1862   MaybeObject* maybe_result = old_storage->CopySize(new_size); | 1862   MaybeObject* maybe_result = old_storage->CopySize(new_size); | 
| 1863   if (!maybe_result->ToObject(&result)) return maybe_result; | 1863   if (!maybe_result->ToObject(&result)) return maybe_result; | 
| 1864 | 1864 | 
| 1865   FixedArray* new_storage = FixedArray::cast(result); | 1865   FixedArray* new_storage = FixedArray::cast(result); | 
| 1866 | 1866 | 
| 1867   Object* to_store = value; |  | 
| 1868 |  | 
| 1869   DescriptorArray* descriptors = transition->instance_descriptors(); | 1867   DescriptorArray* descriptors = transition->instance_descriptors(); | 
| 1870   PropertyDetails details = descriptors->GetDetails(transition->LastAdded()); | 1868   PropertyDetails details = descriptors->GetDetails(transition->LastAdded()); | 
| 1871   if (details.representation().IsDouble()) { | 1869   Object* to_store; | 
| 1872     MaybeObject* maybe_storage = | 1870   MaybeObject* maybe_storage = value->AllocateNewStorageFor( | 
| 1873         isolate->heap()->AllocateHeapNumber(value->Number()); | 1871       isolate->heap(), details.representation()); | 
| 1874     if (!maybe_storage->To(&to_store)) return maybe_storage; | 1872   if (!maybe_storage->To(&to_store)) return maybe_storage; | 
| 1875   } |  | 
| 1876 | 1873 | 
| 1877   new_storage->set(old_storage->length(), to_store); | 1874   new_storage->set(old_storage->length(), to_store); | 
| 1878 | 1875 | 
| 1879   // Set the new property value and do the map transition. | 1876   // Set the new property value and do the map transition. | 
| 1880   object->set_properties(new_storage); | 1877   object->set_properties(new_storage); | 
| 1881   object->set_map(transition); | 1878   object->set_map(transition); | 
| 1882 | 1879 | 
| 1883   // Return the stored value. | 1880   // Return the stored value. | 
| 1884   return value; | 1881   return value; | 
| 1885 } | 1882 } | 
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2838 #undef ADDR | 2835 #undef ADDR | 
| 2839 }; | 2836 }; | 
| 2840 | 2837 | 
| 2841 | 2838 | 
| 2842 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2839 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 
| 2843   return IC_utilities[id]; | 2840   return IC_utilities[id]; | 
| 2844 } | 2841 } | 
| 2845 | 2842 | 
| 2846 | 2843 | 
| 2847 } }  // namespace v8::internal | 2844 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|