Revision: 20014
Author:   [email protected]
Date:     Mon Mar 17 18:27:44 2014 UTC
Log:      MIPS: Utility functions for pretenure call new.

Port r19998 (6b07a42)

Original commit message:
These functions aren't yet called in the tree but will be in the next days. AssertUndefinedOrAllocationSite is to be used in several places where AllocationSite feedback is optional.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/196423018

Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=20014

Modified:
 /branches/bleeding_edge/src/mips/macro-assembler-mips.cc
 /branches/bleeding_edge/src/mips/macro-assembler-mips.h

=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Mar 10 19:50:36 2014 UTC +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Mar 17 18:27:44 2014 UTC
@@ -4815,6 +4815,23 @@
     pop(object);
   }
 }
+
+
+void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
+                                                     Register scratch) {
+  if (emit_debug_code()) {
+    Label done_checking;
+    AssertNotSmi(object);
+    LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
+    Branch(&done_checking, eq, object, Operand(scratch));
+    push(object);
+    lw(object, FieldMemOperand(object, HeapObject::kMapOffset));
+    LoadRoot(scratch, Heap::kAllocationSiteMapRootIndex);
+    Assert(eq, kExpectedUndefinedOrCell, object, Operand(scratch));
+    pop(object);
+    bind(&done_checking);
+  }
+}


void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Mon Mar 10 19:50:36 2014 UTC +++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Mon Mar 17 18:27:44 2014 UTC
@@ -1432,6 +1432,10 @@
   // Abort execution if argument is not a name, enabled via --debug-code.
   void AssertName(Register object);

+ // Abort execution if argument is not undefined or an AllocationSite, enabled
+  // via --debug-code.
+  void AssertUndefinedOrAllocationSite(Register object, Register scratch);
+
   // Abort execution if reg is not the root value with the given index,
   // enabled via --debug-code.
   void AssertIsRoot(Register reg, Heap::RootListIndex index);

--
--
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/d/optout.

Reply via email to