| 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 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2897 } | 2897 } |
| 2898 case INTERCEPTOR: | 2898 case INTERCEPTOR: |
| 2899 return self->SetPropertyWithInterceptor(*name, | 2899 return self->SetPropertyWithInterceptor(*name, |
| 2900 *value, | 2900 *value, |
| 2901 attributes, | 2901 attributes, |
| 2902 strict_mode); | 2902 strict_mode); |
| 2903 case TRANSITION: { | 2903 case TRANSITION: { |
| 2904 Object* transition = result->GetTransitionValue(); | 2904 Object* transition = result->GetTransitionValue(); |
| 2905 | 2905 |
| 2906 if (transition->IsAccessorPair()) { | 2906 if (transition->IsAccessorPair()) { |
| 2907 if (!AccessorPair::cast(transition)->ContainsAccessor()) { | 2907 ASSERT(!AccessorPair::cast(transition)->ContainsAccessor()); |
| 2908 return self->ConvertDescriptorToField(*name, | 2908 return ConvertDescriptorToField(*name, *value, attributes); |
| 2909 *value, | |
| 2910 attributes); | |
| 2911 } | |
| 2912 return self->SetPropertyWithCallback(transition, | |
| 2913 *name, | |
| 2914 *value, | |
| 2915 result->holder(), | |
| 2916 strict_mode); | |
| 2917 } | 2909 } |
| 2918 | 2910 |
| 2919 Map* transition_map = Map::cast(transition); | 2911 Map* transition_map = Map::cast(transition); |
| 2920 DescriptorArray* descriptors = transition_map->instance_descriptors(); | 2912 DescriptorArray* descriptors = transition_map->instance_descriptors(); |
| 2921 int descriptor = descriptors->LastAdded(); | 2913 int descriptor = descriptors->LastAdded(); |
| 2922 PropertyDetails details = descriptors->GetDetails(descriptor); | 2914 PropertyDetails details = descriptors->GetDetails(descriptor); |
| 2923 ASSERT(details.type() == FIELD || details.type() == CONSTANT_FUNCTION); | 2915 ASSERT(details.type() == FIELD || details.type() == CONSTANT_FUNCTION); |
| 2924 | 2916 |
| 2925 if (details.type() == FIELD) { | 2917 if (details.type() == FIELD) { |
| 2926 if (attributes == details.attributes()) { | 2918 if (attributes == details.attributes()) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3030 attributes = result.GetAttributes(); | 3022 attributes = result.GetAttributes(); |
| 3031 return ConvertDescriptorToField(name, value, attributes); | 3023 return ConvertDescriptorToField(name, value, attributes); |
| 3032 case CALLBACKS: | 3024 case CALLBACKS: |
| 3033 case INTERCEPTOR: | 3025 case INTERCEPTOR: |
| 3034 // Override callback in clone | 3026 // Override callback in clone |
| 3035 return ConvertDescriptorToField(name, value, attributes); | 3027 return ConvertDescriptorToField(name, value, attributes); |
| 3036 case TRANSITION: { | 3028 case TRANSITION: { |
| 3037 Object* transition = result.GetTransitionValue(); | 3029 Object* transition = result.GetTransitionValue(); |
| 3038 | 3030 |
| 3039 if (transition->IsAccessorPair()) { | 3031 if (transition->IsAccessorPair()) { |
| 3032 ASSERT(!AccessorPair::cast(transition)->ContainsAccessor()); |
| 3040 return ConvertDescriptorToField(name, value, attributes); | 3033 return ConvertDescriptorToField(name, value, attributes); |
| 3041 } | 3034 } |
| 3042 | 3035 |
| 3043 Map* transition_map = Map::cast(transition); | 3036 Map* transition_map = Map::cast(transition); |
| 3044 DescriptorArray* descriptors = transition_map->instance_descriptors(); | 3037 DescriptorArray* descriptors = transition_map->instance_descriptors(); |
| 3045 int descriptor = descriptors->LastAdded(); | 3038 int descriptor = descriptors->LastAdded(); |
| 3046 PropertyDetails details = descriptors->GetDetails(descriptor); | 3039 PropertyDetails details = descriptors->GetDetails(descriptor); |
| 3047 ASSERT(details.type() == FIELD || details.type() == CONSTANT_FUNCTION); | 3040 ASSERT(details.type() == FIELD || details.type() == CONSTANT_FUNCTION); |
| 3048 | 3041 |
| 3049 if (details.type() == FIELD) { | 3042 if (details.type() == FIELD) { |
| (...skipping 10262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13312 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13305 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13313 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13306 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13314 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13307 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13315 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13308 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13316 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13309 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13317 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13310 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13318 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13311 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13319 } | 13312 } |
| 13320 | 13313 |
| 13321 } } // namespace v8::internal | 13314 } } // namespace v8::internal |
| OLD | NEW |