| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2774 case CONSTANT: | 2774 case CONSTANT: |
| 2775 case CALLBACKS: | 2775 case CALLBACKS: |
| 2776 if (old_type != new_type || old_value != new_value) { | 2776 if (old_type != new_type || old_value != new_value) { |
| 2777 return MaybeHandle<Map>(); | 2777 return MaybeHandle<Map>(); |
| 2778 } | 2778 } |
| 2779 break; | 2779 break; |
| 2780 | 2780 |
| 2781 case NORMAL: | 2781 case NORMAL: |
| 2782 case HANDLER: | 2782 case HANDLER: |
| 2783 case INTERCEPTOR: | 2783 case INTERCEPTOR: |
| 2784 case NONEXISTENT: | |
| 2785 UNREACHABLE(); | 2784 UNREACHABLE(); |
| 2786 } | 2785 } |
| 2787 } | 2786 } |
| 2788 if (new_map->NumberOfOwnDescriptors() != old_nof) return MaybeHandle<Map>(); | 2787 if (new_map->NumberOfOwnDescriptors() != old_nof) return MaybeHandle<Map>(); |
| 2789 return handle(new_map); | 2788 return handle(new_map); |
| 2790 } | 2789 } |
| 2791 | 2790 |
| 2792 | 2791 |
| 2793 MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it, | 2792 MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it, |
| 2794 Handle<Object> value) { | 2793 Handle<Object> value) { |
| (...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4264 Handle<Object> value(descs->GetCallbacksObject(i), isolate); | 4263 Handle<Object> value(descs->GetCallbacksObject(i), isolate); |
| 4265 PropertyDetails d = PropertyDetails( | 4264 PropertyDetails d = PropertyDetails( |
| 4266 details.attributes(), CALLBACKS, i + 1); | 4265 details.attributes(), CALLBACKS, i + 1); |
| 4267 dictionary = NameDictionary::Add(dictionary, key, value, d); | 4266 dictionary = NameDictionary::Add(dictionary, key, value, d); |
| 4268 break; | 4267 break; |
| 4269 } | 4268 } |
| 4270 case INTERCEPTOR: | 4269 case INTERCEPTOR: |
| 4271 break; | 4270 break; |
| 4272 case HANDLER: | 4271 case HANDLER: |
| 4273 case NORMAL: | 4272 case NORMAL: |
| 4274 case NONEXISTENT: | |
| 4275 UNREACHABLE(); | 4273 UNREACHABLE(); |
| 4276 break; | 4274 break; |
| 4277 } | 4275 } |
| 4278 } | 4276 } |
| 4279 | 4277 |
| 4280 // Copy the next enumeration index from instance descriptor. | 4278 // Copy the next enumeration index from instance descriptor. |
| 4281 dictionary->SetNextEnumerationIndex(real_size + 1); | 4279 dictionary->SetNextEnumerationIndex(real_size + 1); |
| 4282 | 4280 |
| 4283 // From here on we cannot fail and we shouldn't GC anymore. | 4281 // From here on we cannot fail and we shouldn't GC anymore. |
| 4284 DisallowHeapAllocation no_allocation; | 4282 DisallowHeapAllocation no_allocation; |
| (...skipping 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6823 DCHECK(GetConstant(descriptor) != value || | 6821 DCHECK(GetConstant(descriptor) != value || |
| 6824 value->FitsRepresentation(details.representation())); | 6822 value->FitsRepresentation(details.representation())); |
| 6825 return GetConstant(descriptor) == value; | 6823 return GetConstant(descriptor) == value; |
| 6826 | 6824 |
| 6827 case CALLBACKS: | 6825 case CALLBACKS: |
| 6828 return false; | 6826 return false; |
| 6829 | 6827 |
| 6830 case NORMAL: | 6828 case NORMAL: |
| 6831 case INTERCEPTOR: | 6829 case INTERCEPTOR: |
| 6832 case HANDLER: | 6830 case HANDLER: |
| 6833 case NONEXISTENT: | |
| 6834 break; | 6831 break; |
| 6835 } | 6832 } |
| 6836 | 6833 |
| 6837 UNREACHABLE(); | 6834 UNREACHABLE(); |
| 6838 return false; | 6835 return false; |
| 6839 } | 6836 } |
| 6840 | 6837 |
| 6841 | 6838 |
| 6842 Handle<Map> Map::PrepareForDataProperty(Handle<Map> map, int descriptor, | 6839 Handle<Map> Map::PrepareForDataProperty(Handle<Map> map, int descriptor, |
| 6843 Handle<Object> value) { | 6840 Handle<Object> value) { |
| (...skipping 9713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16557 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16554 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16558 static const char* error_messages_[] = { | 16555 static const char* error_messages_[] = { |
| 16559 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16556 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16560 }; | 16557 }; |
| 16561 #undef ERROR_MESSAGES_TEXTS | 16558 #undef ERROR_MESSAGES_TEXTS |
| 16562 return error_messages_[reason]; | 16559 return error_messages_[reason]; |
| 16563 } | 16560 } |
| 16564 | 16561 |
| 16565 | 16562 |
| 16566 } } // namespace v8::internal | 16563 } } // namespace v8::internal |
| OLD | NEW |