| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 | 77 |
| 78 #define ACCESSORS(holder, name, type, offset) \ | 78 #define ACCESSORS(holder, name, type, offset) \ |
| 79 type* holder::name() { return type::cast(READ_FIELD(this, offset)); } \ | 79 type* holder::name() { return type::cast(READ_FIELD(this, offset)); } \ |
| 80 void holder::set_##name(type* value, WriteBarrierMode mode) { \ | 80 void holder::set_##name(type* value, WriteBarrierMode mode) { \ |
| 81 WRITE_FIELD(this, offset, value); \ | 81 WRITE_FIELD(this, offset, value); \ |
| 82 CONDITIONAL_WRITE_BARRIER(this, offset, mode); \ | 82 CONDITIONAL_WRITE_BARRIER(this, offset, mode); \ |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 | |
| 87 #define SMI_ACCESSORS(holder, name, offset) \ | 86 #define SMI_ACCESSORS(holder, name, offset) \ |
| 88 int holder::name() { \ | 87 int holder::name() { \ |
| 89 Object* value = READ_FIELD(this, offset); \ | 88 Object* value = READ_FIELD(this, offset); \ |
| 90 return Smi::cast(value)->value(); \ | 89 return Smi::cast(value)->value(); \ |
| 91 } \ | 90 } \ |
| 92 void holder::set_##name(int value) { \ | 91 void holder::set_##name(int value) { \ |
| 93 WRITE_FIELD(this, offset, Smi::FromInt(value)); \ | 92 WRITE_FIELD(this, offset, Smi::FromInt(value)); \ |
| 94 } | 93 } |
| 95 | 94 |
| 96 | 95 |
| (...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3551 #undef WRITE_INT_FIELD | 3550 #undef WRITE_INT_FIELD |
| 3552 #undef READ_SHORT_FIELD | 3551 #undef READ_SHORT_FIELD |
| 3553 #undef WRITE_SHORT_FIELD | 3552 #undef WRITE_SHORT_FIELD |
| 3554 #undef READ_BYTE_FIELD | 3553 #undef READ_BYTE_FIELD |
| 3555 #undef WRITE_BYTE_FIELD | 3554 #undef WRITE_BYTE_FIELD |
| 3556 | 3555 |
| 3557 | 3556 |
| 3558 } } // namespace v8::internal | 3557 } } // namespace v8::internal |
| 3559 | 3558 |
| 3560 #endif // V8_OBJECTS_INL_H_ | 3559 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |