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 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1960 // Now recompile all functions with activation frames and and | 1960 // Now recompile all functions with activation frames and and |
1961 // patch the return address to run in the new compiled code. It could be | 1961 // patch the return address to run in the new compiled code. It could be |
1962 // that some active functions were recompiled already by the suspended | 1962 // that some active functions were recompiled already by the suspended |
1963 // generator recompilation pass above; a generator with suspended | 1963 // generator recompilation pass above; a generator with suspended |
1964 // activations could also have active activations. That's fine. | 1964 // activations could also have active activations. That's fine. |
1965 for (int i = 0; i < active_functions.length(); i++) { | 1965 for (int i = 0; i < active_functions.length(); i++) { |
1966 Handle<JSFunction> function = active_functions[i]; | 1966 Handle<JSFunction> function = active_functions[i]; |
1967 Handle<SharedFunctionInfo> shared(function->shared()); | 1967 Handle<SharedFunctionInfo> shared(function->shared()); |
1968 | 1968 |
1969 // If recompilation is not possible just skip it. | 1969 // If recompilation is not possible just skip it. |
1970 if (shared->is_toplevel()) continue; | |
1971 if (!shared->allows_lazy_compilation()) continue; | 1970 if (!shared->allows_lazy_compilation()) continue; |
1972 if (shared->code()->kind() == Code::BUILTIN) continue; | 1971 if (shared->code()->kind() == Code::BUILTIN) continue; |
1973 | 1972 |
1974 EnsureFunctionHasDebugBreakSlots(function); | 1973 EnsureFunctionHasDebugBreakSlots(function); |
1975 } | 1974 } |
1976 | 1975 |
1977 RedirectActivationsToRecompiledCodeOnThread(isolate_, | 1976 RedirectActivationsToRecompiledCodeOnThread(isolate_, |
1978 isolate_->thread_local_top()); | 1977 isolate_->thread_local_top()); |
1979 | 1978 |
1980 ActiveFunctionsRedirector active_functions_redirector; | 1979 ActiveFunctionsRedirector active_functions_redirector; |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3387 } | 3386 } |
3388 | 3387 |
3389 | 3388 |
3390 void LockingCommandMessageQueue::Clear() { | 3389 void LockingCommandMessageQueue::Clear() { |
3391 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 3390 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
3392 queue_.Clear(); | 3391 queue_.Clear(); |
3393 } | 3392 } |
3394 | 3393 |
3395 } // namespace internal | 3394 } // namespace internal |
3396 } // namespace v8 | 3395 } // namespace v8 |
OLD | NEW |