| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 1fdd478b7f9f55f9a237afbb2d605b706464eead..f9002d73eb8f5ee1967ca09bcc1627e2e8be52d1 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -9464,11 +9464,24 @@ bool JSFunction::CompileLazy(Handle<JSFunction> function,
|
| }
|
|
|
|
|
| -bool JSFunction::CompileOptimized(Handle<JSFunction> function,
|
| +Handle<Code> JSFunction::CompileOsr(Handle<JSFunction> function,
|
| BailoutId osr_ast_id,
|
| ClearExceptionFlag flag) {
|
| CompilationInfoWithZone info(function);
|
| info.SetOptimizing(osr_ast_id);
|
| + if (CompileLazyHelper(&info, flag)) {
|
| + ASSERT(function->code() != *info.code());
|
| + return info.code();
|
| + } else {
|
| + return Handle<Code>::null();
|
| + }
|
| +}
|
| +
|
| +
|
| +bool JSFunction::CompileOptimized(Handle<JSFunction> function,
|
| + ClearExceptionFlag flag) {
|
| + CompilationInfoWithZone info(function);
|
| + info.SetOptimizing(BailoutId::None());
|
| return CompileLazyHelper(&info, flag);
|
| }
|
|
|
|
|