| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 Object* Heap::AllocateSymbol(Vector<const char> str, | 53 Object* Heap::AllocateSymbol(Vector<const char> str, |
| 54 int chars, | 54 int chars, |
| 55 uint32_t hash_field) { | 55 uint32_t hash_field) { |
| 56 unibrow::Utf8InputBuffer<> buffer(str.start(), | 56 unibrow::Utf8InputBuffer<> buffer(str.start(), |
| 57 static_cast<unsigned>(str.length())); | 57 static_cast<unsigned>(str.length())); |
| 58 return AllocateInternalSymbol(&buffer, chars, hash_field); | 58 return AllocateInternalSymbol(&buffer, chars, hash_field); |
| 59 } | 59 } |
| 60 | 60 |
| 61 | 61 |
| 62 Object* Heap::CopyFixedArray(FixedArray* src) { |
| 63 return CopyFixedArrayWithMap(src, src->map()); |
| 64 } |
| 65 |
| 66 |
| 62 Object* Heap::AllocateRaw(int size_in_bytes, | 67 Object* Heap::AllocateRaw(int size_in_bytes, |
| 63 AllocationSpace space, | 68 AllocationSpace space, |
| 64 AllocationSpace retry_space) { | 69 AllocationSpace retry_space) { |
| 65 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 70 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
| 66 ASSERT(space != NEW_SPACE || | 71 ASSERT(space != NEW_SPACE || |
| 67 retry_space == OLD_POINTER_SPACE || | 72 retry_space == OLD_POINTER_SPACE || |
| 68 retry_space == OLD_DATA_SPACE || | 73 retry_space == OLD_DATA_SPACE || |
| 69 retry_space == LO_SPACE); | 74 retry_space == LO_SPACE); |
| 70 #ifdef DEBUG | 75 #ifdef DEBUG |
| 71 if (FLAG_gc_interval >= 0 && | 76 if (FLAG_gc_interval >= 0 && |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 500 |
| 496 | 501 |
| 497 void ExternalStringTable::ShrinkNewStrings(int position) { | 502 void ExternalStringTable::ShrinkNewStrings(int position) { |
| 498 new_space_strings_.Rewind(position); | 503 new_space_strings_.Rewind(position); |
| 499 Verify(); | 504 Verify(); |
| 500 } | 505 } |
| 501 | 506 |
| 502 } } // namespace v8::internal | 507 } } // namespace v8::internal |
| 503 | 508 |
| 504 #endif // V8_HEAP_INL_H_ | 509 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |