| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 break; | 2832 break; |
| 2833 } | 2833 } |
| 2834 } else { | 2834 } else { |
| 2835 // Lookup the name. | 2835 // Lookup the name. |
| 2836 LookupResult result; | 2836 LookupResult result; |
| 2837 LocalLookup(name, &result); | 2837 LocalLookup(name, &result); |
| 2838 if (result.IsValid()) { | 2838 if (result.IsValid()) { |
| 2839 if (result.IsReadOnly()) return Heap::undefined_value(); | 2839 if (result.IsReadOnly()) return Heap::undefined_value(); |
| 2840 if (result.type() == CALLBACKS) { | 2840 if (result.type() == CALLBACKS) { |
| 2841 Object* obj = result.GetCallbackObject(); | 2841 Object* obj = result.GetCallbackObject(); |
| 2842 if (obj->IsFixedArray()) return obj; | 2842 if (obj->IsFixedArray()) { |
| 2843 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); |
| 2844 SetNormalizedProperty(name, obj, details); |
| 2845 return obj; |
| 2846 } |
| 2843 } | 2847 } |
| 2844 } | 2848 } |
| 2845 } | 2849 } |
| 2846 | 2850 |
| 2847 // Allocate the fixed array to hold getter and setter. | 2851 // Allocate the fixed array to hold getter and setter. |
| 2848 Object* structure = Heap::AllocateFixedArray(2, TENURED); | 2852 Object* structure = Heap::AllocateFixedArray(2, TENURED); |
| 2849 if (structure->IsFailure()) return structure; | 2853 if (structure->IsFailure()) return structure; |
| 2850 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); | 2854 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); |
| 2851 | 2855 |
| 2852 if (is_element) { | 2856 if (is_element) { |
| (...skipping 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8297 if (break_point_objects()->IsUndefined()) return 0; | 8301 if (break_point_objects()->IsUndefined()) return 0; |
| 8298 // Single beak point. | 8302 // Single beak point. |
| 8299 if (!break_point_objects()->IsFixedArray()) return 1; | 8303 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8300 // Multiple break points. | 8304 // Multiple break points. |
| 8301 return FixedArray::cast(break_point_objects())->length(); | 8305 return FixedArray::cast(break_point_objects())->length(); |
| 8302 } | 8306 } |
| 8303 #endif | 8307 #endif |
| 8304 | 8308 |
| 8305 | 8309 |
| 8306 } } // namespace v8::internal | 8310 } } // namespace v8::internal |
| OLD | NEW |