| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 __ bind(&fast_double_without_map_check); | 728 __ bind(&fast_double_without_map_check); |
| 729 // If the value is a number, store it as a double in the FastDoubleElements | 729 // If the value is a number, store it as a double in the FastDoubleElements |
| 730 // array. | 730 // array. |
| 731 __ StoreNumberToDoubleElements(rax, rbx, rcx, xmm0, &slow); | 731 __ StoreNumberToDoubleElements(rax, rbx, rcx, xmm0, &slow); |
| 732 __ ret(0); | 732 __ ret(0); |
| 733 } | 733 } |
| 734 | 734 |
| 735 | 735 |
| 736 // The generated code does not accept smi keys. | 736 // The generated code does not accept smi keys. |
| 737 // The generated code falls through if both probes miss. | 737 // The generated code falls through if both probes miss. |
| 738 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, | 738 void CallICBase::GenerateMonomorphicCacheProbe(MacroAssembler* masm, |
| 739 int argc, | 739 int argc, |
| 740 Code::Kind kind, | 740 Code::Kind kind, |
| 741 Code::ExtraICState extra_ic_state) { | 741 Code::ExtraICState extra_state) { |
| 742 // ----------- S t a t e ------------- | 742 // ----------- S t a t e ------------- |
| 743 // rcx : function name | 743 // rcx : function name |
| 744 // rdx : receiver | 744 // rdx : receiver |
| 745 // ----------------------------------- | 745 // ----------------------------------- |
| 746 Label number, non_number, non_string, boolean, probe, miss; | 746 Label number, non_number, non_string, boolean, probe, miss; |
| 747 | 747 |
| 748 // Probe the stub cache. | 748 // Probe the stub cache. |
| 749 Code::Flags flags = Code::ComputeFlags(kind, | 749 Code::Flags flags = Code::ComputeFlags(kind, |
| 750 MONOMORPHIC, | 750 MONOMORPHIC, |
| 751 extra_ic_state, | 751 extra_state, |
| 752 NORMAL, | 752 NORMAL, |
| 753 argc); | 753 argc); |
| 754 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, rdx, rcx, rbx, | 754 Isolate::Current()->stub_cache()->GenerateProbe(masm, flags, rdx, rcx, rbx, |
| 755 rax); | 755 rax); |
| 756 | 756 |
| 757 // If the stub cache probing failed, the receiver might be a value. | 757 // If the stub cache probing failed, the receiver might be a value. |
| 758 // For value objects, we use the map of the prototype objects for | 758 // For value objects, we use the map of the prototype objects for |
| 759 // the corresponding JSValue for the cache and that is what we need | 759 // the corresponding JSValue for the cache and that is what we need |
| 760 // to probe. | 760 // to probe. |
| 761 // | 761 // |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1691 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
| 1692 ? not_zero | 1692 ? not_zero |
| 1693 : zero; | 1693 : zero; |
| 1694 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1694 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1695 } | 1695 } |
| 1696 | 1696 |
| 1697 | 1697 |
| 1698 } } // namespace v8::internal | 1698 } } // namespace v8::internal |
| 1699 | 1699 |
| 1700 #endif // V8_TARGET_ARCH_X64 | 1700 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |