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