| 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 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2648 FixedArray::set(index, key, mode); | 2648 FixedArray::set(index, key, mode); |
| 2649 FixedArray::set(index+1, value, mode); | 2649 FixedArray::set(index+1, value, mode); |
| 2650 FixedArray::fast_set(this, index+2, details.AsSmi()); | 2650 FixedArray::fast_set(this, index+2, details.AsSmi()); |
| 2651 } | 2651 } |
| 2652 | 2652 |
| 2653 | 2653 |
| 2654 void Map::ClearCodeCache() { | 2654 void Map::ClearCodeCache() { |
| 2655 // No write barrier is needed since empty_fixed_array is not in new space. | 2655 // No write barrier is needed since empty_fixed_array is not in new space. |
| 2656 // Please note this function is used during marking: | 2656 // Please note this function is used during marking: |
| 2657 // - MarkCompactCollector::MarkUnmarkedObject | 2657 // - MarkCompactCollector::MarkUnmarkedObject |
| 2658 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array())); | 2658 ASSERT(!Heap::InNewSpace(Heap::raw_unchecked_empty_fixed_array())); |
| 2659 WRITE_FIELD(this, kCodeCacheOffset, Heap::empty_fixed_array()); | 2659 WRITE_FIELD(this, kCodeCacheOffset, Heap::raw_unchecked_empty_fixed_array()); |
| 2660 } | 2660 } |
| 2661 | 2661 |
| 2662 | 2662 |
| 2663 void JSArray::EnsureSize(int required_size) { | 2663 void JSArray::EnsureSize(int required_size) { |
| 2664 ASSERT(HasFastElements()); | 2664 ASSERT(HasFastElements()); |
| 2665 if (elements()->length() >= required_size) return; | 2665 if (elements()->length() >= required_size) return; |
| 2666 Expand(required_size); | 2666 Expand(required_size); |
| 2667 } | 2667 } |
| 2668 | 2668 |
| 2669 | 2669 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 2696 #undef WRITE_INT_FIELD | 2696 #undef WRITE_INT_FIELD |
| 2697 #undef READ_SHORT_FIELD | 2697 #undef READ_SHORT_FIELD |
| 2698 #undef WRITE_SHORT_FIELD | 2698 #undef WRITE_SHORT_FIELD |
| 2699 #undef READ_BYTE_FIELD | 2699 #undef READ_BYTE_FIELD |
| 2700 #undef WRITE_BYTE_FIELD | 2700 #undef WRITE_BYTE_FIELD |
| 2701 | 2701 |
| 2702 | 2702 |
| 2703 } } // namespace v8::internal | 2703 } } // namespace v8::internal |
| 2704 | 2704 |
| 2705 #endif // V8_OBJECTS_INL_H_ | 2705 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |