| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 PropertyDetails::PropertyDetails(Smi* smi) { | 45 PropertyDetails::PropertyDetails(Smi* smi) { |
| 46 value_ = smi->value(); | 46 value_ = smi->value(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 | 49 |
| 50 Smi* PropertyDetails::AsSmi() { | 50 Smi* PropertyDetails::AsSmi() { |
| 51 return Smi::FromInt(value_); | 51 return Smi::FromInt(value_); |
| 52 } | 52 } |
| 53 | 53 |
| 54 | 54 |
| 55 PropertyDetails PropertyDetails::AsDeleted() { |
| 56 PropertyDetails d(DONT_ENUM, NORMAL); |
| 57 Smi* smi = Smi::FromInt(AsSmi()->value() | DeletedField::encode(1)); |
| 58 return PropertyDetails(smi); |
| 59 } |
| 60 |
| 61 |
| 55 #define CAST_ACCESSOR(type) \ | 62 #define CAST_ACCESSOR(type) \ |
| 56 type* type::cast(Object* object) { \ | 63 type* type::cast(Object* object) { \ |
| 57 ASSERT(object->Is##type()); \ | 64 ASSERT(object->Is##type()); \ |
| 58 return reinterpret_cast<type*>(object); \ | 65 return reinterpret_cast<type*>(object); \ |
| 59 } | 66 } |
| 60 | 67 |
| 61 | 68 |
| 62 #define INT_ACCESSORS(holder, name, offset) \ | 69 #define INT_ACCESSORS(holder, name, offset) \ |
| 63 int holder::name() { return READ_INT_FIELD(this, offset); } \ | 70 int holder::name() { return READ_INT_FIELD(this, offset); } \ |
| 64 void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); } | 71 void holder::set_##name(int value) { WRITE_INT_FIELD(this, offset, value); } |
| (...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2562 #undef WRITE_INT_FIELD | 2569 #undef WRITE_INT_FIELD |
| 2563 #undef READ_SHORT_FIELD | 2570 #undef READ_SHORT_FIELD |
| 2564 #undef WRITE_SHORT_FIELD | 2571 #undef WRITE_SHORT_FIELD |
| 2565 #undef READ_BYTE_FIELD | 2572 #undef READ_BYTE_FIELD |
| 2566 #undef WRITE_BYTE_FIELD | 2573 #undef WRITE_BYTE_FIELD |
| 2567 | 2574 |
| 2568 | 2575 |
| 2569 } } // namespace v8::internal | 2576 } } // namespace v8::internal |
| 2570 | 2577 |
| 2571 #endif // V8_OBJECTS_INL_H_ | 2578 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |