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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 | 1414 |
1415 // The slow case calls into the runtime to complete the store without causing | 1415 // The slow case calls into the runtime to complete the store without causing |
1416 // an IC miss that would otherwise cause a transition to the generic stub. | 1416 // an IC miss that would otherwise cause a transition to the generic stub. |
1417 ExternalReference ref = | 1417 ExternalReference ref = |
1418 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); | 1418 ExternalReference(IC_Utility(kKeyedStoreIC_Slow), masm->isolate()); |
1419 | 1419 |
1420 __ TailCallExternalReference(ref, 3, 1); | 1420 __ TailCallExternalReference(ref, 3, 1); |
1421 } | 1421 } |
1422 | 1422 |
1423 | 1423 |
| 1424 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { |
| 1425 // ---------- S t a t e -------------- |
| 1426 // -- a2 : receiver |
| 1427 // -- a3 : target map |
| 1428 // -- ra : return address |
| 1429 // ----------------------------------- |
| 1430 // Must return the modified receiver in v0. |
| 1431 if (!FLAG_trace_elements_transitions) { |
| 1432 Label fail; |
| 1433 ElementsTransitionGenerator::GenerateSmiOnlyToDouble(masm, &fail); |
| 1434 __ Ret(USE_DELAY_SLOT); |
| 1435 __ mov(v0, a2); |
| 1436 __ bind(&fail); |
| 1437 } |
| 1438 |
| 1439 __ push(a2); |
| 1440 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); |
| 1441 } |
| 1442 |
| 1443 |
| 1444 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( |
| 1445 MacroAssembler* masm) { |
| 1446 // ---------- S t a t e -------------- |
| 1447 // -- a2 : receiver |
| 1448 // -- a3 : target map |
| 1449 // -- ra : return address |
| 1450 // ----------------------------------- |
| 1451 // Must return the modified receiver in v0. |
| 1452 if (!FLAG_trace_elements_transitions) { |
| 1453 Label fail; |
| 1454 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); |
| 1455 __ Ret(USE_DELAY_SLOT); |
| 1456 __ mov(v0, a2); |
| 1457 __ bind(&fail); |
| 1458 } |
| 1459 |
| 1460 __ push(a2); |
| 1461 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); |
| 1462 } |
| 1463 |
| 1464 |
1424 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, | 1465 void StoreIC::GenerateMegamorphic(MacroAssembler* masm, |
1425 StrictModeFlag strict_mode) { | 1466 StrictModeFlag strict_mode) { |
1426 // ----------- S t a t e ------------- | 1467 // ----------- S t a t e ------------- |
1427 // -- a0 : value | 1468 // -- a0 : value |
1428 // -- a1 : receiver | 1469 // -- a1 : receiver |
1429 // -- a2 : name | 1470 // -- a2 : name |
1430 // -- ra : return address | 1471 // -- ra : return address |
1431 // ----------------------------------- | 1472 // ----------------------------------- |
1432 | 1473 |
1433 // Get the receiver from the stack and probe the stub cache. | 1474 // Get the receiver from the stack and probe the stub cache. |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1705 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
1665 patcher.masm()->andi(at, reg, kSmiTagMask); | 1706 patcher.masm()->andi(at, reg, kSmiTagMask); |
1666 patcher.ChangeBranchCondition(eq); | 1707 patcher.ChangeBranchCondition(eq); |
1667 } | 1708 } |
1668 } | 1709 } |
1669 | 1710 |
1670 | 1711 |
1671 } } // namespace v8::internal | 1712 } } // namespace v8::internal |
1672 | 1713 |
1673 #endif // V8_TARGET_ARCH_MIPS | 1714 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |