| 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 r8, | 966 r8, |
| 967 kDontSaveFPRegs, | 967 kDontSaveFPRegs, |
| 968 EMIT_REMEMBERED_SET, | 968 EMIT_REMEMBERED_SET, |
| 969 INLINE_SMI_CHECK); | 969 INLINE_SMI_CHECK); |
| 970 __ Ret(); | 970 __ Ret(); |
| 971 __ bind(&slow); | 971 __ bind(&slow); |
| 972 GenerateMiss(masm); | 972 GenerateMiss(masm); |
| 973 } | 973 } |
| 974 | 974 |
| 975 | 975 |
| 976 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 976 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, |
| 977 ExtraICState extra_state) { |
| 977 // ----------- S t a t e ------------- | 978 // ----------- S t a t e ------------- |
| 978 // -- rax : receiver | 979 // -- rax : receiver |
| 979 // -- rcx : name | 980 // -- rcx : name |
| 980 // -- rsp[0] : return address | 981 // -- rsp[0] : return address |
| 981 // ----------------------------------- | 982 // ----------------------------------- |
| 982 | 983 |
| 983 // Probe the stub cache. | 984 // Probe the stub cache. |
| 984 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); | 985 Code::Flags flags = Code::ComputeFlags( |
| 986 Code::HANDLER, MONOMORPHIC, extra_state, |
| 987 Code::NORMAL, Code::LOAD_IC); |
| 985 masm->isolate()->stub_cache()->GenerateProbe( | 988 masm->isolate()->stub_cache()->GenerateProbe( |
| 986 masm, flags, rax, rcx, rbx, rdx); | 989 masm, flags, rax, rcx, rbx, rdx); |
| 987 | 990 |
| 988 GenerateMiss(masm); | 991 GenerateMiss(masm); |
| 989 } | 992 } |
| 990 | 993 |
| 991 | 994 |
| 992 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 995 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 993 // ----------- S t a t e ------------- | 996 // ----------- S t a t e ------------- |
| 994 // -- rax : receiver | 997 // -- rax : receiver |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 __ PopReturnAddressTo(rbx); | 1084 __ PopReturnAddressTo(rbx); |
| 1082 __ push(rdx); // receiver | 1085 __ push(rdx); // receiver |
| 1083 __ push(rax); // name | 1086 __ push(rax); // name |
| 1084 __ PushReturnAddressFrom(rbx); | 1087 __ PushReturnAddressFrom(rbx); |
| 1085 | 1088 |
| 1086 // Perform tail call to the entry. | 1089 // Perform tail call to the entry. |
| 1087 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1090 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 1088 } | 1091 } |
| 1089 | 1092 |
| 1090 | 1093 |
| 1091 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1094 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| 1095 ExtraICState extra_ic_state) { |
| 1092 // ----------- S t a t e ------------- | 1096 // ----------- S t a t e ------------- |
| 1093 // -- rax : value | 1097 // -- rax : value |
| 1094 // -- rcx : name | 1098 // -- rcx : name |
| 1095 // -- rdx : receiver | 1099 // -- rdx : receiver |
| 1096 // -- rsp[0] : return address | 1100 // -- rsp[0] : return address |
| 1097 // ----------------------------------- | 1101 // ----------------------------------- |
| 1098 | 1102 |
| 1099 // Get the receiver from the stack and probe the stub cache. | 1103 // Get the receiver from the stack and probe the stub cache. |
| 1100 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 1104 Code::Flags flags = Code::ComputeFlags( |
| 1105 Code::HANDLER, MONOMORPHIC, extra_ic_state, |
| 1106 Code::NORMAL, Code::STORE_IC); |
| 1101 masm->isolate()->stub_cache()->GenerateProbe( | 1107 masm->isolate()->stub_cache()->GenerateProbe( |
| 1102 masm, flags, rdx, rcx, rbx, no_reg); | 1108 masm, flags, rdx, rcx, rbx, no_reg); |
| 1103 | 1109 |
| 1104 // Cache miss: Jump to runtime. | 1110 // Cache miss: Jump to runtime. |
| 1105 GenerateMiss(masm); | 1111 GenerateMiss(masm); |
| 1106 } | 1112 } |
| 1107 | 1113 |
| 1108 | 1114 |
| 1109 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 1115 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 1110 // ----------- S t a t e ------------- | 1116 // ----------- S t a t e ------------- |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1327 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
| 1322 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1328 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1323 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1329 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1324 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1330 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1325 } | 1331 } |
| 1326 | 1332 |
| 1327 | 1333 |
| 1328 } } // namespace v8::internal | 1334 } } // namespace v8::internal |
| 1329 | 1335 |
| 1330 #endif // V8_TARGET_ARCH_X64 | 1336 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |