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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1887 __ ret(0); // rax, rdx were pushed | 1887 __ ret(0); // rax, rdx were pushed |
1888 } | 1888 } |
1889 __ bind(&runtime_call); | 1889 __ bind(&runtime_call); |
1890 | 1890 |
1891 // Push arguments below the return address. | 1891 // Push arguments below the return address. |
1892 __ pop(ecx); | 1892 __ pop(ecx); |
1893 __ push(edx); | 1893 __ push(edx); |
1894 __ push(eax); | 1894 __ push(eax); |
1895 | 1895 |
1896 // Figure out which native to call and setup the arguments. | 1896 // Figure out which native to call and setup the arguments. |
1897 Builtins::JavaScript builtin; | 1897 if (cc == equal && strict()) { |
1898 if (cc == equal) { | 1898 __ push(ecx); |
1899 builtin = strict() ? Builtins::STRICT_EQUALS : Builtins::EQUALS; | 1899 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); |
1900 } else { | 1900 } else { |
1901 builtin = | 1901 Builtins::JavaScript builtin; |
1902 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; | 1902 if (cc == equal) { |
1903 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | 1903 builtin = Builtins::EQUALS; |
| 1904 } else { |
| 1905 builtin = |
| 1906 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; |
| 1907 __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); |
| 1908 } |
| 1909 |
| 1910 // Restore return address on the stack. |
| 1911 __ push(ecx); |
| 1912 |
| 1913 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
| 1914 // tagged as a small integer. |
| 1915 __ InvokeBuiltin(builtin, JUMP_FUNCTION); |
1904 } | 1916 } |
1905 | 1917 |
1906 // Restore return address on the stack. | |
1907 __ push(ecx); | |
1908 | |
1909 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | |
1910 // tagged as a small integer. | |
1911 __ InvokeBuiltin(builtin, JUMP_FUNCTION); | |
1912 | |
1913 __ bind(&miss); | 1918 __ bind(&miss); |
1914 GenerateMiss(masm); | 1919 GenerateMiss(masm); |
1915 } | 1920 } |
1916 | 1921 |
1917 | 1922 |
1918 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, | 1923 static void CallStubInRecordCallTarget(MacroAssembler* masm, CodeStub* stub, |
1919 bool is_super) { | 1924 bool is_super) { |
1920 // eax : number of arguments to the construct function | 1925 // eax : number of arguments to the construct function |
1921 // ebx : feedback vector | 1926 // ebx : feedback vector |
1922 // edx : slot in feedback vector (Smi) | 1927 // edx : slot in feedback vector (Smi) |
(...skipping 3732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5655 Operand(ebp, 7 * kPointerSize), NULL); | 5660 Operand(ebp, 7 * kPointerSize), NULL); |
5656 } | 5661 } |
5657 | 5662 |
5658 | 5663 |
5659 #undef __ | 5664 #undef __ |
5660 | 5665 |
5661 } // namespace internal | 5666 } // namespace internal |
5662 } // namespace v8 | 5667 } // namespace v8 |
5663 | 5668 |
5664 #endif // V8_TARGET_ARCH_IA32 | 5669 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |