| 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 1849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1860 __ ret(0); // rax, rdx were pushed | 1860 __ ret(0); // rax, rdx were pushed |
| 1861 } | 1861 } |
| 1862 __ bind(&runtime_call); | 1862 __ bind(&runtime_call); |
| 1863 | 1863 |
| 1864 // Push arguments below the return address. | 1864 // Push arguments below the return address. |
| 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 && strict()) { | 1870 if (cc == equal) { |
| 1871 __ push(ecx); | 1871 __ push(ecx); |
| 1872 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); | 1872 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
| 1873 1); |
| 1873 } else { | 1874 } else { |
| 1874 int native_context_index; | 1875 int native_context_index = is_strong(strength()) |
| 1875 if (cc == equal) { | 1876 ? Context::COMPARE_STRONG_BUILTIN_INDEX |
| 1876 native_context_index = Context::EQUALS_BUILTIN_INDEX; | 1877 : Context::COMPARE_BUILTIN_INDEX; |
| 1877 } else { | 1878 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); |
| 1878 native_context_index = is_strong(strength()) | |
| 1879 ? Context::COMPARE_STRONG_BUILTIN_INDEX | |
| 1880 : Context::COMPARE_BUILTIN_INDEX; | |
| 1881 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | |
| 1882 } | |
| 1883 | 1879 |
| 1884 // Restore return address on the stack. | 1880 // Restore return address on the stack. |
| 1885 __ push(ecx); | 1881 __ push(ecx); |
| 1886 | 1882 |
| 1887 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 1883 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
| 1888 // tagged as a small integer. | 1884 // tagged as a small integer. |
| 1889 __ InvokeBuiltin(native_context_index, JUMP_FUNCTION); | 1885 __ InvokeBuiltin(native_context_index, JUMP_FUNCTION); |
| 1890 } | 1886 } |
| 1891 | 1887 |
| 1892 __ bind(&miss); | 1888 __ bind(&miss); |
| (...skipping 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5806 Operand(ebp, 7 * kPointerSize), NULL); | 5802 Operand(ebp, 7 * kPointerSize), NULL); |
| 5807 } | 5803 } |
| 5808 | 5804 |
| 5809 | 5805 |
| 5810 #undef __ | 5806 #undef __ |
| 5811 | 5807 |
| 5812 } // namespace internal | 5808 } // namespace internal |
| 5813 } // namespace v8 | 5809 } // namespace v8 |
| 5814 | 5810 |
| 5815 #endif // V8_TARGET_ARCH_IA32 | 5811 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |