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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 | 1479 |
1480 // The slow case calls into the runtime to complete the store without causing | 1480 // The slow case calls into the runtime to complete the store without causing |
1481 // an IC miss that would otherwise cause a transition to the generic stub. | 1481 // an IC miss that would otherwise cause a transition to the generic stub. |
1482 ExternalReference ref = | 1482 ExternalReference ref = |
1483 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1483 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
1484 | 1484 |
1485 __ TailCallExternalReference(ref, 3, 1); | 1485 __ TailCallExternalReference(ref, 3, 1); |
1486 } | 1486 } |
1487 | 1487 |
1488 | 1488 |
| 1489 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
| 1490 // ---------- S t a t e -------------- |
| 1491 // -- a2 : receiver |
| 1492 // -- a3 : target map |
| 1493 // -- ra : return address |
| 1494 // ----------------------------------- |
| 1495 // Must return the modified receiver in v0. |
| 1496 if (!FLAG_trace_elements_transitions) { |
| 1497 Label fail; |
| 1498 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, |
| 1499 FAST_DOUBLE_ELEMENTS); |
| 1500 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); |
| 1501 __ Ret(USE_DELAY_SLOT); |
| 1502 __ mov(v0, a2); |
| 1503 __ bind(&fail); |
| 1504 } |
| 1505 |
| 1506 __ push(a2); |
| 1507 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
| 1508 } |
| 1509 |
| 1510 |
| 1511 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
| 1512 MacroAssembler* masm) { |
| 1513 // ---------- S t a t e -------------- |
| 1514 // -- a2 : receiver |
| 1515 // -- a3 : target map |
| 1516 // -- ra : return address |
| 1517 // ----------------------------------- |
| 1518 // Must return the modified receiver in v0. |
| 1519 if (!FLAG_trace_elements_transitions) { |
| 1520 Label fail; |
| 1521 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, |
| 1522 FAST_ELEMENTS); |
| 1523 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); |
| 1524 __ Ret(USE_DELAY_SLOT); |
| 1525 __ mov(v0, a2); |
| 1526 __ bind(&fail); |
| 1527 } |
| 1528 |
| 1529 __ push(a2); |
| 1530 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
| 1531 } |
| 1532 |
| 1533 |
1489 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1534 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
1490 StrictModeFlag strict_mode) { | 1535 StrictModeFlag strict_mode) { |
1491 // ----------- S t a t e ------------- | 1536 // ----------- S t a t e ------------- |
1492 // -- a0 : value | 1537 // -- a0 : value |
1493 // -- a1 : receiver | 1538 // -- a1 : receiver |
1494 // -- a2 : name | 1539 // -- a2 : name |
1495 // -- ra : return address | 1540 // -- ra : return address |
1496 // ----------------------------------- | 1541 // ----------------------------------- |
1497 | 1542 |
1498 // Get the receiver from the stack and probe the stub cache. | 1543 // Get the receiver from the stack and probe the stub cache. |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1660 } else { | 1705 } else { |
1661 ASSERT(Assembler::IsBne(branch_instr)); | 1706 ASSERT(Assembler::IsBne(branch_instr)); |
1662 patcher.ChangeBranchCondition(eq); | 1707 patcher.ChangeBranchCondition(eq); |
1663 } | 1708 } |
1664 } | 1709 } |
1665 | 1710 |
1666 | 1711 |
1667 } } // namespace v8::internal | 1712 } } // namespace v8::internal |
1668 | 1713 |
1669 #endif // V8_TARGET_ARCH_MIPS | 1714 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |