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= R=plind44@gmail.com Review URL: https://codereview.chromium.org/196423018 Patch from Balazs Kilvady <kilvadyb@homejinni.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
037e981939
commit
9337a45ab3
@ -4817,6 +4817,23 @@ void MacroAssembler::AssertName(Register 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) {
|
||||
if (emit_debug_code()) {
|
||||
ASSERT(!reg.is(at));
|
||||
|
@ -1432,6 +1432,10 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user