OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3598 set_bit_field3(Deprecated::update(bit_field3(), true)); | 3598 set_bit_field3(Deprecated::update(bit_field3(), true)); |
3599 } | 3599 } |
3600 | 3600 |
3601 | 3601 |
3602 bool Map::is_deprecated() { | 3602 bool Map::is_deprecated() { |
3603 if (!FLAG_track_fields) return false; | 3603 if (!FLAG_track_fields) return false; |
3604 return Deprecated::decode(bit_field3()); | 3604 return Deprecated::decode(bit_field3()); |
3605 } | 3605 } |
3606 | 3606 |
3607 | 3607 |
| 3608 void Map::freeze() { |
| 3609 set_bit_field3(IsFrozen::update(bit_field3(), true)); |
| 3610 } |
| 3611 |
| 3612 |
| 3613 bool Map::is_frozen() { |
| 3614 return IsFrozen::decode(bit_field3()); |
| 3615 } |
| 3616 |
| 3617 |
3608 bool Map::CanBeDeprecated() { | 3618 bool Map::CanBeDeprecated() { |
3609 int descriptor = LastAdded(); | 3619 int descriptor = LastAdded(); |
3610 for (int i = 0; i <= descriptor; i++) { | 3620 for (int i = 0; i <= descriptor; i++) { |
3611 PropertyDetails details = instance_descriptors()->GetDetails(i); | 3621 PropertyDetails details = instance_descriptors()->GetDetails(i); |
3612 if (FLAG_track_fields && details.representation().IsSmi()) { | 3622 if (FLAG_track_fields && details.representation().IsSmi()) { |
3613 return true; | 3623 return true; |
3614 } | 3624 } |
3615 if (FLAG_track_double_fields && details.representation().IsDouble()) { | 3625 if (FLAG_track_double_fields && details.representation().IsDouble()) { |
3616 return true; | 3626 return true; |
3617 } | 3627 } |
(...skipping 2603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6221 #undef WRITE_UINT32_FIELD | 6231 #undef WRITE_UINT32_FIELD |
6222 #undef READ_SHORT_FIELD | 6232 #undef READ_SHORT_FIELD |
6223 #undef WRITE_SHORT_FIELD | 6233 #undef WRITE_SHORT_FIELD |
6224 #undef READ_BYTE_FIELD | 6234 #undef READ_BYTE_FIELD |
6225 #undef WRITE_BYTE_FIELD | 6235 #undef WRITE_BYTE_FIELD |
6226 | 6236 |
6227 | 6237 |
6228 } } // namespace v8::internal | 6238 } } // namespace v8::internal |
6229 | 6239 |
6230 #endif // V8_OBJECTS_INL_H_ | 6240 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |