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 3589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3600 void Map::freeze() { | 3600 void Map::freeze() { |
3601 set_bit_field3(IsFrozen::update(bit_field3(), true)); | 3601 set_bit_field3(IsFrozen::update(bit_field3(), true)); |
3602 } | 3602 } |
3603 | 3603 |
3604 | 3604 |
3605 bool Map::is_frozen() { | 3605 bool Map::is_frozen() { |
3606 return IsFrozen::decode(bit_field3()); | 3606 return IsFrozen::decode(bit_field3()); |
3607 } | 3607 } |
3608 | 3608 |
3609 | 3609 |
| 3610 bool Map::has_code_cache() { |
| 3611 return code_cache() != GetIsolate()->heap()->empty_fixed_array(); |
| 3612 } |
| 3613 |
| 3614 |
3610 bool Map::CanBeDeprecated() { | 3615 bool Map::CanBeDeprecated() { |
3611 int descriptor = LastAdded(); | 3616 int descriptor = LastAdded(); |
3612 for (int i = 0; i <= descriptor; i++) { | 3617 for (int i = 0; i <= descriptor; i++) { |
3613 PropertyDetails details = instance_descriptors()->GetDetails(i); | 3618 PropertyDetails details = instance_descriptors()->GetDetails(i); |
3614 if (FLAG_track_fields && details.representation().IsNone()) { | 3619 if (FLAG_track_fields && details.representation().IsNone()) { |
3615 return true; | 3620 return true; |
3616 } | 3621 } |
3617 if (FLAG_track_fields && details.representation().IsSmi()) { | 3622 if (FLAG_track_fields && details.representation().IsSmi()) { |
3618 return true; | 3623 return true; |
3619 } | 3624 } |
(...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6181 #undef WRITE_UINT32_FIELD | 6186 #undef WRITE_UINT32_FIELD |
6182 #undef READ_SHORT_FIELD | 6187 #undef READ_SHORT_FIELD |
6183 #undef WRITE_SHORT_FIELD | 6188 #undef WRITE_SHORT_FIELD |
6184 #undef READ_BYTE_FIELD | 6189 #undef READ_BYTE_FIELD |
6185 #undef WRITE_BYTE_FIELD | 6190 #undef WRITE_BYTE_FIELD |
6186 | 6191 |
6187 | 6192 |
6188 } } // namespace v8::internal | 6193 } } // namespace v8::internal |
6189 | 6194 |
6190 #endif // V8_OBJECTS_INL_H_ | 6195 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |