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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 edi, | 852 edi, |
853 slow); | 853 slow); |
854 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); | 854 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); |
855 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); | 855 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); |
856 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); | 856 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset)); |
857 __ jmp(&finish_object_store); | 857 __ jmp(&finish_object_store); |
858 } | 858 } |
859 | 859 |
860 | 860 |
861 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, | 861 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
862 StrictModeFlag strict_mode) { | 862 StrictMode strict_mode) { |
863 // ----------- S t a t e ------------- | 863 // ----------- S t a t e ------------- |
864 // -- eax : value | 864 // -- eax : value |
865 // -- ecx : key | 865 // -- ecx : key |
866 // -- edx : receiver | 866 // -- edx : receiver |
867 // -- esp[0] : return address | 867 // -- esp[0] : return address |
868 // ----------------------------------- | 868 // ----------------------------------- |
869 Label slow, fast_object, fast_object_grow; | 869 Label slow, fast_object, fast_object_grow; |
870 Label fast_double, fast_double_grow; | 870 Label fast_double, fast_double_grow; |
871 Label array, extra, check_if_double_array; | 871 Label array, extra, check_if_double_array; |
872 | 872 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 __ bind(&restore_miss); | 1123 __ bind(&restore_miss); |
1124 __ pop(edx); | 1124 __ pop(edx); |
1125 | 1125 |
1126 __ bind(&miss); | 1126 __ bind(&miss); |
1127 __ IncrementCounter(counters->store_normal_miss(), 1); | 1127 __ IncrementCounter(counters->store_normal_miss(), 1); |
1128 GenerateMiss(masm); | 1128 GenerateMiss(masm); |
1129 } | 1129 } |
1130 | 1130 |
1131 | 1131 |
1132 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1132 void StoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1133 StrictModeFlag strict_mode) { | 1133 StrictMode strict_mode) { |
1134 // ----------- S t a t e ------------- | 1134 // ----------- S t a t e ------------- |
1135 // -- eax : value | 1135 // -- eax : value |
1136 // -- ecx : name | 1136 // -- ecx : name |
1137 // -- edx : receiver | 1137 // -- edx : receiver |
1138 // -- esp[0] : return address | 1138 // -- esp[0] : return address |
1139 // ----------------------------------- | 1139 // ----------------------------------- |
1140 __ pop(ebx); | 1140 __ pop(ebx); |
1141 __ push(edx); | 1141 __ push(edx); |
1142 __ push(ecx); | 1142 __ push(ecx); |
1143 __ push(eax); | 1143 __ push(eax); |
1144 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes | 1144 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes |
1145 __ push(Immediate(Smi::FromInt(strict_mode))); | 1145 __ push(Immediate(Smi::FromInt(strict_mode))); |
1146 __ push(ebx); // return address | 1146 __ push(ebx); // return address |
1147 | 1147 |
1148 // Do tail-call to runtime routine. | 1148 // Do tail-call to runtime routine. |
1149 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); | 1149 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
1150 } | 1150 } |
1151 | 1151 |
1152 | 1152 |
1153 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1153 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1154 StrictModeFlag strict_mode) { | 1154 StrictMode strict_mode) { |
1155 // ----------- S t a t e ------------- | 1155 // ----------- S t a t e ------------- |
1156 // -- eax : value | 1156 // -- eax : value |
1157 // -- ecx : key | 1157 // -- ecx : key |
1158 // -- edx : receiver | 1158 // -- edx : receiver |
1159 // -- esp[0] : return address | 1159 // -- esp[0] : return address |
1160 // ----------------------------------- | 1160 // ----------------------------------- |
1161 | 1161 |
1162 __ pop(ebx); | 1162 __ pop(ebx); |
1163 __ push(edx); | 1163 __ push(edx); |
1164 __ push(ecx); | 1164 __ push(ecx); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1300 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1301 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1301 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1302 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1302 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1303 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1303 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1304 } | 1304 } |
1305 | 1305 |
1306 | 1306 |
1307 } } // namespace v8::internal | 1307 } } // namespace v8::internal |
1308 | 1308 |
1309 #endif // V8_TARGET_ARCH_IA32 | 1309 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |