| 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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 Heap::RecordWrite(object->address(), offset); | 725 Heap::RecordWrite(object->address(), offset); |
| 726 | 726 |
| 727 // CONDITIONAL_WRITE_BARRIER must be issued after the actual | 727 // CONDITIONAL_WRITE_BARRIER must be issued after the actual |
| 728 // write due to the assert validating the written value. | 728 // write due to the assert validating the written value. |
| 729 #define CONDITIONAL_WRITE_BARRIER(object, offset, mode) \ | 729 #define CONDITIONAL_WRITE_BARRIER(object, offset, mode) \ |
| 730 if (mode == UPDATE_WRITE_BARRIER) { \ | 730 if (mode == UPDATE_WRITE_BARRIER) { \ |
| 731 Heap::RecordWrite(object->address(), offset); \ | 731 Heap::RecordWrite(object->address(), offset); \ |
| 732 } else { \ | 732 } else { \ |
| 733 ASSERT(mode == SKIP_WRITE_BARRIER); \ | 733 ASSERT(mode == SKIP_WRITE_BARRIER); \ |
| 734 ASSERT(Heap::InNewSpace(object) || \ | 734 ASSERT(Heap::InNewSpace(object) || \ |
| 735 !Heap::InNewSpace(READ_FIELD(object, offset))); \ | 735 !Heap::InNewSpace(READ_FIELD(object, offset)) || \ |
| 736 Page::IsRSetSet(object->address(), offset)); \ |
| 736 } | 737 } |
| 737 | 738 |
| 738 #define READ_DOUBLE_FIELD(p, offset) \ | 739 #define READ_DOUBLE_FIELD(p, offset) \ |
| 739 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) | 740 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) |
| 740 | 741 |
| 741 #define WRITE_DOUBLE_FIELD(p, offset, value) \ | 742 #define WRITE_DOUBLE_FIELD(p, offset, value) \ |
| 742 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) | 743 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) |
| 743 | 744 |
| 744 #define READ_INT_FIELD(p, offset) \ | 745 #define READ_INT_FIELD(p, offset) \ |
| 745 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) | 746 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) |
| (...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3085 #undef WRITE_INT_FIELD | 3086 #undef WRITE_INT_FIELD |
| 3086 #undef READ_SHORT_FIELD | 3087 #undef READ_SHORT_FIELD |
| 3087 #undef WRITE_SHORT_FIELD | 3088 #undef WRITE_SHORT_FIELD |
| 3088 #undef READ_BYTE_FIELD | 3089 #undef READ_BYTE_FIELD |
| 3089 #undef WRITE_BYTE_FIELD | 3090 #undef WRITE_BYTE_FIELD |
| 3090 | 3091 |
| 3091 | 3092 |
| 3092 } } // namespace v8::internal | 3093 } } // namespace v8::internal |
| 3093 | 3094 |
| 3094 #endif // V8_OBJECTS_INL_H_ | 3095 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |