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 23 matching lines...) Expand all Loading... |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
37 int Heap::MaxObjectSizeInPagedSpace() { | 37 int Heap::MaxObjectSizeInPagedSpace() { |
38 return Page::kMaxHeapObjectSize; | 38 return Page::kMaxHeapObjectSize; |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 Object* Heap::AllocateSymbol(Vector<const char> str, | 42 Object* Heap::AllocateSymbol(Vector<const char> str, |
43 int chars, | 43 int chars, |
44 uint32_t length_field) { | 44 uint32_t hash_field) { |
45 unibrow::Utf8InputBuffer<> buffer(str.start(), | 45 unibrow::Utf8InputBuffer<> buffer(str.start(), |
46 static_cast<unsigned>(str.length())); | 46 static_cast<unsigned>(str.length())); |
47 return AllocateInternalSymbol(&buffer, chars, length_field); | 47 return AllocateInternalSymbol(&buffer, chars, hash_field); |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 Object* Heap::AllocateRaw(int size_in_bytes, | 51 Object* Heap::AllocateRaw(int size_in_bytes, |
52 AllocationSpace space, | 52 AllocationSpace space, |
53 AllocationSpace retry_space) { | 53 AllocationSpace retry_space) { |
54 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 54 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
55 ASSERT(space != NEW_SPACE || | 55 ASSERT(space != NEW_SPACE || |
56 retry_space == OLD_POINTER_SPACE || | 56 retry_space == OLD_POINTER_SPACE || |
57 retry_space == OLD_DATA_SPACE); | 57 retry_space == OLD_DATA_SPACE); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 allocation_allowed_ = new_state; | 317 allocation_allowed_ = new_state; |
318 return old; | 318 return old; |
319 } | 319 } |
320 | 320 |
321 #endif | 321 #endif |
322 | 322 |
323 | 323 |
324 } } // namespace v8::internal | 324 } } // namespace v8::internal |
325 | 325 |
326 #endif // V8_HEAP_INL_H_ | 326 #endif // V8_HEAP_INL_H_ |
OLD | NEW |