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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 __ pop(ecx); | 1865 __ pop(ecx); |
1866 __ push(edx); | 1866 __ push(edx); |
1867 __ push(eax); | 1867 __ push(eax); |
1868 | 1868 |
1869 // Figure out which native to call and setup the arguments. | 1869 // Figure out which native to call and setup the arguments. |
1870 if (cc == equal) { | 1870 if (cc == equal) { |
1871 __ push(ecx); | 1871 __ push(ecx); |
1872 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, | 1872 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
1873 1); | 1873 1); |
1874 } else { | 1874 } else { |
1875 int native_context_index = is_strong(strength()) | |
1876 ? Context::COMPARE_STRONG_BUILTIN_INDEX | |
1877 : Context::COMPARE_BUILTIN_INDEX; | |
1878 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | 1875 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); |
1879 | 1876 |
1880 // Restore return address on the stack. | 1877 // Restore return address on the stack. |
1881 __ push(ecx); | 1878 __ push(ecx); |
1882 | 1879 |
1883 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 1880 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
1884 // tagged as a small integer. | 1881 // tagged as a small integer. |
1885 __ InvokeBuiltin(native_context_index, JUMP_FUNCTION); | 1882 __ TailCallRuntime( |
| 1883 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3, |
| 1884 1); |
1886 } | 1885 } |
1887 | 1886 |
1888 __ bind(&miss); | 1887 __ bind(&miss); |
1889 GenerateMiss(masm); | 1888 GenerateMiss(masm); |
1890 } | 1889 } |
1891 | 1890 |
1892 | 1891 |
1893 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, | 1892 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, |
1894 bool is_super) { | 1893 bool is_super) { |
1895 // eax : number of arguments to the construct function | 1894 // eax : number of arguments to the construct function |
(...skipping 3903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5799 Operand(ebp, 7 * kPointerSize), NULL); | 5798 Operand(ebp, 7 * kPointerSize), NULL); |
5800 } | 5799 } |
5801 | 5800 |
5802 | 5801 |
5803 #undef __ | 5802 #undef __ |
5804 | 5803 |
5805 } // namespace internal | 5804 } // namespace internal |
5806 } // namespace v8 | 5805 } // namespace v8 |
5807 | 5806 |
5808 #endif // V8_TARGET_ARCH_IA32 | 5807 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |