| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 Code::Kind kind, | 825 Code::Kind kind, |
| 826 Code::ExtraICState extra_ic_state) { | 826 Code::ExtraICState extra_ic_state) { |
| 827 // ----------- S t a t e ------------- | 827 // ----------- S t a t e ------------- |
| 828 // -- ecx : name | 828 // -- ecx : name |
| 829 // -- edx : receiver | 829 // -- edx : receiver |
| 830 // ----------------------------------- | 830 // ----------------------------------- |
| 831 Label number, non_number, non_string, boolean, probe, miss; | 831 Label number, non_number, non_string, boolean, probe, miss; |
| 832 | 832 |
| 833 // Probe the stub cache. | 833 // Probe the stub cache. |
| 834 Code::Flags flags = Code::ComputeFlags(kind, | 834 Code::Flags flags = Code::ComputeFlags(kind, |
| 835 NOT_IN_LOOP, | |
| 836 MONOMORPHIC, | 835 MONOMORPHIC, |
| 837 extra_ic_state, | 836 extra_ic_state, |
| 838 NORMAL, | 837 NORMAL, |
| 839 argc); | 838 argc); |
| 840 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx, | 839 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx, |
| 841 eax); | 840 eax); |
| 842 | 841 |
| 843 // If the stub cache probing failed, the receiver might be a value. | 842 // If the stub cache probing failed, the receiver might be a value. |
| 844 // For value objects, we use the map of the prototype objects for | 843 // For value objects, we use the map of the prototype objects for |
| 845 // the corresponding JSValue for the cache and that is what we need | 844 // the corresponding JSValue for the cache and that is what we need |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1229 |
| 1231 | 1230 |
| 1232 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 1231 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 1233 // ----------- S t a t e ------------- | 1232 // ----------- S t a t e ------------- |
| 1234 // -- eax : receiver | 1233 // -- eax : receiver |
| 1235 // -- ecx : name | 1234 // -- ecx : name |
| 1236 // -- esp[0] : return address | 1235 // -- esp[0] : return address |
| 1237 // ----------------------------------- | 1236 // ----------------------------------- |
| 1238 | 1237 |
| 1239 // Probe the stub cache. | 1238 // Probe the stub cache. |
| 1240 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, | 1239 Code::Flags flags = Code::ComputeFlags(Code::LOAD_IC, MONOMORPHIC); |
| 1241 NOT_IN_LOOP, | |
| 1242 MONOMORPHIC); | |
| 1243 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, eax, ecx, ebx, | 1240 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, eax, ecx, ebx, |
| 1244 edx); | 1241 edx); |
| 1245 | 1242 |
| 1246 // Cache miss: Jump to runtime. | 1243 // Cache miss: Jump to runtime. |
| 1247 GenerateMiss(masm); | 1244 GenerateMiss(masm); |
| 1248 } | 1245 } |
| 1249 | 1246 |
| 1250 | 1247 |
| 1251 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 1248 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 1252 // ----------- S t a t e ------------- | 1249 // ----------- S t a t e ------------- |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 | 1329 |
| 1333 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1330 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1334 StrictModeFlag strict_mode) { | 1331 StrictModeFlag strict_mode) { |
| 1335 // ----------- S t a t e ------------- | 1332 // ----------- S t a t e ------------- |
| 1336 // -- eax : value | 1333 // -- eax : value |
| 1337 // -- ecx : name | 1334 // -- ecx : name |
| 1338 // -- edx : receiver | 1335 // -- edx : receiver |
| 1339 // -- esp[0] : return address | 1336 // -- esp[0] : return address |
| 1340 // ----------------------------------- | 1337 // ----------------------------------- |
| 1341 | 1338 |
| 1342 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, | 1339 Code::Flags flags = |
| 1343 NOT_IN_LOOP, | 1340 Code::ComputeFlags(Code::STORE_IC, MONOMORPHIC, strict_mode); |
| 1344 MONOMORPHIC, | |
| 1345 strict_mode); | |
| 1346 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx, | 1341 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, edx, ecx, ebx, |
| 1347 no_reg); | 1342 no_reg); |
| 1348 | 1343 |
| 1349 // Cache miss: Jump to runtime. | 1344 // Cache miss: Jump to runtime. |
| 1350 GenerateMiss(masm); | 1345 GenerateMiss(masm); |
| 1351 } | 1346 } |
| 1352 | 1347 |
| 1353 | 1348 |
| 1354 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1349 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1355 // ----------- S t a t e ------------- | 1350 // ----------- S t a t e ------------- |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1632 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1638 ? not_zero | 1633 ? not_zero |
| 1639 : zero; | 1634 : zero; |
| 1640 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1635 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1641 } | 1636 } |
| 1642 | 1637 |
| 1643 | 1638 |
| 1644 } } // namespace v8::internal | 1639 } } // namespace v8::internal |
| 1645 | 1640 |
| 1646 #endif // V8_TARGET_ARCH_IA32 | 1641 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |