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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 } | 1385 } |
1386 | 1386 |
1387 | 1387 |
1388 void JSObject::initialize_properties() { | 1388 void JSObject::initialize_properties() { |
1389 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); | 1389 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); |
1390 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); | 1390 WRITE_FIELD(this, kPropertiesOffset, GetHeap()->empty_fixed_array()); |
1391 } | 1391 } |
1392 | 1392 |
1393 | 1393 |
1394 void JSObject::initialize_elements() { | 1394 void JSObject::initialize_elements() { |
1395 ASSERT(map()->has_fast_elements() || map()->has_fast_smi_only_elements()); | 1395 ASSERT(map()->has_fast_elements() || |
| 1396 map()->has_fast_smi_only_elements() || |
| 1397 map()->has_fast_double_elements()); |
1396 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); | 1398 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_fixed_array())); |
1397 WRITE_FIELD(this, kElementsOffset, GetHeap()->empty_fixed_array()); | 1399 WRITE_FIELD(this, kElementsOffset, GetHeap()->empty_fixed_array()); |
1398 } | 1400 } |
1399 | 1401 |
1400 | 1402 |
1401 MaybeObject* JSObject::ResetElements() { | 1403 MaybeObject* JSObject::ResetElements() { |
1402 Object* obj; | 1404 Object* obj; |
1403 ElementsKind elements_kind = FLAG_smi_only_arrays | 1405 ElementsKind elements_kind = FLAG_smi_only_arrays |
1404 ? FAST_SMI_ONLY_ELEMENTS | 1406 ? FAST_SMI_ONLY_ELEMENTS |
1405 : FAST_ELEMENTS; | 1407 : FAST_ELEMENTS; |
(...skipping 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4942 #undef WRITE_UINT32_FIELD | 4944 #undef WRITE_UINT32_FIELD |
4943 #undef READ_SHORT_FIELD | 4945 #undef READ_SHORT_FIELD |
4944 #undef WRITE_SHORT_FIELD | 4946 #undef WRITE_SHORT_FIELD |
4945 #undef READ_BYTE_FIELD | 4947 #undef READ_BYTE_FIELD |
4946 #undef WRITE_BYTE_FIELD | 4948 #undef WRITE_BYTE_FIELD |
4947 | 4949 |
4948 | 4950 |
4949 } } // namespace v8::internal | 4951 } } // namespace v8::internal |
4950 | 4952 |
4951 #endif // V8_OBJECTS_INL_H_ | 4953 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |