OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4688 } | 4688 } |
4689 } | 4689 } |
4690 | 4690 |
4691 // Otherwise default to slow case. | 4691 // Otherwise default to slow case. |
4692 Object* obj = NormalizeElements(); | 4692 Object* obj = NormalizeElements(); |
4693 if (obj->IsFailure()) return obj; | 4693 if (obj->IsFailure()) return obj; |
4694 ASSERT(!HasFastElements()); | 4694 ASSERT(!HasFastElements()); |
4695 return SetElement(index, value); | 4695 return SetElement(index, value); |
4696 } | 4696 } |
4697 | 4697 |
4698 | |
4699 Object* JSObject::SetElement(uint32_t index, Object* value) { | 4698 Object* JSObject::SetElement(uint32_t index, Object* value) { |
4700 // Check access rights if needed. | 4699 // Check access rights if needed. |
4701 if (IsAccessCheckNeeded() && | 4700 if (IsAccessCheckNeeded() && |
4702 !Top::MayIndexedAccess(this, index, v8::ACCESS_SET)) { | 4701 !Top::MayIndexedAccess(this, index, v8::ACCESS_SET)) { |
4703 Top::ReportFailedAccessCheck(this, v8::ACCESS_SET); | 4702 Top::ReportFailedAccessCheck(this, v8::ACCESS_SET); |
4704 return value; | 4703 return value; |
4705 } | 4704 } |
4706 | 4705 |
4707 // Check for lookup interceptor | 4706 // Check for lookup interceptor |
4708 if (HasIndexedInterceptor()) { | 4707 if (HasIndexedInterceptor()) { |
(...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6443 // No break point. | 6442 // No break point. |
6444 if (break_point_objects()->IsUndefined()) return 0; | 6443 if (break_point_objects()->IsUndefined()) return 0; |
6445 // Single beak point. | 6444 // Single beak point. |
6446 if (!break_point_objects()->IsFixedArray()) return 1; | 6445 if (!break_point_objects()->IsFixedArray()) return 1; |
6447 // Multiple break points. | 6446 // Multiple break points. |
6448 return FixedArray::cast(break_point_objects())->length(); | 6447 return FixedArray::cast(break_point_objects())->length(); |
6449 } | 6448 } |
6450 | 6449 |
6451 | 6450 |
6452 } } // namespace v8::internal | 6451 } } // namespace v8::internal |
OLD | NEW |