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 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1659 __ movq(arg_reg_1, object); | 1659 __ movq(arg_reg_1, object); |
1660 __ movq(arg_reg_2, index, RelocInfo::NONE64); | 1660 __ movq(arg_reg_2, index, RelocInfo::NONE64); |
1661 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); | 1661 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); |
1662 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 1662 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
1663 __ bind(&done); | 1663 __ bind(&done); |
1664 } | 1664 } |
1665 } | 1665 } |
1666 | 1666 |
1667 | 1667 |
1668 void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { | 1668 void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { |
1669 SeqStringSetCharGenerator::Generate(masm(), | 1669 Register string = ToRegister(instr->string()); |
1670 instr->encoding(), | 1670 Register index = ToRegister(instr->index()); |
1671 ToRegister(instr->string()), | 1671 Register value = ToRegister(instr->value()); |
1672 ToRegister(instr->index()), | 1672 String::Encoding encoding = instr->encoding(); |
1673 ToRegister(instr->value())); | 1673 |
1674 if (FLAG_debug_code) { | |
1675 __ push(value); | |
1676 __ movq(value, FieldOperand(string, HeapObject::kMapOffset)); | |
1677 __ movzxbq(value, FieldOperand(value, Map::kInstanceTypeOffset)); | |
1678 | |
1679 __ andb(value, Immediate(kStringRepresentationMask | kStringEncodingMask)); | |
1680 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; | |
1681 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; | |
1682 __ cmpq(value, Immediate(encoding == String::ONE_BYTE_ENCODING | |
1683 ? one_byte_seq_type : two_byte_seq_type)); | |
1684 __ Check(equal, "Unexpected string type"); | |
1685 __ pop(value); | |
1686 } | |
1687 | |
1688 __ SmiToInteger32(value, value); | |
Jakob Kummerow
2013/05/23 09:35:45
No.
| |
1689 __ SmiToInteger32(index, index); | |
Jakob Kummerow
2013/05/23 09:35:45
No, no, no.
| |
1690 if (encoding == String::ONE_BYTE_ENCODING) { | |
1691 __ movb(FieldOperand(string, index, times_1, SeqString::kHeaderSize), | |
1692 value); | |
1693 } else { | |
1694 __ movw(FieldOperand(string, index, times_2, SeqString::kHeaderSize), | |
1695 value); | |
1696 } | |
1674 } | 1697 } |
1675 | 1698 |
1676 | 1699 |
1677 void LCodeGen::DoBitNotI(LBitNotI* instr) { | 1700 void LCodeGen::DoBitNotI(LBitNotI* instr) { |
1678 LOperand* input = instr->value(); | 1701 LOperand* input = instr->value(); |
1679 ASSERT(input->Equals(instr->result())); | 1702 ASSERT(input->Equals(instr->result())); |
1680 __ not_(ToRegister(input)); | 1703 __ not_(ToRegister(input)); |
1681 } | 1704 } |
1682 | 1705 |
1683 | 1706 |
(...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5620 FixedArray::kHeaderSize - kPointerSize)); | 5643 FixedArray::kHeaderSize - kPointerSize)); |
5621 __ bind(&done); | 5644 __ bind(&done); |
5622 } | 5645 } |
5623 | 5646 |
5624 | 5647 |
5625 #undef __ | 5648 #undef __ |
5626 | 5649 |
5627 } } // namespace v8::internal | 5650 } } // namespace v8::internal |
5628 | 5651 |
5629 #endif // V8_TARGET_ARCH_X64 | 5652 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |