Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 2ed6c5386c558d10d23cce2a5d577fea5becc7f5..c7b0c3f09ddd40507cacfa5fa8e7ff1ec4fac62b 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -1297,6 +1297,26 @@ CODE_AGE_LIST(DEFINE_CODE_AGE_BUILTIN_GENERATOR) |
#undef DEFINE_CODE_AGE_BUILTIN_GENERATOR |
+void Builtins::Generate_NotifyICMiss(MacroAssembler* masm) { |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ |
+ // Preserve registers across notification, this is important for compiled |
+ // stubs that tail call the runtime on deopts passing their parameters in |
+ // registers. |
+ __ MultiPush(kJSCallerSaved | kCalleeSaved); |
+ // Pass the function and deoptimization type to the runtime system. |
+ __ CallRuntime(Runtime::kNotifyICMiss, 0); |
+ __ MultiPop(kJSCallerSaved | kCalleeSaved); |
+ } |
+ |
+ __ mov(at, ra); // Stash the miss continuation |
+ __ Addu(sp, sp, Operand(kPointerSize)); // Ignore state |
+ __ pop(ra); // Restore RA to continuation in JSFunction |
+ __ Jump(at); // Jump to miss handler |
+} |
+ |
+ |
static void Generate_NotifyDeoptimizedHelper(MacroAssembler* masm, |
Deoptimizer::BailoutType type) { |
{ |