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 { namespace internal { | 34 namespace v8 { namespace internal { |
35 | 35 |
36 int Heap::MaxHeapObjectSize() { | 36 int Heap::MaxHeapObjectSize() { |
37 return Page::kMaxHeapObjectSize; | 37 return Page::kMaxHeapObjectSize; |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 Object* Heap::AllocateSymbol(Vector<const char> str, | 41 Object* Heap::AllocateSymbol(Vector<const char> str, |
42 int chars, | 42 int chars, |
43 uint32_t length_field) { | 43 uint32_t length_field) { |
44 if (global_external_symbol_callback_) { | |
45 return AllocateExternalSymbol(str, chars); | |
46 } | |
47 unibrow::Utf8InputBuffer<> buffer(str.start(), | 44 unibrow::Utf8InputBuffer<> buffer(str.start(), |
48 static_cast<unsigned>(str.length())); | 45 static_cast<unsigned>(str.length())); |
49 return AllocateInternalSymbol(&buffer, chars, length_field); | 46 return AllocateInternalSymbol(&buffer, chars, length_field); |
50 } | 47 } |
51 | 48 |
52 | 49 |
53 Object* Heap::AllocateRaw(int size_in_bytes, | 50 Object* Heap::AllocateRaw(int size_in_bytes, |
54 AllocationSpace space, | 51 AllocationSpace space, |
55 AllocationSpace retry_space) { | 52 AllocationSpace retry_space) { |
56 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); | 53 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 allocation_allowed_ = new_state; | 272 allocation_allowed_ = new_state; |
276 return old; | 273 return old; |
277 } | 274 } |
278 | 275 |
279 #endif | 276 #endif |
280 | 277 |
281 | 278 |
282 } } // namespace v8::internal | 279 } } // namespace v8::internal |
283 | 280 |
284 #endif // V8_HEAP_INL_H_ | 281 #endif // V8_HEAP_INL_H_ |
OLD | NEW |