OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/string-stream.h" | 5 #include "src/string-stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/handles-inl.h" | 9 #include "src/handles-inl.h" |
| 10 #include "src/log.h" |
| 11 #include "src/objects-inl.h" |
10 #include "src/prototype.h" | 12 #include "src/prototype.h" |
11 | 13 |
12 namespace v8 { | 14 namespace v8 { |
13 namespace internal { | 15 namespace internal { |
14 | 16 |
15 static const int kMentionedObjectCacheMaxSize = 256; | 17 static const int kMentionedObjectCacheMaxSize = 256; |
16 | 18 |
17 char* HeapStringAllocator::allocate(unsigned bytes) { | 19 char* HeapStringAllocator::allocate(unsigned bytes) { |
18 space_ = NewArray<char>(bytes); | 20 space_ = NewArray<char>(bytes); |
19 return space_; | 21 return space_; |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 MemCopy(new_space, space_, *bytes); | 534 MemCopy(new_space, space_, *bytes); |
533 *bytes = new_bytes; | 535 *bytes = new_bytes; |
534 DeleteArray(space_); | 536 DeleteArray(space_); |
535 space_ = new_space; | 537 space_ = new_space; |
536 return new_space; | 538 return new_space; |
537 } | 539 } |
538 | 540 |
539 | 541 |
540 } // namespace internal | 542 } // namespace internal |
541 } // namespace v8 | 543 } // namespace v8 |
OLD | NEW |