| 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 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) { | 2842 if (obj->IsFixedArray()) { |
| 2843 // The object might be in fast mode even though it has |
| 2844 // a getter/setter. |
| 2845 Object* ok = NormalizeProperties(CLEAR_INOBJECT_PROPERTIES, 0); |
| 2846 if (ok->IsFailure()) return ok; |
| 2847 |
| 2843 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); | 2848 PropertyDetails details = PropertyDetails(attributes, CALLBACKS); |
| 2844 SetNormalizedProperty(name, obj, details); | 2849 SetNormalizedProperty(name, obj, details); |
| 2845 return obj; | 2850 return obj; |
| 2846 } | 2851 } |
| 2847 } | 2852 } |
| 2848 } | 2853 } |
| 2849 } | 2854 } |
| 2850 | 2855 |
| 2851 // Allocate the fixed array to hold getter and setter. | 2856 // Allocate the fixed array to hold getter and setter. |
| 2852 Object* structure = Heap::AllocateFixedArray(2, TENURED); | 2857 Object* structure = Heap::AllocateFixedArray(2, TENURED); |
| (...skipping 5544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8397 if (break_point_objects()->IsUndefined()) return 0; | 8402 if (break_point_objects()->IsUndefined()) return 0; |
| 8398 // Single beak point. | 8403 // Single beak point. |
| 8399 if (!break_point_objects()->IsFixedArray()) return 1; | 8404 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8400 // Multiple break points. | 8405 // Multiple break points. |
| 8401 return FixedArray::cast(break_point_objects())->length(); | 8406 return FixedArray::cast(break_point_objects())->length(); |
| 8402 } | 8407 } |
| 8403 #endif | 8408 #endif |
| 8404 | 8409 |
| 8405 | 8410 |
| 8406 } } // namespace v8::internal | 8411 } } // namespace v8::internal |
| OLD | NEW |