| OLD | NEW |
| 1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2010 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 83 |
| 84 bool create_heap_objects = des == NULL; | 84 bool create_heap_objects = des == NULL; |
| 85 | 85 |
| 86 #ifdef DEBUG | 86 #ifdef DEBUG |
| 87 // The initialization process does not handle memory exhaustion. | 87 // The initialization process does not handle memory exhaustion. |
| 88 DisallowAllocationFailure disallow_allocation_failure; | 88 DisallowAllocationFailure disallow_allocation_failure; |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 // Allocate per-isolate globals early. | 91 // Allocate per-isolate globals early. |
| 92 bootstrapper_ = new Bootstrapper(); | 92 bootstrapper_ = new Bootstrapper(); |
| 93 stub_cache_ = new StubCache(); |
| 93 | 94 |
| 94 // Enable logging before setting up the heap | 95 // Enable logging before setting up the heap |
| 95 Logger::Setup(); | 96 Logger::Setup(); |
| 96 | 97 |
| 97 CpuProfiler::Setup(); | 98 CpuProfiler::Setup(); |
| 98 | 99 |
| 99 // Setup the platform OS support. | 100 // Setup the platform OS support. |
| 100 OS::Setup(); | 101 OS::Setup(); |
| 101 | 102 |
| 102 // Initialize other runtime facilities | 103 // Initialize other runtime facilities |
| (...skipping 21 matching lines...) Expand all Loading... |
| 124 Top::Initialize(); | 125 Top::Initialize(); |
| 125 | 126 |
| 126 if (FLAG_preemption) { | 127 if (FLAG_preemption) { |
| 127 v8::Locker locker; | 128 v8::Locker locker; |
| 128 v8::Locker::StartPreemption(100); | 129 v8::Locker::StartPreemption(100); |
| 129 } | 130 } |
| 130 | 131 |
| 131 #ifdef ENABLE_DEBUGGER_SUPPORT | 132 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 132 Debug::Setup(create_heap_objects); | 133 Debug::Setup(create_heap_objects); |
| 133 #endif | 134 #endif |
| 134 stub_cache_ = new StubCache(); | 135 stub_cache_->Initialize(create_heap_objects); |
| 135 StubCache::Initialize(create_heap_objects); | |
| 136 | 136 |
| 137 // If we are deserializing, read the state into the now-empty heap. | 137 // If we are deserializing, read the state into the now-empty heap. |
| 138 if (des != NULL) { | 138 if (des != NULL) { |
| 139 des->Deserialize(); | 139 des->Deserialize(); |
| 140 StubCache::Clear(); | 140 StubCache::Clear(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 // Deserializing may put strange things in the root array's copy of the | 143 // Deserializing may put strange things in the root array's copy of the |
| 144 // stack guard. | 144 // stack guard. |
| 145 Heap::SetStackLimits(); | 145 Heap::SetStackLimits(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 157 HandleScope scope; | 157 HandleScope scope; |
| 158 LOG(LogCodeObjects()); | 158 LOG(LogCodeObjects()); |
| 159 LOG(LogCompiledFunctions()); | 159 LOG(LogCompiledFunctions()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 | 164 |
| 165 | 165 |
| 166 } } // namespace v8::internal | 166 } } // namespace v8::internal |
| OLD | NEW |