| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1503     __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 1503     __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); | 
| 1504   } else { | 1504   } else { | 
| 1505     Register size = ToRegister32(instr->size()); | 1505     Register size = ToRegister32(instr->size()); | 
| 1506     __ Sxtw(size.X(), size); | 1506     __ Sxtw(size.X(), size); | 
| 1507     __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); | 1507     __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); | 
| 1508   } | 1508   } | 
| 1509 | 1509 | 
| 1510   __ Bind(deferred->exit()); | 1510   __ Bind(deferred->exit()); | 
| 1511 | 1511 | 
| 1512   if (instr->hydrogen()->MustPrefillWithFiller()) { | 1512   if (instr->hydrogen()->MustPrefillWithFiller()) { | 
|  | 1513     Register filler_count = temp1; | 
|  | 1514     Register filler = temp2; | 
|  | 1515     Register untagged_result = ToRegister(instr->temp3()); | 
|  | 1516 | 
| 1513     if (instr->size()->IsConstantOperand()) { | 1517     if (instr->size()->IsConstantOperand()) { | 
| 1514       int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 1518       int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 
| 1515       __ Mov(temp1, size - kPointerSize); | 1519       __ Mov(filler_count, size / kPointerSize); | 
| 1516     } else { | 1520     } else { | 
| 1517       __ Sub(temp1.W(), ToRegister32(instr->size()), kPointerSize); | 1521       __ Lsr(filler_count.W(), ToRegister32(instr->size()), kPointerSizeLog2); | 
| 1518     } | 1522     } | 
| 1519     __ Sub(result, result, kHeapObjectTag); |  | 
| 1520 | 1523 | 
| 1521     // TODO(jbramley): Optimize this loop using stp. | 1524     __ Sub(untagged_result, result, kHeapObjectTag); | 
| 1522     Label loop; | 1525     __ Mov(filler, Operand(isolate()->factory()->one_pointer_filler_map())); | 
| 1523     __ Bind(&loop); | 1526     __ FillFields(untagged_result, filler_count, filler); | 
| 1524     __ Mov(temp2, Operand(isolate()->factory()->one_pointer_filler_map())); | 1527   } else { | 
| 1525     __ Str(temp2, MemOperand(result, temp1)); | 1528     ASSERT(instr->temp3() == NULL); | 
| 1526     __ Subs(temp1, temp1, kPointerSize); |  | 
| 1527     __ B(ge, &loop); |  | 
| 1528 |  | 
| 1529     __ Add(result, result, kHeapObjectTag); |  | 
| 1530   } | 1529   } | 
| 1531 } | 1530 } | 
| 1532 | 1531 | 
| 1533 | 1532 | 
| 1534 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 1533 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 
| 1535   // TODO(3095996): Get rid of this. For now, we need to make the | 1534   // TODO(3095996): Get rid of this. For now, we need to make the | 
| 1536   // result register contain a valid pointer because it is already | 1535   // result register contain a valid pointer because it is already | 
| 1537   // contained in the register pointer map. | 1536   // contained in the register pointer map. | 
| 1538   __ Mov(ToRegister(instr->result()), Operand(Smi::FromInt(0))); | 1537   __ Mov(ToRegister(instr->result()), Operand(Smi::FromInt(0))); | 
| 1539 | 1538 | 
| (...skipping 4305 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5845   __ Bind(&out_of_object); | 5844   __ Bind(&out_of_object); | 
| 5846   __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5845   __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 
| 5847   // Index is equal to negated out of object property index plus 1. | 5846   // Index is equal to negated out of object property index plus 1. | 
| 5848   __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5847   __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 
| 5849   __ Ldr(result, FieldMemOperand(result, | 5848   __ Ldr(result, FieldMemOperand(result, | 
| 5850                                  FixedArray::kHeaderSize - kPointerSize)); | 5849                                  FixedArray::kHeaderSize - kPointerSize)); | 
| 5851   __ Bind(&done); | 5850   __ Bind(&done); | 
| 5852 } | 5851 } | 
| 5853 | 5852 | 
| 5854 } }  // namespace v8::internal | 5853 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|