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 1925 matching lines...) Loading... |
1936 } | 1936 } |
1937 | 1937 |
1938 | 1938 |
1939 void FixedArray::set_null_unchecked(Heap* heap, int index) { | 1939 void FixedArray::set_null_unchecked(Heap* heap, int index) { |
1940 ASSERT(index >= 0 && index < this->length()); | 1940 ASSERT(index >= 0 && index < this->length()); |
1941 ASSERT(!heap->InNewSpace(heap->null_value())); | 1941 ASSERT(!heap->InNewSpace(heap->null_value())); |
1942 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value()); | 1942 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value()); |
1943 } | 1943 } |
1944 | 1944 |
1945 | 1945 |
| 1946 double* FixedDoubleArray::data_start() { |
| 1947 return &READ_DOUBLE_FIELD(this, kHeaderSize); |
| 1948 } |
| 1949 |
| 1950 |
1946 Object** FixedArray::data_start() { | 1951 Object** FixedArray::data_start() { |
1947 return HeapObject::RawField(this, kHeaderSize); | 1952 return HeapObject::RawField(this, kHeaderSize); |
1948 } | 1953 } |
1949 | 1954 |
1950 | 1955 |
1951 bool DescriptorArray::IsEmpty() { | 1956 bool DescriptorArray::IsEmpty() { |
1952 ASSERT(length() >= kFirstIndex || | 1957 ASSERT(length() >= kFirstIndex || |
1953 this == HEAP->empty_descriptor_array()); | 1958 this == HEAP->empty_descriptor_array()); |
1954 return length() < kFirstIndex; | 1959 return length() < kFirstIndex; |
1955 } | 1960 } |
(...skipping 2825 matching lines...) Loading... |
4781 bool JSObject::HasFastDoubleElements() { | 4786 bool JSObject::HasFastDoubleElements() { |
4782 return IsFastDoubleElementsKind(GetElementsKind()); | 4787 return IsFastDoubleElementsKind(GetElementsKind()); |
4783 } | 4788 } |
4784 | 4789 |
4785 | 4790 |
4786 bool JSObject::HasFastHoleyElements() { | 4791 bool JSObject::HasFastHoleyElements() { |
4787 return IsFastHoleyElementsKind(GetElementsKind()); | 4792 return IsFastHoleyElementsKind(GetElementsKind()); |
4788 } | 4793 } |
4789 | 4794 |
4790 | 4795 |
| 4796 bool JSObject::HasFastElements() { |
| 4797 return IsFastElementsKind(GetElementsKind()); |
| 4798 } |
| 4799 |
| 4800 |
4791 bool JSObject::HasDictionaryElements() { | 4801 bool JSObject::HasDictionaryElements() { |
4792 return GetElementsKind() == DICTIONARY_ELEMENTS; | 4802 return GetElementsKind() == DICTIONARY_ELEMENTS; |
4793 } | 4803 } |
4794 | 4804 |
4795 | 4805 |
4796 bool JSObject::HasNonStrictArgumentsElements() { | 4806 bool JSObject::HasNonStrictArgumentsElements() { |
4797 return GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS; | 4807 return GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS; |
4798 } | 4808 } |
4799 | 4809 |
4800 | 4810 |
(...skipping 730 matching lines...) Loading... |
5531 #undef WRITE_UINT32_FIELD | 5541 #undef WRITE_UINT32_FIELD |
5532 #undef READ_SHORT_FIELD | 5542 #undef READ_SHORT_FIELD |
5533 #undef WRITE_SHORT_FIELD | 5543 #undef WRITE_SHORT_FIELD |
5534 #undef READ_BYTE_FIELD | 5544 #undef READ_BYTE_FIELD |
5535 #undef WRITE_BYTE_FIELD | 5545 #undef WRITE_BYTE_FIELD |
5536 | 5546 |
5537 | 5547 |
5538 } } // namespace v8::internal | 5548 } } // namespace v8::internal |
5539 | 5549 |
5540 #endif // V8_OBJECTS_INL_H_ | 5550 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |