| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index a42f90cc7d98d2f5092b9af7322379160f4c2f07..e19df2ca6239eb21de2812c6459ac5aabbbe6b07 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -8095,12 +8095,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyCompile) {
|
| return function->code();
|
| }
|
|
|
| -
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
|
| - HandleScope scope(isolate);
|
| - ASSERT(args.length() == 1);
|
| - Handle<JSFunction> function = args.at<JSFunction>(0);
|
| -
|
| +// Compile function using CrankShaft and return a pointer to its code.
|
| +MaybeObject *CompileJSFunction(Isolate *isolate,
|
| + Handle<JSFunction> function) {
|
| // If the function is not compiled ignore the lazy
|
| // recompilation. This can happen if the debugger is activated and
|
| // the function is returned to the not compiled state.
|
| @@ -8139,6 +8136,13 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_LazyRecompile) {
|
| + HandleScope scope(isolate);
|
| + ASSERT(args.length() == 1);
|
| + return CompileJSFunction(isolate, args.at<JSFunction>(0));
|
| +}
|
| +
|
| +
|
| class ActivationsFinder : public ThreadVisitor {
|
| public:
|
| explicit ActivationsFinder(JSFunction* function)
|
| @@ -8329,6 +8333,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationStatus) {
|
| if (!V8::UseCrankshaft()) {
|
| return Smi::FromInt(4); // 4 == "never".
|
| }
|
| + if (FLAG_concurrent_crankshaft) {
|
| + return Smi::FromInt(5); // 5 == "concurrent"
|
| + }
|
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
| if (FLAG_always_opt) {
|
| // We may have always opt, but that is more best-effort than a real
|
| @@ -9027,6 +9034,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StackGuard) {
|
|
|
| RUNTIME_FUNCTION(MaybeObject*, Runtime_Interrupt) {
|
| ASSERT(args.length() == 0);
|
| + ASSERT(!FLAG_concurrent_crankshaft ||
|
| + isolate->thread_manager()->IsLockedByCurrentThread());
|
| return Execution::HandleStackGuardInterrupt(isolate);
|
| }
|
|
|
|
|