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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 __ Push(r2, r1, r0); | 1214 __ Push(r2, r1, r0); |
1215 | 1215 |
1216 // The slow case calls into the runtime to complete the store without causing | 1216 // The slow case calls into the runtime to complete the store without causing |
1217 // an IC miss that would otherwise cause a transition to the generic stub. | 1217 // an IC miss that would otherwise cause a transition to the generic stub. |
1218 ExternalReference ref = | 1218 ExternalReference ref = |
1219 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1219 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
1220 __ TailCallExternalReference(ref, 3, 1); | 1220 __ TailCallExternalReference(ref, 3, 1); |
1221 } | 1221 } |
1222 | 1222 |
1223 | 1223 |
| 1224 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
| 1225 // ---------- S t a t e -------------- |
| 1226 // -- r2 : receiver |
| 1227 // -- r3 : target map |
| 1228 // -- lr : return address |
| 1229 // ----------------------------------- |
| 1230 // Must return the modified receiver in r0. |
| 1231 if (!FLAG_trace_elements_transitions) { |
| 1232 Label fail; |
| 1233 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, |
| 1234 FAST_DOUBLE_ELEMENTS); |
| 1235 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); |
| 1236 __ mov(r0, r2); |
| 1237 __ Ret(); |
| 1238 __ bind(&fail); |
| 1239 } |
| 1240 |
| 1241 __ push(r2); |
| 1242 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
| 1243 } |
| 1244 |
| 1245 |
| 1246 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
| 1247 MacroAssembler* masm) { |
| 1248 // ---------- S t a t e -------------- |
| 1249 // -- r2 : receiver |
| 1250 // -- r3 : target map |
| 1251 // -- lr : return address |
| 1252 // ----------------------------------- |
| 1253 // Must return the modified receiver in r0. |
| 1254 if (!FLAG_trace_elements_transitions) { |
| 1255 Label fail; |
| 1256 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, |
| 1257 FAST_ELEMENTS); |
| 1258 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); |
| 1259 __ mov(r0, r2); |
| 1260 __ Ret(); |
| 1261 __ bind(&fail); |
| 1262 } |
| 1263 |
| 1264 __ push(r2); |
| 1265 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
| 1266 } |
| 1267 |
| 1268 |
1224 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1269 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1225 StrictModeFlag strict_mode) { | 1270 StrictModeFlag strict_mode) { |
1226 // ---------- S t a t e -------------- | 1271 // ---------- S t a t e -------------- |
1227 // -- r0 : value | 1272 // -- r0 : value |
1228 // -- r1 : key | 1273 // -- r1 : key |
1229 // -- r2 : receiver | 1274 // -- r2 : receiver |
1230 // -- lr : return address | 1275 // -- lr : return address |
1231 // ----------------------------------- | 1276 // ----------------------------------- |
1232 | 1277 |
1233 // Push receiver, key and value for runtime call. | 1278 // Push receiver, key and value for runtime call. |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 } else { | 1698 } else { |
1654 ASSERT(Assembler::GetCondition(branch_instr) == ne); | 1699 ASSERT(Assembler::GetCondition(branch_instr) == ne); |
1655 patcher.EmitCondition(eq); | 1700 patcher.EmitCondition(eq); |
1656 } | 1701 } |
1657 } | 1702 } |
1658 | 1703 |
1659 | 1704 |
1660 } } // namespace v8::internal | 1705 } } // namespace v8::internal |
1661 | 1706 |
1662 #endif // V8_TARGET_ARCH_ARM | 1707 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |