OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 // an IC miss that would otherwise cause a transition to the generic stub. | 1240 // an IC miss that would otherwise cause a transition to the generic stub. |
1241 ExternalReference ref = | 1241 ExternalReference ref = |
1242 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1242 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
1243 __ TailCallExternalReference(ref, 3, 1); | 1243 __ TailCallExternalReference(ref, 3, 1); |
1244 } | 1244 } |
1245 | 1245 |
1246 | 1246 |
1247 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { | 1247 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
1248 // ---------- S t a t e -------------- | 1248 // ---------- S t a t e -------------- |
1249 // -- r2 : receiver | 1249 // -- r2 : receiver |
| 1250 // -- r3 : target map |
1250 // -- lr : return address | 1251 // -- lr : return address |
1251 // ----------------------------------- | 1252 // ----------------------------------- |
1252 // Must return the modified receiver in r0. | 1253 // Must return the modified receiver in r0. |
| 1254 if (!FLAG_trace_elements_transitions) { |
| 1255 Label fail; |
| 1256 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
| 1257 __ mov(r0, r2); |
| 1258 __ Ret(); |
| 1259 __ bind(&fail); |
| 1260 } |
1253 | 1261 |
1254 __ push(r2); | 1262 __ push(r2); |
1255 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); | 1263 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
1256 } | 1264 } |
1257 | 1265 |
1258 | 1266 |
1259 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( | 1267 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
1260 MacroAssembler* masm) { | 1268 MacroAssembler* masm) { |
1261 // ---------- S t a t e -------------- | 1269 // ---------- S t a t e -------------- |
1262 // -- r2 : receiver | 1270 // -- r2 : receiver |
| 1271 // -- r3 : target map |
1263 // -- lr : return address | 1272 // -- lr : return address |
1264 // ----------------------------------- | 1273 // ----------------------------------- |
1265 // Must return the modified receiver in r0. | 1274 // Must return the modified receiver in r0. |
| 1275 if (!FLAG_trace_elements_transitions) { |
| 1276 Label fail; |
| 1277 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
| 1278 __ mov(r0, r2); |
| 1279 __ Ret(); |
| 1280 __ bind(&fail); |
| 1281 } |
1266 | 1282 |
1267 __ push(r2); | 1283 __ push(r2); |
1268 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); | 1284 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
1269 } | 1285 } |
1270 | 1286 |
1271 | 1287 |
1272 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, | 1288 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm, |
1273 StrictModeFlag strict_mode) { | 1289 StrictModeFlag strict_mode) { |
1274 // ---------- S t a t e -------------- | 1290 // ---------- S t a t e -------------- |
1275 // -- r0 : value | 1291 // -- r0 : value |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 Register reg = Assembler::GetRn(instr_at_patch); | 1705 Register reg = Assembler::GetRn(instr_at_patch); |
1690 patcher.masm()->tst(reg, Operand(kSmiTagMask)); | 1706 patcher.masm()->tst(reg, Operand(kSmiTagMask)); |
1691 patcher.EmitCondition(eq); | 1707 patcher.EmitCondition(eq); |
1692 } | 1708 } |
1693 } | 1709 } |
1694 | 1710 |
1695 | 1711 |
1696 } } // namespace v8::internal | 1712 } } // namespace v8::internal |
1697 | 1713 |
1698 #endif // V8_TARGET_ARCH_ARM | 1714 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |