| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 __ bind(&is_nan); | 1197 __ bind(&is_nan); |
| 1198 __ ffree(); | 1198 __ ffree(); |
| 1199 __ fincstp(); | 1199 __ fincstp(); |
| 1200 switch (array_type) { | 1200 switch (array_type) { |
| 1201 case kExternalByteArray: | 1201 case kExternalByteArray: |
| 1202 case kExternalUnsignedByteArray: | 1202 case kExternalUnsignedByteArray: |
| 1203 __ mov_b(Operand(edi, ebx, times_1, 0), 0); | 1203 __ mov_b(Operand(edi, ebx, times_1, 0), 0); |
| 1204 break; | 1204 break; |
| 1205 case kExternalShortArray: | 1205 case kExternalShortArray: |
| 1206 case kExternalUnsignedShortArray: | 1206 case kExternalUnsignedShortArray: |
| 1207 __ xor_(ecx, Operand(ecx)); | 1207 __ Set(ecx, Immediate(0)); |
| 1208 __ mov_w(Operand(edi, ebx, times_2, 0), ecx); | 1208 __ mov_w(Operand(edi, ebx, times_2, 0), ecx); |
| 1209 break; | 1209 break; |
| 1210 case kExternalIntArray: | 1210 case kExternalIntArray: |
| 1211 case kExternalUnsignedIntArray: | 1211 case kExternalUnsignedIntArray: |
| 1212 __ mov(Operand(edi, ebx, times_4, 0), Immediate(0)); | 1212 __ mov(Operand(edi, ebx, times_4, 0), Immediate(0)); |
| 1213 break; | 1213 break; |
| 1214 default: | 1214 default: |
| 1215 UNREACHABLE(); | 1215 UNREACHABLE(); |
| 1216 break; | 1216 break; |
| 1217 } | 1217 } |
| 1218 __ ret(0); // Return the original value. | 1218 __ ret(0); // Return the original value. |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 // Slow case: call runtime. | 1221 // Slow case: call runtime. |
| 1222 __ bind(&slow); | 1222 __ bind(&slow); |
| 1223 GenerateRuntimeSetProperty(masm); | 1223 GenerateRuntimeSetProperty(masm); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 | 1226 |
| 1227 // Defined in ic.cc. | |
| 1228 Object* CallIC_Miss(Arguments args); | |
| 1229 | |
| 1230 // The generated code does not accept smi keys. | 1227 // The generated code does not accept smi keys. |
| 1231 // The generated code falls through if both probes miss. | 1228 // The generated code falls through if both probes miss. |
| 1232 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, | 1229 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, |
| 1233 int argc, | 1230 int argc, |
| 1234 Code::Kind kind) { | 1231 Code::Kind kind) { |
| 1235 // ----------- S t a t e ------------- | 1232 // ----------- S t a t e ------------- |
| 1236 // -- ecx : name | 1233 // -- ecx : name |
| 1237 // -- edx : receiver | 1234 // -- edx : receiver |
| 1238 // ----------------------------------- | 1235 // ----------------------------------- |
| 1239 Label number, non_number, non_string, boolean, probe, miss; | 1236 Label number, non_number, non_string, boolean, probe, miss; |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 // -- esp[0] : return address | 1562 // -- esp[0] : return address |
| 1566 // -- esp[(argc - n) * 4] : arg[n] (zero-based) | 1563 // -- esp[(argc - n) * 4] : arg[n] (zero-based) |
| 1567 // -- ... | 1564 // -- ... |
| 1568 // -- esp[(argc + 1) * 4] : receiver | 1565 // -- esp[(argc + 1) * 4] : receiver |
| 1569 // ----------------------------------- | 1566 // ----------------------------------- |
| 1570 | 1567 |
| 1571 GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss); | 1568 GenerateCallMiss(masm, argc, IC::kKeyedCallIC_Miss); |
| 1572 } | 1569 } |
| 1573 | 1570 |
| 1574 | 1571 |
| 1575 // Defined in ic.cc. | |
| 1576 Object* LoadIC_Miss(Arguments args); | |
| 1577 | |
| 1578 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 1572 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 1579 // ----------- S t a t e ------------- | 1573 // ----------- S t a t e ------------- |
| 1580 // -- eax : receiver | 1574 // -- eax : receiver |
| 1581 // -- ecx : name | 1575 // -- ecx : name |
| 1582 // -- esp[0] : return address | 1576 // -- esp[0] : return address |
| 1583 // ----------------------------------- | 1577 // ----------------------------------- |
| 1584 | 1578 |
| 1585 // Probe the stub cache. | 1579 // Probe the stub cache. |
| 1586 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, | 1580 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, |
| 1587 NOT_IN_LOOP, | 1581 NOT_IN_LOOP, |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { | 1791 bool KeyedLoadIC::PatchInlinedLoad(Address address, Object* map) { |
| 1798 return PatchInlinedMapCheck(address, map); | 1792 return PatchInlinedMapCheck(address, map); |
| 1799 } | 1793 } |
| 1800 | 1794 |
| 1801 | 1795 |
| 1802 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { | 1796 bool KeyedStoreIC::PatchInlinedStore(Address address, Object* map) { |
| 1803 return PatchInlinedMapCheck(address, map); | 1797 return PatchInlinedMapCheck(address, map); |
| 1804 } | 1798 } |
| 1805 | 1799 |
| 1806 | 1800 |
| 1807 // Defined in ic.cc. | |
| 1808 Object* KeyedLoadIC_Miss(Arguments args); | |
| 1809 | |
| 1810 | |
| 1811 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 1801 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
| 1812 // ----------- S t a t e ------------- | 1802 // ----------- S t a t e ------------- |
| 1813 // -- eax : key | 1803 // -- eax : key |
| 1814 // -- edx : receiver | 1804 // -- edx : receiver |
| 1815 // -- esp[0] : return address | 1805 // -- esp[0] : return address |
| 1816 // ----------------------------------- | 1806 // ----------------------------------- |
| 1817 | 1807 |
| 1818 __ IncrementCounter(&Counters::keyed_load_miss, 1); | 1808 __ IncrementCounter(&Counters::keyed_load_miss, 1); |
| 1819 | 1809 |
| 1820 __ pop(ebx); | 1810 __ pop(ebx); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 __ push(edx); | 1974 __ push(edx); |
| 1985 __ push(ecx); | 1975 __ push(ecx); |
| 1986 __ push(eax); | 1976 __ push(eax); |
| 1987 __ push(ebx); | 1977 __ push(ebx); |
| 1988 | 1978 |
| 1989 // Do tail-call to runtime routine. | 1979 // Do tail-call to runtime routine. |
| 1990 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); | 1980 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| 1991 } | 1981 } |
| 1992 | 1982 |
| 1993 | 1983 |
| 1994 // Defined in ic.cc. | |
| 1995 Object* KeyedStoreIC_Miss(Arguments args); | |
| 1996 | |
| 1997 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { | 1984 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
| 1998 // ----------- S t a t e ------------- | 1985 // ----------- S t a t e ------------- |
| 1999 // -- eax : value | 1986 // -- eax : value |
| 2000 // -- ecx : key | 1987 // -- ecx : key |
| 2001 // -- edx : receiver | 1988 // -- edx : receiver |
| 2002 // -- esp[0] : return address | 1989 // -- esp[0] : return address |
| 2003 // ----------------------------------- | 1990 // ----------------------------------- |
| 2004 | 1991 |
| 2005 __ pop(ebx); | 1992 __ pop(ebx); |
| 2006 __ push(edx); | 1993 __ push(edx); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 2116 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 2130 ? not_zero | 2117 ? not_zero |
| 2131 : zero; | 2118 : zero; |
| 2132 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 2119 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 2133 } | 2120 } |
| 2134 | 2121 |
| 2135 | 2122 |
| 2136 } } // namespace v8::internal | 2123 } } // namespace v8::internal |
| 2137 | 2124 |
| 2138 #endif // V8_TARGET_ARCH_IA32 | 2125 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |