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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 value_ = smi->value(); | 50 value_ = smi->value(); |
51 } | 51 } |
52 | 52 |
53 | 53 |
54 Smi* PropertyDetails::AsSmi() { | 54 Smi* PropertyDetails::AsSmi() { |
55 return Smi::FromInt(value_); | 55 return Smi::FromInt(value_); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 PropertyDetails PropertyDetails::AsDeleted() { | 59 PropertyDetails PropertyDetails::AsDeleted() { |
60 PropertyDetails d(DONT_ENUM, NORMAL); | 60 Smi* smi = Smi::FromInt(value_ | DeletedField::encode(1)); |
61 Smi* smi = Smi::FromInt(AsSmi()->value() | DeletedField::encode(1)); | |
62 return PropertyDetails(smi); | 61 return PropertyDetails(smi); |
63 } | 62 } |
64 | 63 |
65 | 64 |
66 #define CAST_ACCESSOR(type) \ | 65 #define CAST_ACCESSOR(type) \ |
67 type* type::cast(Object* object) { \ | 66 type* type::cast(Object* object) { \ |
68 ASSERT(object->Is##type()); \ | 67 ASSERT(object->Is##type()); \ |
69 return reinterpret_cast<type*>(object); \ | 68 return reinterpret_cast<type*>(object); \ |
70 } | 69 } |
71 | 70 |
(...skipping 3805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3877 #undef WRITE_INT_FIELD | 3876 #undef WRITE_INT_FIELD |
3878 #undef READ_SHORT_FIELD | 3877 #undef READ_SHORT_FIELD |
3879 #undef WRITE_SHORT_FIELD | 3878 #undef WRITE_SHORT_FIELD |
3880 #undef READ_BYTE_FIELD | 3879 #undef READ_BYTE_FIELD |
3881 #undef WRITE_BYTE_FIELD | 3880 #undef WRITE_BYTE_FIELD |
3882 | 3881 |
3883 | 3882 |
3884 } } // namespace v8::internal | 3883 } } // namespace v8::internal |
3885 | 3884 |
3886 #endif // V8_OBJECTS_INL_H_ | 3885 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |