| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 MaybeObject* maybe_failure = accessor->CopyElements( | 556 MaybeObject* maybe_failure = accessor->CopyElements( |
| 557 NULL, 0, kind, new_elms, 0, | 557 NULL, 0, kind, new_elms, 0, |
| 558 ElementsAccessor::kCopyToEndAndInitializeToHole, elms_obj); | 558 ElementsAccessor::kCopyToEndAndInitializeToHole, elms_obj); |
| 559 ASSERT(!maybe_failure->IsFailure()); | 559 ASSERT(!maybe_failure->IsFailure()); |
| 560 USE(maybe_failure); | 560 USE(maybe_failure); |
| 561 | 561 |
| 562 elms = new_elms; | 562 elms = new_elms; |
| 563 } | 563 } |
| 564 | 564 |
| 565 // Add the provided values. | 565 // Add the provided values. |
| 566 AssertNoAllocation no_gc; | 566 DisallowHeapAllocation no_gc; |
| 567 WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc); | 567 WriteBarrierMode mode = elms->GetWriteBarrierMode(no_gc); |
| 568 for (int index = 0; index < to_add; index++) { | 568 for (int index = 0; index < to_add; index++) { |
| 569 elms->set(index + len, args[index + 1], mode); | 569 elms->set(index + len, args[index + 1], mode); |
| 570 } | 570 } |
| 571 | 571 |
| 572 if (elms != array->elements()) { | 572 if (elms != array->elements()) { |
| 573 array->set_elements(elms); | 573 array->set_elements(elms); |
| 574 } | 574 } |
| 575 | 575 |
| 576 // Set the length. | 576 // Set the length. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 605 ElementsAccessor::kCopyToEndAndInitializeToHole, elms_obj); | 605 ElementsAccessor::kCopyToEndAndInitializeToHole, elms_obj); |
| 606 ASSERT(!maybe_failure->IsFailure()); | 606 ASSERT(!maybe_failure->IsFailure()); |
| 607 USE(maybe_failure); | 607 USE(maybe_failure); |
| 608 } else { | 608 } else { |
| 609 // to_add is > 0 and new_length <= elms_len, so elms_obj cannot be the | 609 // to_add is > 0 and new_length <= elms_len, so elms_obj cannot be the |
| 610 // empty_fixed_array. | 610 // empty_fixed_array. |
| 611 new_elms = FixedDoubleArray::cast(elms_obj); | 611 new_elms = FixedDoubleArray::cast(elms_obj); |
| 612 } | 612 } |
| 613 | 613 |
| 614 // Add the provided values. | 614 // Add the provided values. |
| 615 AssertNoAllocation no_gc; | 615 DisallowHeapAllocation no_gc; |
| 616 int index; | 616 int index; |
| 617 for (index = 0; index < to_add; index++) { | 617 for (index = 0; index < to_add; index++) { |
| 618 Object* arg = args[index + 1]; | 618 Object* arg = args[index + 1]; |
| 619 new_elms->set(index + len, arg->Number()); | 619 new_elms->set(index + len, arg->Number()); |
| 620 } | 620 } |
| 621 | 621 |
| 622 if (new_elms != array->elements()) { | 622 if (new_elms != array->elements()) { |
| 623 array->set_elements(new_elms); | 623 array->set_elements(new_elms); |
| 624 } | 624 } |
| 625 | 625 |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 return Handle<Code>(code_address); \ | 1883 return Handle<Code>(code_address); \ |
| 1884 } | 1884 } |
| 1885 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1885 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1886 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1886 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1887 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1887 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1888 #undef DEFINE_BUILTIN_ACCESSOR_C | 1888 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1889 #undef DEFINE_BUILTIN_ACCESSOR_A | 1889 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1890 | 1890 |
| 1891 | 1891 |
| 1892 } } // namespace v8::internal | 1892 } } // namespace v8::internal |
| OLD | NEW |