| Index: src/runtime.cc
|
| ===================================================================
|
| --- src/runtime.cc (revision 10399)
|
| +++ src/runtime.cc (working copy)
|
| @@ -8464,6 +8464,9 @@
|
| PrintF("]\n");
|
| }
|
| function->ReplaceCode(function->shared()->code());
|
| +
|
| + // Limit the number of times we re-compile a functions after deoptimization.
|
| + function->shared()->IncrementAndCheckDeoptCount();
|
| } else {
|
| Deoptimizer::DeoptimizeFunction(*function);
|
| }
|
| @@ -8526,11 +8529,11 @@
|
| }
|
|
|
|
|
| -RUNTIME_FUNCTION(MaybeObject*, Runtime_GetOptimizationCount) {
|
| +RUNTIME_FUNCTION(MaybeObject*, Runtime_GetDeoptimizationCount) {
|
| HandleScope scope(isolate);
|
| ASSERT(args.length() == 1);
|
| CONVERT_ARG_CHECKED(JSFunction, function, 0);
|
| - return Smi::FromInt(function->shared()->opt_count());
|
| + return Smi::FromInt(function->shared()->deopt_count());
|
| }
|
|
|
|
|
|
|