| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 9494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9505 break; | 9505 break; |
| 9506 case DICTIONARY_ELEMENTS: { | 9506 case DICTIONARY_ELEMENTS: { |
| 9507 if (storage != NULL) { | 9507 if (storage != NULL) { |
| 9508 element_dictionary()->CopyKeysTo(storage, filter); | 9508 element_dictionary()->CopyKeysTo(storage, filter); |
| 9509 } | 9509 } |
| 9510 counter += element_dictionary()->NumberOfElementsFilterAttributes(filter); | 9510 counter += element_dictionary()->NumberOfElementsFilterAttributes(filter); |
| 9511 break; | 9511 break; |
| 9512 } | 9512 } |
| 9513 case NON_STRICT_ARGUMENTS_ELEMENTS: { | 9513 case NON_STRICT_ARGUMENTS_ELEMENTS: { |
| 9514 FixedArray* parameter_map = FixedArray::cast(elements()); | 9514 FixedArray* parameter_map = FixedArray::cast(elements()); |
| 9515 int length = parameter_map->length(); | |
| 9516 for (int i = 2; i < length; ++i) { | |
| 9517 if (!parameter_map->get(i)->IsTheHole()) { | |
| 9518 if (storage != NULL) storage->set(i - 2, Smi::FromInt(i - 2)); | |
| 9519 ++counter; | |
| 9520 } | |
| 9521 } | |
| 9522 FixedArray* arguments = FixedArray::cast(parameter_map->get(1)); | 9515 FixedArray* arguments = FixedArray::cast(parameter_map->get(1)); |
| 9523 if (arguments->IsDictionary()) { | 9516 if (arguments->IsDictionary()) { |
| 9524 NumberDictionary* dictionary = NumberDictionary::cast(arguments); | 9517 NumberDictionary* dictionary = NumberDictionary::cast(arguments); |
| 9525 if (storage != NULL) dictionary->CopyKeysTo(storage, filter); | 9518 if (storage != NULL) dictionary->CopyKeysTo(storage, filter); |
| 9526 counter += dictionary->NumberOfElementsFilterAttributes(filter); | 9519 counter += dictionary->NumberOfElementsFilterAttributes(filter); |
| 9527 } else { | 9520 } |
| 9521 int length = parameter_map->length(); |
| 9522 for (int i = 2; i < length; ++i) { |
| 9523 if (!parameter_map->get(i)->IsTheHole()) { |
| 9524 if (storage != NULL) storage->set(counter, Smi::FromInt(i - 2)); |
| 9525 ++counter; |
| 9526 } |
| 9527 } |
| 9528 if (!arguments->IsDictionary()) { |
| 9528 int length = arguments->length(); | 9529 int length = arguments->length(); |
| 9529 for (int i = 0; i < length; ++i) { | 9530 for (int i = 0; i < length; ++i) { |
| 9530 if (!arguments->get(i)->IsTheHole()) { | 9531 if (!arguments->get(i)->IsTheHole()) { |
| 9531 if (storage != NULL) storage->set(i, Smi::FromInt(i)); | 9532 if (storage != NULL) storage->set(counter, Smi::FromInt(i)); |
| 9532 ++counter; | 9533 ++counter; |
| 9533 } | 9534 } |
| 9534 } | 9535 } |
| 9535 } | 9536 } |
| 9536 break; | 9537 break; |
| 9537 } | 9538 } |
| 9538 } | 9539 } |
| 9539 | 9540 |
| 9540 if (this->IsJSValue()) { | 9541 if (this->IsJSValue()) { |
| 9541 Object* val = JSValue::cast(this)->value(); | 9542 Object* val = JSValue::cast(this)->value(); |
| (...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11658 if (break_point_objects()->IsUndefined()) return 0; | 11659 if (break_point_objects()->IsUndefined()) return 0; |
| 11659 // Single beak point. | 11660 // Single beak point. |
| 11660 if (!break_point_objects()->IsFixedArray()) return 1; | 11661 if (!break_point_objects()->IsFixedArray()) return 1; |
| 11661 // Multiple break points. | 11662 // Multiple break points. |
| 11662 return FixedArray::cast(break_point_objects())->length(); | 11663 return FixedArray::cast(break_point_objects())->length(); |
| 11663 } | 11664 } |
| 11664 #endif | 11665 #endif |
| 11665 | 11666 |
| 11666 | 11667 |
| 11667 } } // namespace v8::internal | 11668 } } // namespace v8::internal |
| OLD | NEW |