OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/debug/debug.h" | 5 #include "src/debug/debug.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 while (SharedFunctionInfo* shared = iterator.Next()) { | 1298 while (SharedFunctionInfo* shared = iterator.Next()) { |
1299 if (!shared->OptimizedCodeMapIsCleared()) { | 1299 if (!shared->OptimizedCodeMapIsCleared()) { |
1300 shared->ClearOptimizedCodeMap(); | 1300 shared->ClearOptimizedCodeMap(); |
1301 } | 1301 } |
1302 } | 1302 } |
1303 } | 1303 } |
1304 | 1304 |
1305 // Make sure we abort incremental marking. | 1305 // Make sure we abort incremental marking. |
1306 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, | 1306 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, |
1307 "prepare for break points"); | 1307 "prepare for break points"); |
| 1308 |
1308 bool is_interpreted = shared->HasBytecodeArray(); | 1309 bool is_interpreted = shared->HasBytecodeArray(); |
1309 | 1310 |
1310 { | 1311 { |
1311 // TODO(yangguo): with bytecode, we still walk the heap to find all | 1312 // TODO(yangguo): with bytecode, we still walk the heap to find all |
1312 // optimized code for the function to deoptimize. We can probably be | 1313 // optimized code for the function to deoptimize. We can probably be |
1313 // smarter here and avoid the heap walk. | 1314 // smarter here and avoid the heap walk. |
1314 HeapIterator iterator(isolate_->heap()); | 1315 HeapIterator iterator(isolate_->heap()); |
1315 HeapObject* obj; | 1316 HeapObject* obj; |
1316 bool include_generators = !is_interpreted && shared->is_generator(); | 1317 bool include_generators = !is_interpreted && shared->is_generator(); |
1317 | 1318 |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2619 } | 2620 } |
2620 | 2621 |
2621 | 2622 |
2622 void LockingCommandMessageQueue::Clear() { | 2623 void LockingCommandMessageQueue::Clear() { |
2623 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2624 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2624 queue_.Clear(); | 2625 queue_.Clear(); |
2625 } | 2626 } |
2626 | 2627 |
2627 } // namespace internal | 2628 } // namespace internal |
2628 } // namespace v8 | 2629 } // namespace v8 |
OLD | NEW |