Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 10fdc2435bab9e199057a2282ea5140e8c280e36..81db6b32fbaa011008f338a0b00f5b1728934416 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -3316,97 +3316,6 @@ void FullCodeGenerator::EmitIsSimdValue(CallRuntime* expr) { |
} |
-void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
- CallRuntime* expr) { |
- ZoneList<Expression*>* args = expr->arguments(); |
- DCHECK(args->length() == 1); |
- |
- VisitForAccumulatorValue(args->at(0)); |
- |
- Label materialize_true, materialize_false, skip_lookup; |
- Label* if_true = NULL; |
- Label* if_false = NULL; |
- Label* fall_through = NULL; |
- context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
- &if_false, &fall_through); |
- |
- __ AssertNotSmi(r3); |
- |
- __ LoadP(r4, FieldMemOperand(r3, HeapObject::kMapOffset)); |
- __ lbz(ip, FieldMemOperand(r4, Map::kBitField2Offset)); |
- __ andi(r0, ip, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); |
- __ bne(&skip_lookup, cr0); |
- |
- // Check for fast case object. Generate false result for slow case object. |
- __ LoadP(r5, FieldMemOperand(r3, JSObject::kPropertiesOffset)); |
- __ LoadP(r5, FieldMemOperand(r5, HeapObject::kMapOffset)); |
- __ LoadRoot(ip, Heap::kHashTableMapRootIndex); |
- __ cmp(r5, ip); |
- __ beq(if_false); |
- |
- // Look for valueOf name in the descriptor array, and indicate false if |
- // found. Since we omit an enumeration index check, if it is added via a |
- // transition that shares its descriptor array, this is a false positive. |
- Label entry, loop, done; |
- |
- // Skip loop if no descriptors are valid. |
- __ NumberOfOwnDescriptors(r6, r4); |
- __ cmpi(r6, Operand::Zero()); |
- __ beq(&done); |
- |
- __ LoadInstanceDescriptors(r4, r7); |
- // r7: descriptor array. |
- // r6: valid entries in the descriptor array. |
- __ mov(ip, Operand(DescriptorArray::kDescriptorSize)); |
- __ Mul(r6, r6, ip); |
- // Calculate location of the first key name. |
- __ addi(r7, r7, Operand(DescriptorArray::kFirstOffset - kHeapObjectTag)); |
- // Calculate the end of the descriptor array. |
- __ mr(r5, r7); |
- __ ShiftLeftImm(ip, r6, Operand(kPointerSizeLog2)); |
- __ add(r5, r5, ip); |
- |
- // Loop through all the keys in the descriptor array. If one of these is the |
- // string "valueOf" the result is false. |
- // The use of ip to store the valueOf string assumes that it is not otherwise |
- // used in the loop below. |
- __ LoadRoot(ip, Heap::kvalueOf_stringRootIndex); |
- __ b(&entry); |
- __ bind(&loop); |
- __ LoadP(r6, MemOperand(r7, 0)); |
- __ cmp(r6, ip); |
- __ beq(if_false); |
- __ addi(r7, r7, Operand(DescriptorArray::kDescriptorSize * kPointerSize)); |
- __ bind(&entry); |
- __ cmp(r7, r5); |
- __ bne(&loop); |
- |
- __ bind(&done); |
- |
- // Set the bit in the map to indicate that there is no local valueOf field. |
- __ lbz(r5, FieldMemOperand(r4, Map::kBitField2Offset)); |
- __ ori(r5, r5, Operand(1 << Map::kStringWrapperSafeForDefaultValueOf)); |
- __ stb(r5, FieldMemOperand(r4, Map::kBitField2Offset)); |
- |
- __ bind(&skip_lookup); |
- |
- // If a valueOf property is not found on the object check that its |
- // prototype is the un-modified String prototype. If not result is false. |
- __ LoadP(r5, FieldMemOperand(r4, Map::kPrototypeOffset)); |
- __ JumpIfSmi(r5, if_false); |
- __ LoadP(r5, FieldMemOperand(r5, HeapObject::kMapOffset)); |
- __ LoadP(r6, ContextOperand(cp, Context::GLOBAL_OBJECT_INDEX)); |
- __ LoadP(r6, FieldMemOperand(r6, GlobalObject::kNativeContextOffset)); |
- __ LoadP(r6, |
- ContextOperand(r6, Context::STRING_FUNCTION_PROTOTYPE_MAP_INDEX)); |
- __ cmp(r5, r6); |
- PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
- Split(eq, if_true, if_false, fall_through); |
- |
- context()->Plug(if_true, if_false); |
-} |
- |
- |
void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |