| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 // ----------- S t a t e ------------- | 2028 // ----------- S t a t e ------------- |
| 2029 // -- rax : receiver | 2029 // -- rax : receiver |
| 2030 // -- rcx : name | 2030 // -- rcx : name |
| 2031 // -- rsp[0] : return address | 2031 // -- rsp[0] : return address |
| 2032 // ----------------------------------- | 2032 // ----------------------------------- |
| 2033 receiver = rax; | 2033 receiver = rax; |
| 2034 } | 2034 } |
| 2035 | 2035 |
| 2036 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); | 2036 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); |
| 2037 __ bind(&miss); | 2037 __ bind(&miss); |
| 2038 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | 2038 StubCompiler::TailCallBuiltin( |
| 2039 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); |
| 2039 } | 2040 } |
| 2040 | 2041 |
| 2041 | 2042 |
| 2042 void StringLengthStub::Generate(MacroAssembler* masm) { | 2043 void StringLengthStub::Generate(MacroAssembler* masm) { |
| 2043 Label miss; | 2044 Label miss; |
| 2044 Register receiver; | 2045 Register receiver; |
| 2045 if (kind() == Code::KEYED_LOAD_IC) { | 2046 if (kind() == Code::KEYED_LOAD_IC) { |
| 2046 // ----------- S t a t e ------------- | 2047 // ----------- S t a t e ------------- |
| 2047 // -- rax : key | 2048 // -- rax : key |
| 2048 // -- rdx : receiver | 2049 // -- rdx : receiver |
| 2049 // -- rsp[0] : return address | 2050 // -- rsp[0] : return address |
| 2050 // ----------------------------------- | 2051 // ----------------------------------- |
| 2051 __ Cmp(rax, masm->isolate()->factory()->length_string()); | 2052 __ Cmp(rax, masm->isolate()->factory()->length_string()); |
| 2052 __ j(not_equal, &miss); | 2053 __ j(not_equal, &miss); |
| 2053 receiver = rdx; | 2054 receiver = rdx; |
| 2054 } else { | 2055 } else { |
| 2055 ASSERT(kind() == Code::LOAD_IC); | 2056 ASSERT(kind() == Code::LOAD_IC); |
| 2056 // ----------- S t a t e ------------- | 2057 // ----------- S t a t e ------------- |
| 2057 // -- rax : receiver | 2058 // -- rax : receiver |
| 2058 // -- rcx : name | 2059 // -- rcx : name |
| 2059 // -- rsp[0] : return address | 2060 // -- rsp[0] : return address |
| 2060 // ----------------------------------- | 2061 // ----------------------------------- |
| 2061 receiver = rax; | 2062 receiver = rax; |
| 2062 } | 2063 } |
| 2063 | 2064 |
| 2064 StubCompiler::GenerateLoadStringLength(masm, receiver, r8, r9, &miss, | 2065 StubCompiler::GenerateLoadStringLength(masm, receiver, r8, r9, &miss, |
| 2065 support_wrapper_); | 2066 support_wrapper_); |
| 2066 __ bind(&miss); | 2067 __ bind(&miss); |
| 2067 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | 2068 StubCompiler::TailCallBuiltin( |
| 2069 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); |
| 2068 } | 2070 } |
| 2069 | 2071 |
| 2070 | 2072 |
| 2071 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { | 2073 void StoreArrayLengthStub::Generate(MacroAssembler* masm) { |
| 2072 // ----------- S t a t e ------------- | 2074 // ----------- S t a t e ------------- |
| 2073 // -- rax : value | 2075 // -- rax : value |
| 2074 // -- rcx : key | 2076 // -- rcx : key |
| 2075 // -- rdx : receiver | 2077 // -- rdx : receiver |
| 2076 // -- rsp[0] : return address | 2078 // -- rsp[0] : return address |
| 2077 // ----------------------------------- | 2079 // ----------------------------------- |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2120 __ push(receiver); | 2122 __ push(receiver); |
| 2121 __ push(value); | 2123 __ push(value); |
| 2122 __ push(scratch); // return address | 2124 __ push(scratch); // return address |
| 2123 | 2125 |
| 2124 ExternalReference ref = | 2126 ExternalReference ref = |
| 2125 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); | 2127 ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), masm->isolate()); |
| 2126 __ TailCallExternalReference(ref, 2, 1); | 2128 __ TailCallExternalReference(ref, 2, 1); |
| 2127 | 2129 |
| 2128 __ bind(&miss); | 2130 __ bind(&miss); |
| 2129 | 2131 |
| 2130 StubCompiler::TailCallBuiltin(masm, StubCompiler::MissBuiltin(kind())); | 2132 StubCompiler::TailCallBuiltin( |
| 2133 masm, BaseLoadStoreStubCompiler::MissBuiltin(kind())); |
| 2131 } | 2134 } |
| 2132 | 2135 |
| 2133 | 2136 |
| 2134 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { | 2137 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
| 2135 // The key is in rdx and the parameter count is in rax. | 2138 // The key is in rdx and the parameter count is in rax. |
| 2136 | 2139 |
| 2137 // The displacement is used for skipping the frame pointer on the | 2140 // The displacement is used for skipping the frame pointer on the |
| 2138 // stack. It is the offset of the last parameter (if any) relative | 2141 // stack. It is the offset of the last parameter (if any) relative |
| 2139 // to the frame pointer. | 2142 // to the frame pointer. |
| 2140 static const int kDisplacement = 1 * kPointerSize; | 2143 static const int kDisplacement = 1 * kPointerSize; |
| (...skipping 4627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6768 __ bind(&fast_elements_case); | 6771 __ bind(&fast_elements_case); |
| 6769 GenerateCase(masm, FAST_ELEMENTS); | 6772 GenerateCase(masm, FAST_ELEMENTS); |
| 6770 } | 6773 } |
| 6771 | 6774 |
| 6772 | 6775 |
| 6773 #undef __ | 6776 #undef __ |
| 6774 | 6777 |
| 6775 } } // namespace v8::internal | 6778 } } // namespace v8::internal |
| 6776 | 6779 |
| 6777 #endif // V8_TARGET_ARCH_X64 | 6780 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |