| Index: src/x64/builtins-x64.cc | 
| diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc | 
| index 33a11e3902494ba69decf931524367fbd6534d04..06fd59468dbc5b437538a0c0703e4a3384a786e7 100644 | 
| --- a/src/x64/builtins-x64.cc | 
| +++ b/src/x64/builtins-x64.cc | 
| @@ -810,29 +810,7 @@ void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { | 
| } | 
|  | 
|  | 
| -static void Generate_InterpreterNotifyDeoptimizedHelper( | 
| -    MacroAssembler* masm, Deoptimizer::BailoutType type) { | 
| -  // Enter an internal frame. | 
| -  { | 
| -    FrameScope scope(masm, StackFrame::INTERNAL); | 
| -    __ Push(kInterpreterAccumulatorRegister);  // Save accumulator register. | 
| - | 
| -    // Pass the deoptimization type to the runtime system. | 
| -    __ Push(Smi::FromInt(static_cast<int>(type))); | 
| - | 
| -    __ CallRuntime(Runtime::kNotifyDeoptimized); | 
| - | 
| -    __ Pop(kInterpreterAccumulatorRegister);  // Restore accumulator register. | 
| -    // Tear down internal frame. | 
| -  } | 
| - | 
| -  // Drop state (we don't use these for interpreter deopts) and push PC at top | 
| -  // of stack (to simulate initial call to bytecode handler in interpreter entry | 
| -  // trampoline). | 
| -  __ Pop(rbx); | 
| -  __ Drop(1); | 
| -  __ Push(rbx); | 
| - | 
| +static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { | 
| // Initialize register file register and dispatch table register. | 
| __ movp(kInterpreterRegisterFileRegister, rbp); | 
| __ addp(kInterpreterRegisterFileRegister, | 
| @@ -883,6 +861,34 @@ static void Generate_InterpreterNotifyDeoptimizedHelper( | 
| } | 
|  | 
|  | 
| +static void Generate_InterpreterNotifyDeoptimizedHelper( | 
| +    MacroAssembler* masm, Deoptimizer::BailoutType type) { | 
| +  // Enter an internal frame. | 
| +  { | 
| +    FrameScope scope(masm, StackFrame::INTERNAL); | 
| +    __ Push(kInterpreterAccumulatorRegister);  // Save accumulator register. | 
| + | 
| +    // Pass the deoptimization type to the runtime system. | 
| +    __ Push(Smi::FromInt(static_cast<int>(type))); | 
| + | 
| +    __ CallRuntime(Runtime::kNotifyDeoptimized); | 
| + | 
| +    __ Pop(kInterpreterAccumulatorRegister);  // Restore accumulator register. | 
| +    // Tear down internal frame. | 
| +  } | 
| + | 
| +  // Drop state (we don't use these for interpreter deopts) and push PC at top | 
| +  // of stack (to simulate initial call to bytecode handler in interpreter entry | 
| +  // trampoline). | 
| +  __ Pop(rbx); | 
| +  __ Drop(1); | 
| +  __ Push(rbx); | 
| + | 
| +  // Enter the bytecode dispatch. | 
| +  Generate_EnterBytecodeDispatch(masm); | 
| +} | 
| + | 
| + | 
| void Builtins::Generate_InterpreterNotifyDeoptimized(MacroAssembler* masm) { | 
| Generate_InterpreterNotifyDeoptimizedHelper(masm, Deoptimizer::EAGER); | 
| } | 
| @@ -898,6 +904,11 @@ void Builtins::Generate_InterpreterNotifyLazyDeoptimized(MacroAssembler* masm) { | 
| } | 
|  | 
|  | 
| +void Builtins::Generate_InterpreterEnterExceptionHandler(MacroAssembler* masm) { | 
| +  Generate_EnterBytecodeDispatch(masm); | 
| +} | 
| + | 
| + | 
| void Builtins::Generate_CompileLazy(MacroAssembler* masm) { | 
| CallRuntimePassFunction(masm, Runtime::kCompileLazy); | 
| GenerateTailCallToReturnedCode(masm); | 
|  |