| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // Make sure we access the buffer after the wait to remove all possibility | 121 // Make sure we access the buffer after the wait to remove all possibility |
| 122 // of it being optimized away. | 122 // of it being optimized away. |
| 123 OS::StrNCpy(local_buffer, "PreallocatedMemoryThread shutting down.\n", | 123 OS::StrNCpy(local_buffer, "PreallocatedMemoryThread shutting down.\n", |
| 124 local_buffer.length()); | 124 local_buffer.length()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 explicit PreallocatedMemoryThread(Isolate* isolate) | 129 explicit PreallocatedMemoryThread(Isolate* isolate) |
| 130 : Thread(isolate), | 130 : Thread(isolate, "v8:PreallocMem"), |
| 131 keep_running_(true), | 131 keep_running_(true), |
| 132 wait_for_ever_semaphore_(OS::CreateSemaphore(0)), | 132 wait_for_ever_semaphore_(OS::CreateSemaphore(0)), |
| 133 data_ready_semaphore_(OS::CreateSemaphore(0)), | 133 data_ready_semaphore_(OS::CreateSemaphore(0)), |
| 134 data_(NULL), | 134 data_(NULL), |
| 135 length_(0) { | 135 length_(0) { |
| 136 } | 136 } |
| 137 | 137 |
| 138 // Used to make sure that the thread keeps looping even for spurious wakeups. | 138 // Used to make sure that the thread keeps looping even for spurious wakeups. |
| 139 bool keep_running_; | 139 bool keep_running_; |
| 140 | 140 |
| (...skipping 657 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 |