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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 StoreFromKeyed store_mode) { | 1726 StoreFromKeyed store_mode) { |
1727 ASSERT(!IsJSGlobalProxy()); | 1727 ASSERT(!IsJSGlobalProxy()); |
1728 ASSERT(DescriptorArray::kNotFound == | 1728 ASSERT(DescriptorArray::kNotFound == |
1729 map()->instance_descriptors()->Search( | 1729 map()->instance_descriptors()->Search( |
1730 name, map()->NumberOfOwnDescriptors())); | 1730 name, map()->NumberOfOwnDescriptors())); |
1731 | 1731 |
1732 // Normalize the object if the name is an actual name (not the | 1732 // Normalize the object if the name is an actual name (not the |
1733 // hidden strings) and is not a real identifier. | 1733 // hidden strings) and is not a real identifier. |
1734 // Normalize the object if it will have too many fast properties. | 1734 // Normalize the object if it will have too many fast properties. |
1735 Isolate* isolate = GetHeap()->isolate(); | 1735 Isolate* isolate = GetHeap()->isolate(); |
1736 if ((!IsIdentifier(isolate->unicode_cache(), name) | 1736 if ((!name->IsSymbol() && !IsIdentifier(isolate->unicode_cache(), name) |
1737 && name != isolate->heap()->hidden_string()) || | 1737 && name != isolate->heap()->hidden_string()) || |
1738 (map()->unused_property_fields() == 0 && | 1738 (map()->unused_property_fields() == 0 && |
1739 TooManyFastProperties(properties()->length(), store_mode))) { | 1739 TooManyFastProperties(properties()->length(), store_mode))) { |
1740 Object* obj; | 1740 Object* obj; |
1741 MaybeObject* maybe_obj = | 1741 MaybeObject* maybe_obj = |
1742 NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0); | 1742 NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0); |
1743 if (!maybe_obj->ToObject(&obj)) return maybe_obj; | 1743 if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
1744 | 1744 |
1745 return AddSlowProperty(name, value, attributes); | 1745 return AddSlowProperty(name, value, attributes); |
1746 } | 1746 } |
(...skipping 12609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14356 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14356 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
14357 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14357 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
14358 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14358 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
14359 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14359 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
14360 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14360 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
14361 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14361 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
14362 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14362 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
14363 } | 14363 } |
14364 | 14364 |
14365 } } // namespace v8::internal | 14365 } } // namespace v8::internal |
OLD | NEW |