Revision: 17070
Author:   [email protected]
Date:     Wed Oct  2 11:25:06 2013 UTC
Log:      MIPS: Allow function inlining with context change.

Port r17019 (cd4b69cd)

BUG=
[email protected], [email protected]

Review URL: https://codereview.chromium.org/25622003
http://code.google.com/p/v8/source/detail?r=17070

Modified:
 /branches/bleeding_edge/src/hydrogen.cc
 /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Tue Oct  1 18:00:02 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc     Wed Oct  2 11:25:06 2013 UTC
@@ -6366,7 +6366,7 @@
     return false;
   }

-#if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM
+#if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS
   // Target must be able to use caller's context.
   CompilationInfo* outer_info = current_info();
   if (target->context() != outer_info->closure()->context() ||
@@ -6515,9 +6515,9 @@
                                      undefined,
                                      function_state()->inlining_kind(),
                                      undefined_receiver);
-#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM
- // IA32 and ARM only, overwrite the caller's context in the deoptimization
-  // environment with the correct one.
+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
+  // IA32, ARM and MIPS only, overwrite the caller's context in the
+  // deoptimization environment with the correct one.
   //
   // TODO(kmillikin): implement the same inlining on other platforms so we
   // can remove the unsightly ifdefs in this function.
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Oct 1 21:01:25 2013 UTC +++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Oct 2 11:25:06 2013 UTC
@@ -732,6 +732,10 @@
     __ Move(cp, ToRegister(context));
   } else if (context->IsStackSlot()) {
     __ lw(cp, ToMemOperand(context));
+  } else if (context->IsConstantOperand()) {
+    HConstant* constant =
+        chunk_->LookupConstant(LConstantOperand::cast(context));
+    __ LoadObject(cp, Handle<Object>::cast(constant->handle(isolate())));
   } else {
     UNREACHABLE();
   }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to