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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 | 1120 |
1121 GenerateDictionaryLoad(masm, &slow_load, rbx, rcx, rax, rdi, rdi); | 1121 GenerateDictionaryLoad(masm, &slow_load, rbx, rcx, rax, rdi, rdi); |
1122 __ IncrementCounter(counters->keyed_call_generic_lookup_dict(), 1); | 1122 __ IncrementCounter(counters->keyed_call_generic_lookup_dict(), 1); |
1123 __ jmp(&do_call); | 1123 __ jmp(&do_call); |
1124 | 1124 |
1125 __ bind(&lookup_monomorphic_cache); | 1125 __ bind(&lookup_monomorphic_cache); |
1126 __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1); | 1126 __ IncrementCounter(counters->keyed_call_generic_lookup_cache(), 1); |
1127 GenerateMonomorphicCacheProbe(masm, | 1127 GenerateMonomorphicCacheProbe(masm, |
1128 argc, | 1128 argc, |
1129 Code::KEYED_CALL_IC, | 1129 Code::KEYED_CALL_IC, |
1130 Code::kNoExtraICState); | 1130 IC::kNoExtraICState); |
1131 // Fall through on miss. | 1131 // Fall through on miss. |
1132 | 1132 |
1133 __ bind(&slow_call); | 1133 __ bind(&slow_call); |
1134 // This branch is taken if: | 1134 // This branch is taken if: |
1135 // - the receiver requires boxing or access check, | 1135 // - the receiver requires boxing or access check, |
1136 // - the key is neither smi nor a unique name, | 1136 // - the key is neither smi nor a unique name, |
1137 // - the value loaded is not a function, | 1137 // - the value loaded is not a function, |
1138 // - there is hope that the runtime will create a monomorphic call stub | 1138 // - there is hope that the runtime will create a monomorphic call stub |
1139 // that will get fetched next time. | 1139 // that will get fetched next time. |
1140 __ IncrementCounter(counters->keyed_call_generic_slow(), 1); | 1140 __ IncrementCounter(counters->keyed_call_generic_slow(), 1); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 | 1347 |
1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
1349 // ----------- S t a t e ------------- | 1349 // ----------- S t a t e ------------- |
1350 // -- rax : receiver | 1350 // -- rax : receiver |
1351 // -- rcx : name | 1351 // -- rcx : name |
1352 // -- rsp[0] : return address | 1352 // -- rsp[0] : return address |
1353 // ----------------------------------- | 1353 // ----------------------------------- |
1354 | 1354 |
1355 // Probe the stub cache. | 1355 // Probe the stub cache. |
1356 Code::Flags flags = Code::ComputeFlags( | 1356 Code::Flags flags = Code::ComputeFlags( |
1357 Code::HANDLER, MONOMORPHIC, Code::kNoExtraICState, | 1357 Code::HANDLER, MONOMORPHIC, IC::kNoExtraICState, |
1358 Code::NORMAL, Code::LOAD_IC); | 1358 Code::NORMAL, Code::LOAD_IC); |
1359 masm->isolate()->stub_cache()->GenerateProbe( | 1359 masm->isolate()->stub_cache()->GenerateProbe( |
1360 masm, flags, rax, rcx, rbx, rdx); | 1360 masm, flags, rax, rcx, rbx, rdx); |
1361 | 1361 |
1362 GenerateMiss(masm); | 1362 GenerateMiss(masm); |
1363 } | 1363 } |
1364 | 1364 |
1365 | 1365 |
1366 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 1366 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
1367 // ----------- S t a t e ------------- | 1367 // ----------- S t a t e ------------- |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1702 } | 1702 } |
1703 | 1703 |
1704 | 1704 |
1705 } } // namespace v8::internal | 1705 } } // namespace v8::internal |
1706 | 1706 |
1707 #endif // V8_TARGET_ARCH_X64 | 1707 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |