| 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 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 } else { | 2347 } else { |
| 2348 HeapNumber* box = HeapNumber::cast(RawFastPropertyAt(index)); | 2348 HeapNumber* box = HeapNumber::cast(RawFastPropertyAt(index)); |
| 2349 DCHECK(box->IsMutableHeapNumber()); | 2349 DCHECK(box->IsMutableHeapNumber()); |
| 2350 box->set_value(value->Number()); | 2350 box->set_value(value->Number()); |
| 2351 } | 2351 } |
| 2352 } else { | 2352 } else { |
| 2353 RawFastPropertyAtPut(index, value); | 2353 RawFastPropertyAtPut(index, value); |
| 2354 } | 2354 } |
| 2355 } | 2355 } |
| 2356 | 2356 |
| 2357 void JSObject::WriteToField(int descriptor, Object* value) { | |
| 2358 DescriptorArray* desc = map()->instance_descriptors(); | |
| 2359 PropertyDetails details = desc->GetDetails(descriptor); | |
| 2360 WriteToField(descriptor, details, value); | |
| 2361 } | |
| 2362 | |
| 2363 int JSObject::GetInObjectPropertyOffset(int index) { | 2357 int JSObject::GetInObjectPropertyOffset(int index) { |
| 2364 return map()->GetInObjectPropertyOffset(index); | 2358 return map()->GetInObjectPropertyOffset(index); |
| 2365 } | 2359 } |
| 2366 | 2360 |
| 2367 | 2361 |
| 2368 Object* JSObject::InObjectPropertyAt(int index) { | 2362 Object* JSObject::InObjectPropertyAt(int index) { |
| 2369 int offset = GetInObjectPropertyOffset(index); | 2363 int offset = GetInObjectPropertyOffset(index); |
| 2370 return READ_FIELD(this, offset); | 2364 return READ_FIELD(this, offset); |
| 2371 } | 2365 } |
| 2372 | 2366 |
| (...skipping 6047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8420 #undef WRITE_INT64_FIELD | 8414 #undef WRITE_INT64_FIELD |
| 8421 #undef READ_BYTE_FIELD | 8415 #undef READ_BYTE_FIELD |
| 8422 #undef WRITE_BYTE_FIELD | 8416 #undef WRITE_BYTE_FIELD |
| 8423 #undef NOBARRIER_READ_BYTE_FIELD | 8417 #undef NOBARRIER_READ_BYTE_FIELD |
| 8424 #undef NOBARRIER_WRITE_BYTE_FIELD | 8418 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8425 | 8419 |
| 8426 } // namespace internal | 8420 } // namespace internal |
| 8427 } // namespace v8 | 8421 } // namespace v8 |
| 8428 | 8422 |
| 8429 #endif // V8_OBJECTS_INL_H_ | 8423 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |