OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 heap->natives_source_cache()->set(index, *source_code); | 88 heap->natives_source_cache()->set(index, *source_code); |
89 } | 89 } |
90 Handle<Object> cached_source(heap->natives_source_cache()->get(index), | 90 Handle<Object> cached_source(heap->natives_source_cache()->get(index), |
91 isolate_); | 91 isolate_); |
92 return Handle<String>::cast(cached_source); | 92 return Handle<String>::cast(cached_source); |
93 } | 93 } |
94 | 94 |
95 | 95 |
96 void Bootstrapper::Initialize(bool create_heap_objects) { | 96 void Bootstrapper::Initialize(bool create_heap_objects) { |
97 extensions_cache_.Initialize(create_heap_objects); | 97 extensions_cache_.Initialize(create_heap_objects); |
| 98 } |
| 99 |
| 100 |
| 101 void Bootstrapper::InitializeOncePerProcess() { |
98 GCExtension::Register(); | 102 GCExtension::Register(); |
99 ExternalizeStringExtension::Register(); | 103 ExternalizeStringExtension::Register(); |
100 StatisticsExtension::Register(); | 104 StatisticsExtension::Register(); |
101 } | 105 } |
102 | 106 |
103 | 107 |
104 char* Bootstrapper::AllocateAutoDeletedArray(int bytes) { | 108 char* Bootstrapper::AllocateAutoDeletedArray(int bytes) { |
105 char* memory = new char[bytes]; | 109 char* memory = new char[bytes]; |
106 if (memory != NULL) { | 110 if (memory != NULL) { |
107 if (delete_these_arrays_on_tear_down_ == NULL) { | 111 if (delete_these_arrays_on_tear_down_ == NULL) { |
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2626 return from + sizeof(NestingCounterType); | 2630 return from + sizeof(NestingCounterType); |
2627 } | 2631 } |
2628 | 2632 |
2629 | 2633 |
2630 // Called when the top-level V8 mutex is destroyed. | 2634 // Called when the top-level V8 mutex is destroyed. |
2631 void Bootstrapper::FreeThreadResources() { | 2635 void Bootstrapper::FreeThreadResources() { |
2632 ASSERT(!IsActive()); | 2636 ASSERT(!IsActive()); |
2633 } | 2637 } |
2634 | 2638 |
2635 } } // namespace v8::internal | 2639 } } // namespace v8::internal |
OLD | NEW |