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 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2198 IsUndefined() || | 2198 IsUndefined() || |
2199 IsTrue() || | 2199 IsTrue() || |
2200 IsFalse() || | 2200 IsFalse() || |
2201 IsNull())) { | 2201 IsNull())) { |
2202 FATAL("API call returned invalid object"); | 2202 FATAL("API call returned invalid object"); |
2203 } | 2203 } |
2204 #endif // ENABLE_EXTRA_CHECKS | 2204 #endif // ENABLE_EXTRA_CHECKS |
2205 } | 2205 } |
2206 | 2206 |
2207 | 2207 |
2208 Object* FixedArray::get(int index) { | 2208 Object* FixedArray::get(int index) const { |
2209 SLOW_DCHECK(index >= 0 && index < this->length()); | 2209 SLOW_DCHECK(index >= 0 && index < this->length()); |
2210 return READ_FIELD(this, kHeaderSize + index * kPointerSize); | 2210 return READ_FIELD(this, kHeaderSize + index * kPointerSize); |
2211 } | 2211 } |
2212 | 2212 |
2213 | 2213 |
2214 Handle<Object> FixedArray::get(Handle<FixedArray> array, int index) { | 2214 Handle<Object> FixedArray::get(Handle<FixedArray> array, int index) { |
2215 return handle(array->get(index), array->GetIsolate()); | 2215 return handle(array->get(index), array->GetIsolate()); |
2216 } | 2216 } |
2217 | 2217 |
2218 | 2218 |
(...skipping 5066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7285 #undef READ_SHORT_FIELD | 7285 #undef READ_SHORT_FIELD |
7286 #undef WRITE_SHORT_FIELD | 7286 #undef WRITE_SHORT_FIELD |
7287 #undef READ_BYTE_FIELD | 7287 #undef READ_BYTE_FIELD |
7288 #undef WRITE_BYTE_FIELD | 7288 #undef WRITE_BYTE_FIELD |
7289 #undef NOBARRIER_READ_BYTE_FIELD | 7289 #undef NOBARRIER_READ_BYTE_FIELD |
7290 #undef NOBARRIER_WRITE_BYTE_FIELD | 7290 #undef NOBARRIER_WRITE_BYTE_FIELD |
7291 | 7291 |
7292 } } // namespace v8::internal | 7292 } } // namespace v8::internal |
7293 | 7293 |
7294 #endif // V8_OBJECTS_INL_H_ | 7294 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |