| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 7261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7272 break; | 7272 break; |
| 7273 } | 7273 } |
| 7274 case PIXEL_ELEMENTS: | 7274 case PIXEL_ELEMENTS: |
| 7275 case EXTERNAL_BYTE_ELEMENTS: | 7275 case EXTERNAL_BYTE_ELEMENTS: |
| 7276 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 7276 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 7277 case EXTERNAL_SHORT_ELEMENTS: | 7277 case EXTERNAL_SHORT_ELEMENTS: |
| 7278 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 7278 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 7279 case EXTERNAL_INT_ELEMENTS: | 7279 case EXTERNAL_INT_ELEMENTS: |
| 7280 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 7280 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 7281 case EXTERNAL_FLOAT_ELEMENTS: { | 7281 case EXTERNAL_FLOAT_ELEMENTS: { |
| 7282 MaybeObject* value = GetExternalElement(index); | 7282 MaybeObject* maybe_value = GetExternalElement(index); |
| 7283 if (!value->ToObjectUnchecked()->IsUndefined()) return value; | 7283 Object* value; |
| 7284 if (!maybe_value->ToObject(&value)) return maybe_value; |
| 7285 if (!value->IsUndefined()) return value; |
| 7284 break; | 7286 break; |
| 7285 } | 7287 } |
| 7286 case DICTIONARY_ELEMENTS: { | 7288 case DICTIONARY_ELEMENTS: { |
| 7287 NumberDictionary* dictionary = element_dictionary(); | 7289 NumberDictionary* dictionary = element_dictionary(); |
| 7288 int entry = dictionary->FindEntry(index); | 7290 int entry = dictionary->FindEntry(index); |
| 7289 if (entry != NumberDictionary::kNotFound) { | 7291 if (entry != NumberDictionary::kNotFound) { |
| 7290 Object* element = dictionary->ValueAt(entry); | 7292 Object* element = dictionary->ValueAt(entry); |
| 7291 PropertyDetails details = dictionary->DetailsAt(entry); | 7293 PropertyDetails details = dictionary->DetailsAt(entry); |
| 7292 if (details.type() == CALLBACKS) { | 7294 if (details.type() == CALLBACKS) { |
| 7293 return GetElementWithCallback(receiver, | 7295 return GetElementWithCallback(receiver, |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7369 break; | 7371 break; |
| 7370 } | 7372 } |
| 7371 case PIXEL_ELEMENTS: | 7373 case PIXEL_ELEMENTS: |
| 7372 case EXTERNAL_BYTE_ELEMENTS: | 7374 case EXTERNAL_BYTE_ELEMENTS: |
| 7373 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 7375 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
| 7374 case EXTERNAL_SHORT_ELEMENTS: | 7376 case EXTERNAL_SHORT_ELEMENTS: |
| 7375 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 7377 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
| 7376 case EXTERNAL_INT_ELEMENTS: | 7378 case EXTERNAL_INT_ELEMENTS: |
| 7377 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 7379 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
| 7378 case EXTERNAL_FLOAT_ELEMENTS: { | 7380 case EXTERNAL_FLOAT_ELEMENTS: { |
| 7379 MaybeObject* value = GetExternalElement(index); | 7381 MaybeObject* maybe_value = GetExternalElement(index); |
| 7380 if (!value->ToObjectUnchecked()->IsUndefined()) return value; | 7382 Object* value; |
| 7383 if (!maybe_value->ToObject(&value)) return maybe_value; |
| 7384 if (!value->IsUndefined()) return value; |
| 7381 break; | 7385 break; |
| 7382 } | 7386 } |
| 7383 case DICTIONARY_ELEMENTS: { | 7387 case DICTIONARY_ELEMENTS: { |
| 7384 NumberDictionary* dictionary = element_dictionary(); | 7388 NumberDictionary* dictionary = element_dictionary(); |
| 7385 int entry = dictionary->FindEntry(index); | 7389 int entry = dictionary->FindEntry(index); |
| 7386 if (entry != NumberDictionary::kNotFound) { | 7390 if (entry != NumberDictionary::kNotFound) { |
| 7387 Object* element = dictionary->ValueAt(entry); | 7391 Object* element = dictionary->ValueAt(entry); |
| 7388 PropertyDetails details = dictionary->DetailsAt(entry); | 7392 PropertyDetails details = dictionary->DetailsAt(entry); |
| 7389 if (details.type() == CALLBACKS) { | 7393 if (details.type() == CALLBACKS) { |
| 7390 return GetElementWithCallback(receiver, | 7394 return GetElementWithCallback(receiver, |
| (...skipping 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10012 if (break_point_objects()->IsUndefined()) return 0; | 10016 if (break_point_objects()->IsUndefined()) return 0; |
| 10013 // Single beak point. | 10017 // Single beak point. |
| 10014 if (!break_point_objects()->IsFixedArray()) return 1; | 10018 if (!break_point_objects()->IsFixedArray()) return 1; |
| 10015 // Multiple break points. | 10019 // Multiple break points. |
| 10016 return FixedArray::cast(break_point_objects())->length(); | 10020 return FixedArray::cast(break_point_objects())->length(); |
| 10017 } | 10021 } |
| 10018 #endif | 10022 #endif |
| 10019 | 10023 |
| 10020 | 10024 |
| 10021 } } // namespace v8::internal | 10025 } } // namespace v8::internal |
| OLD | NEW |