Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index ca10394f3279265f07842692a9eaefdb215b60ce..78a88d2c762bc36faa99009e6c482b5ee16e0ff0 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -9324,7 +9324,7 @@ static bool CompileLazyHelper(CompilationInfo* info, |
| ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); |
| ASSERT(!info->isolate()->has_pending_exception()); |
| bool result = Compiler::CompileLazy(info); |
| - ASSERT(result != info->isolate()->has_pending_exception()); |
| + ASSERT(result != Isolate::Current()->has_pending_exception()); |
|
Michael Starzinger
2013/09/09 15:34:44
Please keep using info->isolate() here, Isolate::C
|
| if (!result && flag == CLEAR_EXCEPTION) { |
| info->isolate()->clear_pending_exception(); |
| } |
| @@ -9493,11 +9493,25 @@ bool JSFunction::CompileLazy(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)) { |
| + // TODO(titzer): don't install the OSR code. |
| + // ASSERT(function->code() != *info.code()); |
| + return info.code(); |
| + } else { |
| + return Handle<Code>::null(); |
| + } |
| +} |
| + |
| + |
| bool JSFunction::CompileOptimized(Handle<JSFunction> function, |
| - BailoutId osr_ast_id, |
| ClearExceptionFlag flag) { |
| CompilationInfoWithZone info(function); |
| - info.SetOptimizing(osr_ast_id); |
| + info.SetOptimizing(BailoutId::None()); |
| return CompileLazyHelper(&info, flag); |
| } |