| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); | 2034 __ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx); |
| 2035 __ j(not_equal, &slow); | 2035 __ j(not_equal, &slow); |
| 2036 __ jmp(&have_js_function); | 2036 __ jmp(&have_js_function); |
| 2037 | 2037 |
| 2038 // Unreachable | 2038 // Unreachable |
| 2039 __ int3(); | 2039 __ int3(); |
| 2040 } | 2040 } |
| 2041 | 2041 |
| 2042 | 2042 |
| 2043 void CallICStub::GenerateMiss(MacroAssembler* masm) { | 2043 void CallICStub::GenerateMiss(MacroAssembler* masm) { |
| 2044 // Get the receiver of the function from the stack; 1 ~ return address. | 2044 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2045 __ mov(ecx, Operand(esp, (arg_count() + 1) * kPointerSize)); | |
| 2046 | 2045 |
| 2047 { | 2046 // Push the receiver and the function and feedback info. |
| 2048 FrameScope scope(masm, StackFrame::INTERNAL); | 2047 __ push(edi); |
| 2048 __ push(ebx); |
| 2049 __ push(edx); |
| 2049 | 2050 |
| 2050 // Push the receiver and the function and feedback info. | 2051 // Call the entry. |
| 2051 __ push(ecx); | 2052 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss |
| 2052 __ push(edi); | 2053 : IC::kCallIC_Customization_Miss; |
| 2053 __ push(ebx); | |
| 2054 __ push(edx); | |
| 2055 | 2054 |
| 2056 // Call the entry. | 2055 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); |
| 2057 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss | 2056 __ CallExternalReference(miss, 3); |
| 2058 : IC::kCallIC_Customization_Miss; | |
| 2059 | 2057 |
| 2060 ExternalReference miss = ExternalReference(IC_Utility(id), | 2058 // Move result to edi and exit the internal frame. |
| 2061 masm->isolate()); | 2059 __ mov(edi, eax); |
| 2062 __ CallExternalReference(miss, 4); | |
| 2063 | |
| 2064 // Move result to edi and exit the internal frame. | |
| 2065 __ mov(edi, eax); | |
| 2066 } | |
| 2067 } | 2060 } |
| 2068 | 2061 |
| 2069 | 2062 |
| 2070 bool CEntryStub::NeedsImmovableCode() { | 2063 bool CEntryStub::NeedsImmovableCode() { |
| 2071 return false; | 2064 return false; |
| 2072 } | 2065 } |
| 2073 | 2066 |
| 2074 | 2067 |
| 2075 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { | 2068 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { |
| 2076 CEntryStub::GenerateAheadOfTime(isolate); | 2069 CEntryStub::GenerateAheadOfTime(isolate); |
| (...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4721 ApiParameterOperand(2), kStackSpace, nullptr, | 4714 ApiParameterOperand(2), kStackSpace, nullptr, |
| 4722 Operand(ebp, 7 * kPointerSize), NULL); | 4715 Operand(ebp, 7 * kPointerSize), NULL); |
| 4723 } | 4716 } |
| 4724 | 4717 |
| 4725 | 4718 |
| 4726 #undef __ | 4719 #undef __ |
| 4727 | 4720 |
| 4728 } } // namespace v8::internal | 4721 } } // namespace v8::internal |
| 4729 | 4722 |
| 4730 #endif // V8_TARGET_ARCH_X87 | 4723 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |