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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 } | 1937 } |
1938 | 1938 |
1939 | 1939 |
1940 void FixedArray::set_null_unchecked(Heap* heap, int index) { | 1940 void FixedArray::set_null_unchecked(Heap* heap, int index) { |
1941 ASSERT(index >= 0 && index < this->length()); | 1941 ASSERT(index >= 0 && index < this->length()); |
1942 ASSERT(!heap->InNewSpace(heap->null_value())); | 1942 ASSERT(!heap->InNewSpace(heap->null_value())); |
1943 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value()); | 1943 WRITE_FIELD(this, kHeaderSize + index * kPointerSize, heap->null_value()); |
1944 } | 1944 } |
1945 | 1945 |
1946 | 1946 |
| 1947 double* FixedDoubleArray::data_start() { |
| 1948 return &READ_DOUBLE_FIELD(this, kHeaderSize); |
| 1949 } |
| 1950 |
| 1951 |
1947 Object** FixedArray::data_start() { | 1952 Object** FixedArray::data_start() { |
1948 return HeapObject::RawField(this, kHeaderSize); | 1953 return HeapObject::RawField(this, kHeaderSize); |
1949 } | 1954 } |
1950 | 1955 |
1951 | 1956 |
1952 bool DescriptorArray::IsEmpty() { | 1957 bool DescriptorArray::IsEmpty() { |
1953 ASSERT(length() >= kFirstIndex || | 1958 ASSERT(length() >= kFirstIndex || |
1954 this == HEAP->empty_descriptor_array()); | 1959 this == HEAP->empty_descriptor_array()); |
1955 return length() < kFirstIndex; | 1960 return length() < kFirstIndex; |
1956 } | 1961 } |
(...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4807 bool JSObject::HasFastDoubleElements() { | 4812 bool JSObject::HasFastDoubleElements() { |
4808 return IsFastDoubleElementsKind(GetElementsKind()); | 4813 return IsFastDoubleElementsKind(GetElementsKind()); |
4809 } | 4814 } |
4810 | 4815 |
4811 | 4816 |
4812 bool JSObject::HasFastHoleyElements() { | 4817 bool JSObject::HasFastHoleyElements() { |
4813 return IsFastHoleyElementsKind(GetElementsKind()); | 4818 return IsFastHoleyElementsKind(GetElementsKind()); |
4814 } | 4819 } |
4815 | 4820 |
4816 | 4821 |
| 4822 bool JSObject::HasFastElements() { |
| 4823 return IsFastElementsKind(GetElementsKind()); |
| 4824 } |
| 4825 |
| 4826 |
4817 bool JSObject::HasDictionaryElements() { | 4827 bool JSObject::HasDictionaryElements() { |
4818 return GetElementsKind() == DICTIONARY_ELEMENTS; | 4828 return GetElementsKind() == DICTIONARY_ELEMENTS; |
4819 } | 4829 } |
4820 | 4830 |
4821 | 4831 |
4822 bool JSObject::HasNonStrictArgumentsElements() { | 4832 bool JSObject::HasNonStrictArgumentsElements() { |
4823 return GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS; | 4833 return GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS; |
4824 } | 4834 } |
4825 | 4835 |
4826 | 4836 |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5557 #undef WRITE_UINT32_FIELD | 5567 #undef WRITE_UINT32_FIELD |
5558 #undef READ_SHORT_FIELD | 5568 #undef READ_SHORT_FIELD |
5559 #undef WRITE_SHORT_FIELD | 5569 #undef WRITE_SHORT_FIELD |
5560 #undef READ_BYTE_FIELD | 5570 #undef READ_BYTE_FIELD |
5561 #undef WRITE_BYTE_FIELD | 5571 #undef WRITE_BYTE_FIELD |
5562 | 5572 |
5563 | 5573 |
5564 } } // namespace v8::internal | 5574 } } // namespace v8::internal |
5565 | 5575 |
5566 #endif // V8_OBJECTS_INL_H_ | 5576 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |