| 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 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 return value; | 1683 return value; |
| 1684 } else { | 1684 } else { |
| 1685 Handle<Object> args[1] = {Handle<String>(name)}; | 1685 Handle<Object> args[1] = {Handle<String>(name)}; |
| 1686 return heap->isolate()->Throw( | 1686 return heap->isolate()->Throw( |
| 1687 *FACTORY->NewTypeError("object_not_extensible", | 1687 *FACTORY->NewTypeError("object_not_extensible", |
| 1688 HandleVector(args, 1))); | 1688 HandleVector(args, 1))); |
| 1689 } | 1689 } |
| 1690 } | 1690 } |
| 1691 if (HasFastProperties()) { | 1691 if (HasFastProperties()) { |
| 1692 // Ensure the descriptor array does not get too big. | 1692 // Ensure the descriptor array does not get too big. |
| 1693 if (map_of_this->instance_descriptors()->number_of_descriptors() < | 1693 if (map_of_this->NumberOfOwnDescriptors() < |
| 1694 DescriptorArray::kMaxNumberOfDescriptors) { | 1694 DescriptorArray::kMaxNumberOfDescriptors) { |
| 1695 if (value->IsJSFunction()) { | 1695 if (value->IsJSFunction()) { |
| 1696 return AddConstantFunctionProperty(name, | 1696 return AddConstantFunctionProperty(name, |
| 1697 JSFunction::cast(value), | 1697 JSFunction::cast(value), |
| 1698 attributes); | 1698 attributes); |
| 1699 } else { | 1699 } else { |
| 1700 return AddFastProperty(name, value, attributes, store_mode); | 1700 return AddFastProperty(name, value, attributes, store_mode); |
| 1701 } | 1701 } |
| 1702 } else { | 1702 } else { |
| 1703 // Normalize the object to prevent very large instance descriptors. | 1703 // Normalize the object to prevent very large instance descriptors. |
| (...skipping 11841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13545 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13545 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13546 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13546 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13547 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13547 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13548 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13548 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13549 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13549 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13550 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13550 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13551 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13551 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13552 } | 13552 } |
| 13553 | 13553 |
| 13554 } } // namespace v8::internal | 13554 } } // namespace v8::internal |
| OLD | NEW |