Chromium Code Reviews| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 653 : -1; | 653 : -1; |
| 654 ASSERT((type == -1) || | 654 ASSERT((type == -1) || |
| 655 ((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER))); | 655 ((FIRST_IC_MARKER <= type) && (type < LAST_CODE_MARKER))); |
| 656 return type; | 656 return type; |
| 657 } | 657 } |
| 658 | 658 |
| 659 | 659 |
| 660 // --------------------------------------------------------------------------- | 660 // --------------------------------------------------------------------------- |
| 661 // Allocation support | 661 // Allocation support |
| 662 | 662 |
| 663 // Allocate an object in new space. The object_size is specified | 663 // Allocate an object in new space or old pointer space. The object_size is |
| 664 // either in bytes or in words if the allocation flag SIZE_IN_WORDS | 664 // specified either in bytes or in words if the allocation flag SIZE_IN_WORDS |
| 665 // is passed. If the new space is exhausted control continues at the | 665 // is passed. If the space is exhausted control continues at the gc_required |
| 666 // gc_required label. The allocated object is returned in result. If | 666 // label. The allocated object is returned in result. If the flag |
| 667 // the flag tag_allocated_object is true the result is tagged as as | 667 // tag_allocated_object is true the result is tagged as as a heap object. |
| 668 // a heap object. All registers are clobbered also when control | 668 // All registers are clobbered also when control continues at the gc_required |
| 669 // continues at the gc_required label. | 669 // label. |
| 670 void AllocateInNewSpace(int object_size, | 670 enum AllocationTarget { |
| 671 Register result, | 671 NEW_SPACE, |
| 672 Register scratch1, | 672 OLD_POINTER_SPACE |
|
danno
2013/03/05 12:18:18
In general, is there any way to combine Allocation
Hannes Payer (out of office)
2013/03/11 17:16:31
Done.
| |
| 673 Register scratch2, | 673 }; |
| 674 Label* gc_required, | 674 |
| 675 AllocationFlags flags); | 675 void Allocate(int object_size, |
| 676 Register result, | |
| 677 Register scratch1, | |
| 678 Register scratch2, | |
| 679 Label* gc_required, | |
| 680 AllocationFlags flags, | |
| 681 AllocationTarget target); | |
| 682 | |
| 676 void AllocateInNewSpace(Register object_size, | 683 void AllocateInNewSpace(Register object_size, |
| 677 Register result, | 684 Register result, |
| 678 Register scratch1, | 685 Register scratch1, |
| 679 Register scratch2, | 686 Register scratch2, |
| 680 Label* gc_required, | 687 Label* gc_required, |
| 681 AllocationFlags flags); | 688 AllocationFlags flags); |
| 682 | 689 |
| 690 ExternalReference GetTopAddress(AllocationTarget target); | |
| 691 ExternalReference GetLimitAddress(AllocationTarget target); | |
| 692 | |
| 683 // Undo allocation in new space. The object passed and objects allocated after | 693 // Undo allocation in new space. The object passed and objects allocated after |
| 684 // it will no longer be allocated. The caller must make sure that no pointers | 694 // it will no longer be allocated. The caller must make sure that no pointers |
| 685 // are left to the object(s) no longer allocated as they would be invalid when | 695 // are left to the object(s) no longer allocated as they would be invalid when |
| 686 // allocation is undone. | 696 // allocation is undone. |
| 687 void UndoAllocationInNewSpace(Register object, Register scratch); | 697 void UndoAllocationInNewSpace(Register object, Register scratch); |
| 688 | 698 |
| 689 | 699 |
| 690 void AllocateTwoByteString(Register result, | 700 void AllocateTwoByteString(Register result, |
| 691 Register length, | 701 Register length, |
| 692 Register scratch1, | 702 Register scratch1, |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1424 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1434 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1425 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1435 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1426 #else | 1436 #else |
| 1427 #define ACCESS_MASM(masm) masm-> | 1437 #define ACCESS_MASM(masm) masm-> |
| 1428 #endif | 1438 #endif |
| 1429 | 1439 |
| 1430 | 1440 |
| 1431 } } // namespace v8::internal | 1441 } } // namespace v8::internal |
| 1432 | 1442 |
| 1433 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1443 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
| OLD | NEW |