| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 | 171 |
| 172 Isolate* Isolate::default_isolate_ = NULL; | 172 Isolate* Isolate::default_isolate_ = NULL; |
| 173 Thread::LocalStorageKey Isolate::isolate_key_; | 173 Thread::LocalStorageKey Isolate::isolate_key_; |
| 174 Thread::LocalStorageKey Isolate::thread_id_key_; | 174 Thread::LocalStorageKey Isolate::thread_id_key_; |
| 175 Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_; | 175 Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_; |
| 176 Mutex* Isolate::process_wide_mutex_ = OS::CreateMutex(); | 176 Mutex* Isolate::process_wide_mutex_ = OS::CreateMutex(); |
| 177 Isolate::ThreadDataTable* Isolate::thread_data_table_ = NULL; | 177 Isolate::ThreadDataTable* Isolate::thread_data_table_ = NULL; |
| 178 Isolate::ThreadId Isolate::highest_thread_id_ = 0; | 178 Isolate::ThreadId Isolate::highest_thread_id_ = 0; |
| 179 | 179 |
| 180 |
| 180 class IsolateInitializer { | 181 class IsolateInitializer { |
| 181 public: | 182 public: |
| 182 IsolateInitializer() { | 183 IsolateInitializer() { |
| 183 Isolate::EnsureDefaultIsolate(); | 184 Isolate::EnsureDefaultIsolate(); |
| 184 } | 185 } |
| 185 }; | 186 }; |
| 186 | 187 |
| 187 static IsolateInitializer* EnsureDefaultIsolateAllocated() { | 188 static IsolateInitializer* EnsureDefaultIsolateAllocated() { |
| 188 // TODO(isolates): Use the system threading API to do this once? | 189 // TODO(isolates): Use the system threading API to do this once? |
| 189 static IsolateInitializer static_initializer; | 190 static IsolateInitializer static_initializer; |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // stack guard. | 706 // stack guard. |
| 706 heap_.SetStackLimits(); | 707 heap_.SetStackLimits(); |
| 707 | 708 |
| 708 // Setup the CPU support. Must be done after heap setup and after | 709 // Setup the CPU support. Must be done after heap setup and after |
| 709 // any deserialization because we have to have the initial heap | 710 // any deserialization because we have to have the initial heap |
| 710 // objects in place for creating the code object used for probing. | 711 // objects in place for creating the code object used for probing. |
| 711 CPU::Setup(); | 712 CPU::Setup(); |
| 712 | 713 |
| 713 OProfileAgent::Initialize(); | 714 OProfileAgent::Initialize(); |
| 714 deoptimizer_data_ = new DeoptimizerData; | 715 deoptimizer_data_ = new DeoptimizerData; |
| 715 LAllocator::Setup(); | |
| 716 runtime_profiler_ = new RuntimeProfiler(this); | 716 runtime_profiler_ = new RuntimeProfiler(this); |
| 717 runtime_profiler_->Setup(); | 717 runtime_profiler_->Setup(); |
| 718 | 718 |
| 719 // If we are deserializing, log non-function code objects and compiled | 719 // If we are deserializing, log non-function code objects and compiled |
| 720 // functions found in the snapshot. | 720 // functions found in the snapshot. |
| 721 if (des != NULL && FLAG_log_code) { | 721 if (des != NULL && FLAG_log_code) { |
| 722 HandleScope scope; | 722 HandleScope scope; |
| 723 LOG(LogCodeObjects()); | 723 LOG(LogCodeObjects()); |
| 724 LOG(LogCompiledFunctions()); | 724 LOG(LogCompiledFunctions()); |
| 725 } | 725 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 // Reinit the current thread for the isolate it was running before this one. | 798 // Reinit the current thread for the isolate it was running before this one. |
| 799 SetIsolateThreadLocals(previous_isolate, previous_thread_data); | 799 SetIsolateThreadLocals(previous_isolate, previous_thread_data); |
| 800 } | 800 } |
| 801 | 801 |
| 802 | 802 |
| 803 void Isolate::ResetEagerOptimizingData() { | 803 void Isolate::ResetEagerOptimizingData() { |
| 804 compilation_cache_->ResetEagerOptimizingData(); | 804 compilation_cache_->ResetEagerOptimizingData(); |
| 805 } | 805 } |
| 806 | 806 |
| 807 } } // namespace v8::internal | 807 } } // namespace v8::internal |
| OLD | NEW |