OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1889 __ PrepareCallCFunction(2, scratch); | 1889 __ PrepareCallCFunction(2, scratch); |
1890 __ mov(Operand(esp, 0), object); | 1890 __ mov(Operand(esp, 0), object); |
1891 __ mov(Operand(esp, 1 * kPointerSize), Immediate(index)); | 1891 __ mov(Operand(esp, 1 * kPointerSize), Immediate(index)); |
1892 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); | 1892 __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2); |
1893 __ bind(&done); | 1893 __ bind(&done); |
1894 } | 1894 } |
1895 } | 1895 } |
1896 | 1896 |
1897 | 1897 |
1898 void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { | 1898 void LCodeGen::DoSeqStringSetChar(LSeqStringSetChar* instr) { |
1899 SeqStringSetCharGenerator::Generate(masm(), | 1899 Register string = ToRegister(instr->string()); |
1900 instr->encoding(), | 1900 Register index = ToRegister(instr->index()); |
1901 ToRegister(instr->string()), | 1901 Register value = ToRegister(instr->value()); |
1902 ToRegister(instr->index()), | 1902 String::Encoding encoding = instr->encoding(); |
1903 ToRegister(instr->value())); | 1903 |
| 1904 if (FLAG_debug_code) { |
| 1905 __ push(value); |
| 1906 __ mov(value, FieldOperand(string, HeapObject::kMapOffset)); |
| 1907 __ movzx_b(value, FieldOperand(value, Map::kInstanceTypeOffset)); |
| 1908 |
| 1909 __ and_(value, Immediate(kStringRepresentationMask | kStringEncodingMask)); |
| 1910 static const uint32_t one_byte_seq_type = kSeqStringTag | kOneByteStringTag; |
| 1911 static const uint32_t two_byte_seq_type = kSeqStringTag | kTwoByteStringTag; |
| 1912 __ cmp(value, Immediate(encoding == String::ONE_BYTE_ENCODING |
| 1913 ? one_byte_seq_type : two_byte_seq_type)); |
| 1914 __ Check(equal, "Unexpected string type"); |
| 1915 __ pop(value); |
| 1916 } |
| 1917 |
| 1918 if (encoding == String::ONE_BYTE_ENCODING) { |
| 1919 __ mov_b(FieldOperand(string, index, times_1, SeqString::kHeaderSize), |
| 1920 value); |
| 1921 } else { |
| 1922 __ mov_w(FieldOperand(string, index, times_2, SeqString::kHeaderSize), |
| 1923 value); |
| 1924 } |
1904 } | 1925 } |
1905 | 1926 |
1906 | 1927 |
1907 void LCodeGen::DoBitNotI(LBitNotI* instr) { | 1928 void LCodeGen::DoBitNotI(LBitNotI* instr) { |
1908 LOperand* input = instr->value(); | 1929 LOperand* input = instr->value(); |
1909 ASSERT(input->Equals(instr->result())); | 1930 ASSERT(input->Equals(instr->result())); |
1910 __ not_(ToRegister(input)); | 1931 __ not_(ToRegister(input)); |
1911 } | 1932 } |
1912 | 1933 |
1913 | 1934 |
(...skipping 4613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6527 FixedArray::kHeaderSize - kPointerSize)); | 6548 FixedArray::kHeaderSize - kPointerSize)); |
6528 __ bind(&done); | 6549 __ bind(&done); |
6529 } | 6550 } |
6530 | 6551 |
6531 | 6552 |
6532 #undef __ | 6553 #undef __ |
6533 | 6554 |
6534 } } // namespace v8::internal | 6555 } } // namespace v8::internal |
6535 | 6556 |
6536 #endif // V8_TARGET_ARCH_IA32 | 6557 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |