Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 824 (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag) | 824 (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag) |
| 825 | 825 |
| 826 #define READ_FIELD(p, offset) \ | 826 #define READ_FIELD(p, offset) \ |
| 827 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset))) | 827 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset))) |
| 828 | 828 |
| 829 #define WRITE_FIELD(p, offset, value) \ | 829 #define WRITE_FIELD(p, offset, value) \ |
| 830 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value) | 830 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value) |
| 831 | 831 |
| 832 #define WRITE_BARRIER(object, offset, value) \ | 832 #define WRITE_BARRIER(object, offset, value) \ |
| 833 IncrementalMarking::RecordWrite(object, value); \ | 833 IncrementalMarking::RecordWrite(object, value); \ |
| 834 Heap::RecordWrite(object->address(), offset); | 834 if (Heap::InNewSpace(value)) \ |
|
Vyacheslav Egorov (Chromium)
2011/03/28 15:13:19
curly brackets around if's body.
Erik Corry
2011/03/28 15:56:07
Done.
| |
| 835 Heap::RecordWrite(object->address(), offset); | |
| 835 | 836 |
| 836 #define READ_DOUBLE_FIELD(p, offset) \ | 837 #define READ_DOUBLE_FIELD(p, offset) \ |
| 837 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) | 838 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) |
| 838 | 839 |
| 839 #define WRITE_DOUBLE_FIELD(p, offset, value) \ | 840 #define WRITE_DOUBLE_FIELD(p, offset, value) \ |
| 840 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) | 841 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) |
| 841 | 842 |
| 842 #define READ_INT_FIELD(p, offset) \ | 843 #define READ_INT_FIELD(p, offset) \ |
| 843 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) | 844 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) |
| 844 | 845 |
| (...skipping 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3827 #undef WRITE_INT_FIELD | 3828 #undef WRITE_INT_FIELD |
| 3828 #undef READ_SHORT_FIELD | 3829 #undef READ_SHORT_FIELD |
| 3829 #undef WRITE_SHORT_FIELD | 3830 #undef WRITE_SHORT_FIELD |
| 3830 #undef READ_BYTE_FIELD | 3831 #undef READ_BYTE_FIELD |
| 3831 #undef WRITE_BYTE_FIELD | 3832 #undef WRITE_BYTE_FIELD |
| 3832 | 3833 |
| 3833 | 3834 |
| 3834 } } // namespace v8::internal | 3835 } } // namespace v8::internal |
| 3835 | 3836 |
| 3836 #endif // V8_OBJECTS_INL_H_ | 3837 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |