OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 desc->Init(GetKey(descriptor_number), | 1492 desc->Init(GetKey(descriptor_number), |
1493 GetValue(descriptor_number), | 1493 GetValue(descriptor_number), |
1494 GetDetails(descriptor_number)); | 1494 GetDetails(descriptor_number)); |
1495 } | 1495 } |
1496 | 1496 |
1497 | 1497 |
1498 void DescriptorArray::Set(int descriptor_number, Descriptor* desc) { | 1498 void DescriptorArray::Set(int descriptor_number, Descriptor* desc) { |
1499 // Range check. | 1499 // Range check. |
1500 ASSERT(descriptor_number < number_of_descriptors()); | 1500 ASSERT(descriptor_number < number_of_descriptors()); |
1501 | 1501 |
1502 // Make sure non of the elements in desc are in new space. | 1502 // Make sure none of the elements in desc are in new space. |
1503 ASSERT(!Heap::InNewSpace(desc->GetKey())); | 1503 ASSERT(!Heap::InNewSpace(desc->GetKey())); |
1504 ASSERT(!Heap::InNewSpace(desc->GetValue())); | 1504 ASSERT(!Heap::InNewSpace(desc->GetValue())); |
1505 | 1505 |
1506 fast_set(this, ToKeyIndex(descriptor_number), desc->GetKey()); | 1506 fast_set(this, ToKeyIndex(descriptor_number), desc->GetKey()); |
1507 FixedArray* content_array = GetContentArray(); | 1507 FixedArray* content_array = GetContentArray(); |
1508 fast_set(content_array, ToValueIndex(descriptor_number), desc->GetValue()); | 1508 fast_set(content_array, ToValueIndex(descriptor_number), desc->GetValue()); |
1509 fast_set(content_array, ToDetailsIndex(descriptor_number), | 1509 fast_set(content_array, ToDetailsIndex(descriptor_number), |
1510 desc->GetDetails().AsSmi()); | 1510 desc->GetDetails().AsSmi()); |
1511 } | 1511 } |
1512 | 1512 |
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3030 #undef WRITE_INT_FIELD | 3030 #undef WRITE_INT_FIELD |
3031 #undef READ_SHORT_FIELD | 3031 #undef READ_SHORT_FIELD |
3032 #undef WRITE_SHORT_FIELD | 3032 #undef WRITE_SHORT_FIELD |
3033 #undef READ_BYTE_FIELD | 3033 #undef READ_BYTE_FIELD |
3034 #undef WRITE_BYTE_FIELD | 3034 #undef WRITE_BYTE_FIELD |
3035 | 3035 |
3036 | 3036 |
3037 } } // namespace v8::internal | 3037 } } // namespace v8::internal |
3038 | 3038 |
3039 #endif // V8_OBJECTS_INL_H_ | 3039 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |