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/v8.h" | 5 #include "src/v8.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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 HeapObject* obj; | 1454 HeapObject* obj; |
1455 bool include_generators = shared->is_generator(); | 1455 bool include_generators = shared->is_generator(); |
1456 | 1456 |
1457 while ((obj = iterator.next())) { | 1457 while ((obj = iterator.next())) { |
1458 if (obj->IsJSFunction()) { | 1458 if (obj->IsJSFunction()) { |
1459 JSFunction* function = JSFunction::cast(obj); | 1459 JSFunction* function = JSFunction::cast(obj); |
1460 if (!function->Inlines(*shared)) continue; | 1460 if (!function->Inlines(*shared)) continue; |
1461 if (function->code()->kind() == Code::OPTIMIZED_FUNCTION) { | 1461 if (function->code()->kind() == Code::OPTIMIZED_FUNCTION) { |
1462 Deoptimizer::DeoptimizeFunction(function); | 1462 Deoptimizer::DeoptimizeFunction(function); |
1463 } | 1463 } |
1464 functions.Add(handle(function)); | 1464 if (function->shared() == *shared) functions.Add(handle(function)); |
1465 } else if (include_generators && obj->IsJSGeneratorObject()) { | 1465 } else if (include_generators && obj->IsJSGeneratorObject()) { |
1466 JSGeneratorObject* generator_obj = JSGeneratorObject::cast(obj); | 1466 JSGeneratorObject* generator_obj = JSGeneratorObject::cast(obj); |
1467 if (!generator_obj->is_suspended()) continue; | 1467 if (!generator_obj->is_suspended()) continue; |
1468 JSFunction* function = generator_obj->function(); | 1468 JSFunction* function = generator_obj->function(); |
1469 if (!function->Inlines(*shared)) continue; | 1469 if (!function->Inlines(*shared)) continue; |
1470 int pc_offset = generator_obj->continuation(); | 1470 int pc_offset = generator_obj->continuation(); |
1471 int index = | 1471 int index = |
1472 ComputeContinuationIndexFromPcOffset(function->code(), pc_offset); | 1472 ComputeContinuationIndexFromPcOffset(function->code(), pc_offset); |
1473 generator_obj->set_continuation(index); | 1473 generator_obj->set_continuation(index); |
1474 suspended_generators.Add(handle(generator_obj)); | 1474 suspended_generators.Add(handle(generator_obj)); |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2825 } | 2825 } |
2826 | 2826 |
2827 | 2827 |
2828 void LockingCommandMessageQueue::Clear() { | 2828 void LockingCommandMessageQueue::Clear() { |
2829 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2829 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2830 queue_.Clear(); | 2830 queue_.Clear(); |
2831 } | 2831 } |
2832 | 2832 |
2833 } // namespace internal | 2833 } // namespace internal |
2834 } // namespace v8 | 2834 } // namespace v8 |
OLD | NEW |