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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 int len = Smi::cast(array->length())->value(); | 488 int len = Smi::cast(array->length())->value(); |
489 if (len == 0) return Heap::undefined_value(); | 489 if (len == 0) return Heap::undefined_value(); |
490 | 490 |
491 // Get first element | 491 // Get first element |
492 Object* first = elms->get(0); | 492 Object* first = elms->get(0); |
493 if (first->IsTheHole()) { | 493 if (first->IsTheHole()) { |
494 first = Heap::undefined_value(); | 494 first = Heap::undefined_value(); |
495 } | 495 } |
496 | 496 |
497 if (Heap::new_space()->Contains(elms)) { | 497 if (Heap::new_space()->Contains(elms)) { |
498 array->set_elements(LeftTrimFixedArray(elms)); | 498 // As elms still in the same space they used to be (new space), |
| 499 // there is no need to update remembered set. |
| 500 array->set_elements(LeftTrimFixedArray(elms), SKIP_WRITE_BARRIER); |
499 } else { | 501 } else { |
500 // Shift the elements. | 502 // Shift the elements. |
501 AssertNoAllocation no_gc; | 503 AssertNoAllocation no_gc; |
502 MoveElements(&no_gc, elms, 0, elms, 1, len - 1); | 504 MoveElements(&no_gc, elms, 0, elms, 1, len - 1); |
503 elms->set(len - 1, Heap::the_hole_value()); | 505 elms->set(len - 1, Heap::the_hole_value()); |
504 } | 506 } |
505 | 507 |
506 // Set the length. | 508 // Set the length. |
507 array->set_length(Smi::FromInt(len - 1)); | 509 array->set_length(Smi::FromInt(len - 1)); |
508 | 510 |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1468 if (entry->contains(pc)) { | 1470 if (entry->contains(pc)) { |
1469 return names_[i]; | 1471 return names_[i]; |
1470 } | 1472 } |
1471 } | 1473 } |
1472 } | 1474 } |
1473 return NULL; | 1475 return NULL; |
1474 } | 1476 } |
1475 | 1477 |
1476 | 1478 |
1477 } } // namespace v8::internal | 1479 } } // namespace v8::internal |
OLD | NEW |