| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 811 |
| 812 if (item_count < actual_delete_count) { | 812 if (item_count < actual_delete_count) { |
| 813 // Shrink the array. | 813 // Shrink the array. |
| 814 const bool trim_array = !Heap::lo_space()->Contains(elms) && | 814 const bool trim_array = !Heap::lo_space()->Contains(elms) && |
| 815 ((actual_start + item_count) < | 815 ((actual_start + item_count) < |
| 816 (len - actual_delete_count - actual_start)); | 816 (len - actual_delete_count - actual_start)); |
| 817 if (trim_array) { | 817 if (trim_array) { |
| 818 const int delta = actual_delete_count - item_count; | 818 const int delta = actual_delete_count - item_count; |
| 819 | 819 |
| 820 if (actual_start > 0) { | 820 if (actual_start > 0) { |
| 821 Object** start = elms->data_start(); | 821 AssertNoAllocation no_gc; |
| 822 memmove(start + delta, start, actual_start * kPointerSize); | 822 MoveElements(&no_gc, elms, delta, elms, 0, actual_start); |
| 823 } | 823 } |
| 824 | 824 |
| 825 elms = LeftTrimFixedArray(elms, delta); | 825 elms = LeftTrimFixedArray(elms, delta); |
| 826 array->set_elements(elms, SKIP_WRITE_BARRIER); | 826 array->set_elements(elms, SKIP_WRITE_BARRIER); |
| 827 } else { | 827 } else { |
| 828 AssertNoAllocation no_gc; | 828 AssertNoAllocation no_gc; |
| 829 MoveElements(&no_gc, | 829 MoveElements(&no_gc, |
| 830 elms, actual_start + item_count, | 830 elms, actual_start + item_count, |
| 831 elms, actual_start + actual_delete_count, | 831 elms, actual_start + actual_delete_count, |
| 832 (len - actual_delete_count - actual_start)); | 832 (len - actual_delete_count - actual_start)); |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 if (entry->contains(pc)) { | 1577 if (entry->contains(pc)) { |
| 1578 return names_[i]; | 1578 return names_[i]; |
| 1579 } | 1579 } |
| 1580 } | 1580 } |
| 1581 } | 1581 } |
| 1582 return NULL; | 1582 return NULL; |
| 1583 } | 1583 } |
| 1584 | 1584 |
| 1585 | 1585 |
| 1586 } } // namespace v8::internal | 1586 } } // namespace v8::internal |
| OLD | NEW |