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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 Heap::RecordWrite(object->address(), offset); | 735 Heap::RecordWrite(object->address(), offset); |
736 | 736 |
737 // CONDITIONAL_WRITE_BARRIER must be issued after the actual | 737 // CONDITIONAL_WRITE_BARRIER must be issued after the actual |
738 // write due to the assert validating the written value. | 738 // write due to the assert validating the written value. |
739 #define CONDITIONAL_WRITE_BARRIER(object, offset, mode) \ | 739 #define CONDITIONAL_WRITE_BARRIER(object, offset, mode) \ |
740 if (mode == UPDATE_WRITE_BARRIER) { \ | 740 if (mode == UPDATE_WRITE_BARRIER) { \ |
741 Heap::RecordWrite(object->address(), offset); \ | 741 Heap::RecordWrite(object->address(), offset); \ |
742 } else { \ | 742 } else { \ |
743 ASSERT(mode == SKIP_WRITE_BARRIER); \ | 743 ASSERT(mode == SKIP_WRITE_BARRIER); \ |
744 ASSERT(Heap::InNewSpace(object) || \ | 744 ASSERT(Heap::InNewSpace(object) || \ |
745 !Heap::InNewSpace(READ_FIELD(object, offset))); \ | 745 !Heap::InNewSpace(READ_FIELD(object, offset)) || \ |
| 746 Page::IsRSetSet(object->address(), offset)); \ |
746 } | 747 } |
747 | 748 |
748 #define READ_DOUBLE_FIELD(p, offset) \ | 749 #define READ_DOUBLE_FIELD(p, offset) \ |
749 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) | 750 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) |
750 | 751 |
751 #define WRITE_DOUBLE_FIELD(p, offset, value) \ | 752 #define WRITE_DOUBLE_FIELD(p, offset, value) \ |
752 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) | 753 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) |
753 | 754 |
754 #define READ_INT_FIELD(p, offset) \ | 755 #define READ_INT_FIELD(p, offset) \ |
755 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) | 756 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) |
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3095 #undef WRITE_INT_FIELD | 3096 #undef WRITE_INT_FIELD |
3096 #undef READ_SHORT_FIELD | 3097 #undef READ_SHORT_FIELD |
3097 #undef WRITE_SHORT_FIELD | 3098 #undef WRITE_SHORT_FIELD |
3098 #undef READ_BYTE_FIELD | 3099 #undef READ_BYTE_FIELD |
3099 #undef WRITE_BYTE_FIELD | 3100 #undef WRITE_BYTE_FIELD |
3100 | 3101 |
3101 | 3102 |
3102 } } // namespace v8::internal | 3103 } } // namespace v8::internal |
3103 | 3104 |
3104 #endif // V8_OBJECTS_INL_H_ | 3105 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |