OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2181 reinterpret_cast<Array*>(result)->set_map(byte_array_map()); | 2181 reinterpret_cast<Array*>(result)->set_map(byte_array_map()); |
2182 reinterpret_cast<Array*>(result)->set_length(length); | 2182 reinterpret_cast<Array*>(result)->set_length(length); |
2183 return result; | 2183 return result; |
2184 } | 2184 } |
2185 | 2185 |
2186 | 2186 |
2187 void Heap::CreateFillerObjectAt(Address addr, int size) { | 2187 void Heap::CreateFillerObjectAt(Address addr, int size) { |
2188 if (size == 0) return; | 2188 if (size == 0) return; |
2189 HeapObject* filler = HeapObject::FromAddress(addr); | 2189 HeapObject* filler = HeapObject::FromAddress(addr); |
2190 if (size == kPointerSize) { | 2190 if (size == kPointerSize) { |
2191 filler->set_map(Heap::one_pointer_filler_map()); | 2191 filler->set_map(one_pointer_filler_map()); |
| 2192 } else if (size == 2 * kPointerSize) { |
| 2193 filler->set_map(two_pointer_filler_map()); |
2192 } else { | 2194 } else { |
2193 filler->set_map(Heap::byte_array_map()); | 2195 filler->set_map(byte_array_map()); |
2194 ByteArray::cast(filler)->set_length(ByteArray::LengthFor(size)); | 2196 ByteArray::cast(filler)->set_length(ByteArray::LengthFor(size)); |
2195 } | 2197 } |
2196 } | 2198 } |
2197 | 2199 |
2198 | 2200 |
2199 Object* Heap::AllocatePixelArray(int length, | 2201 Object* Heap::AllocatePixelArray(int length, |
2200 uint8_t* external_pointer, | 2202 uint8_t* external_pointer, |
2201 PretenureFlag pretenure) { | 2203 PretenureFlag pretenure) { |
2202 AllocationSpace space = (pretenure == TENURED) ? OLD_DATA_SPACE : NEW_SPACE; | 2204 AllocationSpace space = (pretenure == TENURED) ? OLD_DATA_SPACE : NEW_SPACE; |
2203 Object* result = AllocateRaw(PixelArray::kAlignedSize, space, OLD_DATA_SPACE); | 2205 Object* result = AllocateRaw(PixelArray::kAlignedSize, space, OLD_DATA_SPACE); |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4390 void ExternalStringTable::TearDown() { | 4392 void ExternalStringTable::TearDown() { |
4391 new_space_strings_.Free(); | 4393 new_space_strings_.Free(); |
4392 old_space_strings_.Free(); | 4394 old_space_strings_.Free(); |
4393 } | 4395 } |
4394 | 4396 |
4395 | 4397 |
4396 List<Object*> ExternalStringTable::new_space_strings_; | 4398 List<Object*> ExternalStringTable::new_space_strings_; |
4397 List<Object*> ExternalStringTable::old_space_strings_; | 4399 List<Object*> ExternalStringTable::old_space_strings_; |
4398 | 4400 |
4399 } } // namespace v8::internal | 4401 } } // namespace v8::internal |
OLD | NEW |