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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 rdi, | 727 rdi, |
728 slow); | 728 slow); |
729 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 729 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
730 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); | 730 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); |
731 __ movp(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); | 731 __ movp(rbx, FieldOperand(rdx, JSObject::kElementsOffset)); |
732 __ jmp(&finish_object_store); | 732 __ jmp(&finish_object_store); |
733 } | 733 } |
734 | 734 |
735 | 735 |
736 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, | 736 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
737 StrictModeFlag strict_mode) { | 737 StrictMode strict_mode) { |
738 // ----------- S t a t e ------------- | 738 // ----------- S t a t e ------------- |
739 // -- rax : value | 739 // -- rax : value |
740 // -- rcx : key | 740 // -- rcx : key |
741 // -- rdx : receiver | 741 // -- rdx : receiver |
742 // -- rsp[0] : return address | 742 // -- rsp[0] : return address |
743 // ----------------------------------- | 743 // ----------------------------------- |
744 Label slow, slow_with_tagged_index, fast_object, fast_object_grow; | 744 Label slow, slow_with_tagged_index, fast_object, fast_object_grow; |
745 Label fast_double, fast_double_grow; | 745 Label fast_double, fast_double_grow; |
746 Label array, extra, check_if_double_array; | 746 Label array, extra, check_if_double_array; |
747 | 747 |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 __ IncrementCounter(counters->store_normal_hit(), 1); | 1144 __ IncrementCounter(counters->store_normal_hit(), 1); |
1145 __ ret(0); | 1145 __ ret(0); |
1146 | 1146 |
1147 __ bind(&miss); | 1147 __ bind(&miss); |
1148 __ IncrementCounter(counters->store_normal_miss(), 1); | 1148 __ IncrementCounter(counters->store_normal_miss(), 1); |
1149 GenerateMiss(masm); | 1149 GenerateMiss(masm); |
1150 } | 1150 } |
1151 | 1151 |
1152 | 1152 |
1153 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1153 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1154 StrictModeFlag strict_mode) { | 1154 StrictMode strict_mode) { |
1155 // ----------- S t a t e ------------- | 1155 // ----------- S t a t e ------------- |
1156 // -- rax : value | 1156 // -- rax : value |
1157 // -- rcx : name | 1157 // -- rcx : name |
1158 // -- rdx : receiver | 1158 // -- rdx : receiver |
1159 // -- rsp[0] : return address | 1159 // -- rsp[0] : return address |
1160 // ----------------------------------- | 1160 // ----------------------------------- |
1161 __ PopReturnAddressTo(rbx); | 1161 __ PopReturnAddressTo(rbx); |
1162 __ push(rdx); | 1162 __ push(rdx); |
1163 __ push(rcx); | 1163 __ push(rcx); |
1164 __ push(rax); | 1164 __ push(rax); |
1165 __ Push(Smi::FromInt(NONE)); // PropertyAttributes | 1165 __ Push(Smi::FromInt(NONE)); // PropertyAttributes |
1166 __ Push(Smi::FromInt(strict_mode)); | 1166 __ Push(Smi::FromInt(strict_mode)); |
1167 __ PushReturnAddressFrom(rbx); | 1167 __ PushReturnAddressFrom(rbx); |
1168 | 1168 |
1169 // Do tail-call to runtime routine. | 1169 // Do tail-call to runtime routine. |
1170 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); | 1170 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
1171 } | 1171 } |
1172 | 1172 |
1173 | 1173 |
1174 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1174 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1175 StrictModeFlag strict_mode) { | 1175 StrictMode strict_mode) { |
1176 // ----------- S t a t e ------------- | 1176 // ----------- S t a t e ------------- |
1177 // -- rax : value | 1177 // -- rax : value |
1178 // -- rcx : key | 1178 // -- rcx : key |
1179 // -- rdx : receiver | 1179 // -- rdx : receiver |
1180 // -- rsp[0] : return address | 1180 // -- rsp[0] : return address |
1181 // ----------------------------------- | 1181 // ----------------------------------- |
1182 | 1182 |
1183 __ PopReturnAddressTo(rbx); | 1183 __ PopReturnAddressTo(rbx); |
1184 __ push(rdx); // receiver | 1184 __ push(rdx); // receiver |
1185 __ push(rcx); // key | 1185 __ push(rcx); // key |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1321 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1322 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1322 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1323 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1323 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1324 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1324 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1325 } | 1325 } |
1326 | 1326 |
1327 | 1327 |
1328 } } // namespace v8::internal | 1328 } } // namespace v8::internal |
1329 | 1329 |
1330 #endif // V8_TARGET_ARCH_X64 | 1330 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |