OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 3596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3607 void Map::mark_unstable() { | 3607 void Map::mark_unstable() { |
3608 set_bit_field3(IsUnstable::update(bit_field3(), true)); | 3608 set_bit_field3(IsUnstable::update(bit_field3(), true)); |
3609 } | 3609 } |
3610 | 3610 |
3611 | 3611 |
3612 bool Map::is_stable() { | 3612 bool Map::is_stable() { |
3613 return !IsUnstable::decode(bit_field3()); | 3613 return !IsUnstable::decode(bit_field3()); |
3614 } | 3614 } |
3615 | 3615 |
3616 | 3616 |
3617 bool Map::has_code_cache() { | |
3618 // Code caches are always fixed arrays. The empty fixed array is used as a | |
3619 // sentinel for an absent code cache. | |
3620 return code_cache()->length() != 0; | |
3621 } | |
3622 | |
3623 | |
3624 bool Map::CanBeDeprecated() { | 3617 bool Map::CanBeDeprecated() { |
3625 int descriptor = LastAdded(); | 3618 int descriptor = LastAdded(); |
3626 for (int i = 0; i <= descriptor; i++) { | 3619 for (int i = 0; i <= descriptor; i++) { |
3627 PropertyDetails details = instance_descriptors()->GetDetails(i); | 3620 PropertyDetails details = instance_descriptors()->GetDetails(i); |
3628 if (details.representation().IsNone()) return true; | 3621 if (details.representation().IsNone()) return true; |
3629 if (details.representation().IsSmi()) return true; | 3622 if (details.representation().IsSmi()) return true; |
3630 if (details.representation().IsDouble()) return true; | 3623 if (details.representation().IsDouble()) return true; |
3631 if (details.representation().IsHeapObject()) return true; | 3624 if (details.representation().IsHeapObject()) return true; |
3632 if (details.kind() == kData && details.location() == kDescriptor) { | 3625 if (details.kind() == kData && details.location() == kDescriptor) { |
3633 return true; | 3626 return true; |
(...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6409 | 6402 |
6410 ACCESSORS(JSStringIterator, string, String, kStringOffset) | 6403 ACCESSORS(JSStringIterator, string, String, kStringOffset) |
6411 SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset) | 6404 SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset) |
6412 | 6405 |
6413 } // namespace internal | 6406 } // namespace internal |
6414 } // namespace v8 | 6407 } // namespace v8 |
6415 | 6408 |
6416 #include "src/objects/object-macros-undef.h" | 6409 #include "src/objects/object-macros-undef.h" |
6417 | 6410 |
6418 #endif // V8_OBJECTS_INL_H_ | 6411 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |