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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1326 SharedFunctionInfo::Iterator iterator(isolate_); | 1326 SharedFunctionInfo::Iterator iterator(isolate_); |
1327 while (SharedFunctionInfo* shared = iterator.Next()) { | 1327 while (SharedFunctionInfo* shared = iterator.Next()) { |
1328 shared->ClearCodeFromOptimizedCodeMap(); | 1328 shared->ClearCodeFromOptimizedCodeMap(); |
1329 } | 1329 } |
1330 } | 1330 } |
1331 | 1331 |
1332 // Make sure we abort incremental marking. | 1332 // Make sure we abort incremental marking. |
1333 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, | 1333 isolate_->heap()->CollectAllGarbage(Heap::kMakeHeapIterableMask, |
1334 "prepare for break points"); | 1334 "prepare for break points"); |
1335 | 1335 |
1336 DCHECK(shared->is_compiled()); | |
Yang
2016/06/08 11:36:55
We have this DCHECK above. Do we really need this?
| |
1336 bool is_interpreted = shared->HasBytecodeArray(); | 1337 bool is_interpreted = shared->HasBytecodeArray(); |
1337 | 1338 |
1338 { | 1339 { |
1339 // TODO(yangguo): with bytecode, we still walk the heap to find all | 1340 // TODO(yangguo): with bytecode, we still walk the heap to find all |
1340 // optimized code for the function to deoptimize. We can probably be | 1341 // optimized code for the function to deoptimize. We can probably be |
1341 // smarter here and avoid the heap walk. | 1342 // smarter here and avoid the heap walk. |
1342 HeapIterator iterator(isolate_->heap()); | 1343 HeapIterator iterator(isolate_->heap()); |
1343 HeapObject* obj; | 1344 HeapObject* obj; |
1344 bool find_resumables = !is_interpreted && shared->is_resumable(); | 1345 bool find_resumables = !is_interpreted && shared->is_resumable(); |
1345 | 1346 |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2609 } | 2610 } |
2610 | 2611 |
2611 | 2612 |
2612 void LockingCommandMessageQueue::Clear() { | 2613 void LockingCommandMessageQueue::Clear() { |
2613 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2614 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2614 queue_.Clear(); | 2615 queue_.Clear(); |
2615 } | 2616 } |
2616 | 2617 |
2617 } // namespace internal | 2618 } // namespace internal |
2618 } // namespace v8 | 2619 } // namespace v8 |
OLD | NEW |