OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 // Patch the caller to an appropriate specialized stub and return the | 1220 // Patch the caller to an appropriate specialized stub and return the |
1221 // operation result to the caller of the stub. | 1221 // operation result to the caller of the stub. |
1222 __ TailCallExternalReference( | 1222 __ TailCallExternalReference( |
1223 ExternalReference(IC_Utility(IC::kBinaryOp_Patch), | 1223 ExternalReference(IC_Utility(IC::kBinaryOp_Patch), |
1224 masm->isolate()), | 1224 masm->isolate()), |
1225 3, | 1225 3, |
1226 1); | 1226 1); |
1227 } | 1227 } |
1228 | 1228 |
1229 | 1229 |
| 1230 static void BinaryOpStub_GenerateRegisterArgsPop(MacroAssembler* masm) { |
| 1231 __ pop(ecx); |
| 1232 __ pop(eax); |
| 1233 __ pop(edx); |
| 1234 __ push(ecx); |
| 1235 } |
| 1236 |
| 1237 |
1230 static void BinaryOpStub_GenerateSmiCode( | 1238 static void BinaryOpStub_GenerateSmiCode( |
1231 MacroAssembler* masm, | 1239 MacroAssembler* masm, |
1232 Label* slow, | 1240 Label* slow, |
1233 BinaryOpStub::SmiCodeGenerateHeapNumberResults allow_heapnumber_results, | 1241 BinaryOpStub::SmiCodeGenerateHeapNumberResults allow_heapnumber_results, |
1234 Token::Value op) { | 1242 Token::Value op) { |
1235 // 1. Move arguments into edx, eax except for DIV and MOD, which need the | 1243 // 1. Move arguments into edx, eax except for DIV and MOD, which need the |
1236 // dividend in eax and edx free for the division. Use eax, ebx for those. | 1244 // dividend in eax and edx free for the division. Use eax, ebx for those. |
1237 Comment load_comment(masm, "-- Load arguments"); | 1245 Comment load_comment(masm, "-- Load arguments"); |
1238 Register left = edx; | 1246 Register left = edx; |
1239 Register right = eax; | 1247 Register right = eax; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 default: | 1663 default: |
1656 UNREACHABLE(); | 1664 UNREACHABLE(); |
1657 } | 1665 } |
1658 | 1666 |
1659 __ bind(&call_runtime); | 1667 __ bind(&call_runtime); |
1660 switch (op_) { | 1668 switch (op_) { |
1661 case Token::ADD: | 1669 case Token::ADD: |
1662 case Token::SUB: | 1670 case Token::SUB: |
1663 case Token::MUL: | 1671 case Token::MUL: |
1664 case Token::DIV: | 1672 case Token::DIV: |
1665 GenerateRegisterArgsPush(masm); | |
1666 break; | 1673 break; |
1667 case Token::MOD: | 1674 case Token::MOD: |
1668 case Token::BIT_OR: | 1675 case Token::BIT_OR: |
1669 case Token::BIT_AND: | 1676 case Token::BIT_AND: |
1670 case Token::BIT_XOR: | 1677 case Token::BIT_XOR: |
1671 case Token::SAR: | 1678 case Token::SAR: |
1672 case Token::SHL: | 1679 case Token::SHL: |
1673 case Token::SHR: | 1680 case Token::SHR: |
| 1681 BinaryOpStub_GenerateRegisterArgsPop(masm); |
1674 break; | 1682 break; |
1675 default: | 1683 default: |
1676 UNREACHABLE(); | 1684 UNREACHABLE(); |
1677 } | 1685 } |
1678 GenerateCallRuntime(masm); | 1686 |
| 1687 { |
| 1688 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1689 __ push(edx); |
| 1690 __ push(eax); |
| 1691 GenerateCallRuntime(masm); |
| 1692 } |
| 1693 __ ret(0); |
1679 } | 1694 } |
1680 | 1695 |
1681 | 1696 |
1682 void BinaryOpStub::GenerateBothStringStub(MacroAssembler* masm) { | 1697 void BinaryOpStub::GenerateBothStringStub(MacroAssembler* masm) { |
1683 Label call_runtime; | 1698 Label call_runtime; |
1684 ASSERT(left_type_ == BinaryOpIC::STRING && right_type_ == BinaryOpIC::STRING); | 1699 ASSERT(left_type_ == BinaryOpIC::STRING && right_type_ == BinaryOpIC::STRING); |
1685 ASSERT(op_ == Token::ADD); | 1700 ASSERT(op_ == Token::ADD); |
1686 // If both arguments are strings, call the string add stub. | 1701 // If both arguments are strings, call the string add stub. |
1687 // Otherwise, do a transition. | 1702 // Otherwise, do a transition. |
1688 | 1703 |
1689 // Registers containing left and right operands respectively. | 1704 // Registers containing left and right operands respectively. |
1690 Register left = edx; | 1705 Register left = edx; |
1691 Register right = eax; | 1706 Register right = eax; |
1692 | 1707 |
1693 // Test if left operand is a string. | 1708 // Test if left operand is a string. |
1694 __ JumpIfSmi(left, &call_runtime, Label::kNear); | 1709 __ JumpIfSmi(left, &call_runtime, Label::kNear); |
1695 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); | 1710 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); |
1696 __ j(above_equal, &call_runtime, Label::kNear); | 1711 __ j(above_equal, &call_runtime, Label::kNear); |
1697 | 1712 |
1698 // Test if right operand is a string. | 1713 // Test if right operand is a string. |
1699 __ JumpIfSmi(right, &call_runtime, Label::kNear); | 1714 __ JumpIfSmi(right, &call_runtime, Label::kNear); |
1700 __ CmpObjectType(right, FIRST_NONSTRING_TYPE, ecx); | 1715 __ CmpObjectType(right, FIRST_NONSTRING_TYPE, ecx); |
1701 __ j(above_equal, &call_runtime, Label::kNear); | 1716 __ j(above_equal, &call_runtime, Label::kNear); |
1702 | 1717 |
1703 StringAddStub string_add_stub(NO_STRING_CHECK_IN_STUB); | 1718 StringAddStub string_add_stub((StringAddFlags) |
| 1719 (ERECT_FRAME | NO_STRING_CHECK_IN_STUB)); |
1704 GenerateRegisterArgsPush(masm); | 1720 GenerateRegisterArgsPush(masm); |
1705 __ TailCallStub(&string_add_stub); | 1721 __ TailCallStub(&string_add_stub); |
1706 | 1722 |
1707 __ bind(&call_runtime); | 1723 __ bind(&call_runtime); |
1708 GenerateTypeTransition(masm); | 1724 GenerateTypeTransition(masm); |
1709 } | 1725 } |
1710 | 1726 |
1711 | 1727 |
1712 static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm, | 1728 static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm, |
1713 Label* alloc_failure, | 1729 Label* alloc_failure, |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 | 1901 |
1886 // If an allocation fails, or SHR hits a hard case, use the runtime system to | 1902 // If an allocation fails, or SHR hits a hard case, use the runtime system to |
1887 // get the correct result. | 1903 // get the correct result. |
1888 __ bind(&call_runtime); | 1904 __ bind(&call_runtime); |
1889 | 1905 |
1890 switch (op_) { | 1906 switch (op_) { |
1891 case Token::ADD: | 1907 case Token::ADD: |
1892 case Token::SUB: | 1908 case Token::SUB: |
1893 case Token::MUL: | 1909 case Token::MUL: |
1894 case Token::DIV: | 1910 case Token::DIV: |
1895 GenerateRegisterArgsPush(masm); | |
1896 break; | 1911 break; |
1897 case Token::MOD: | 1912 case Token::MOD: |
1898 return; // Handled above. | 1913 return; // Handled above. |
1899 case Token::BIT_OR: | 1914 case Token::BIT_OR: |
1900 case Token::BIT_AND: | 1915 case Token::BIT_AND: |
1901 case Token::BIT_XOR: | 1916 case Token::BIT_XOR: |
1902 case Token::SAR: | 1917 case Token::SAR: |
1903 case Token::SHL: | 1918 case Token::SHL: |
1904 case Token::SHR: | 1919 case Token::SHR: |
| 1920 BinaryOpStub_GenerateRegisterArgsPop(masm); |
1905 break; | 1921 break; |
1906 default: | 1922 default: |
1907 UNREACHABLE(); | 1923 UNREACHABLE(); |
1908 } | 1924 } |
1909 GenerateCallRuntime(masm); | 1925 |
| 1926 { |
| 1927 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1928 __ push(edx); |
| 1929 __ push(eax); |
| 1930 GenerateCallRuntime(masm); |
| 1931 } |
| 1932 __ ret(0); |
1910 } | 1933 } |
1911 | 1934 |
1912 | 1935 |
1913 void BinaryOpStub::GenerateOddballStub(MacroAssembler* masm) { | 1936 void BinaryOpStub::GenerateOddballStub(MacroAssembler* masm) { |
1914 if (op_ == Token::ADD) { | 1937 if (op_ == Token::ADD) { |
1915 // Handle string addition here, because it is the only operation | 1938 // Handle string addition here, because it is the only operation |
1916 // that does not do a ToNumber conversion on the operands. | 1939 // that does not do a ToNumber conversion on the operands. |
1917 GenerateAddStrings(masm); | 1940 GenerateAddStrings(masm); |
1918 } | 1941 } |
1919 | 1942 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 // If an allocation fails, or SHR or MOD hit a hard case, | 2125 // If an allocation fails, or SHR or MOD hit a hard case, |
2103 // use the runtime system to get the correct result. | 2126 // use the runtime system to get the correct result. |
2104 __ bind(&call_runtime); | 2127 __ bind(&call_runtime); |
2105 | 2128 |
2106 switch (op_) { | 2129 switch (op_) { |
2107 case Token::ADD: | 2130 case Token::ADD: |
2108 case Token::SUB: | 2131 case Token::SUB: |
2109 case Token::MUL: | 2132 case Token::MUL: |
2110 case Token::DIV: | 2133 case Token::DIV: |
2111 case Token::MOD: | 2134 case Token::MOD: |
2112 GenerateRegisterArgsPush(masm); | |
2113 break; | 2135 break; |
2114 case Token::BIT_OR: | 2136 case Token::BIT_OR: |
2115 case Token::BIT_AND: | 2137 case Token::BIT_AND: |
2116 case Token::BIT_XOR: | 2138 case Token::BIT_XOR: |
2117 case Token::SAR: | 2139 case Token::SAR: |
2118 case Token::SHL: | 2140 case Token::SHL: |
2119 case Token::SHR: | 2141 case Token::SHR: |
| 2142 BinaryOpStub_GenerateRegisterArgsPop(masm); |
2120 break; | 2143 break; |
2121 default: | 2144 default: |
2122 UNREACHABLE(); | 2145 UNREACHABLE(); |
2123 } | 2146 } |
2124 GenerateCallRuntime(masm); | 2147 |
| 2148 { |
| 2149 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2150 __ push(edx); |
| 2151 __ push(eax); |
| 2152 GenerateCallRuntime(masm); |
| 2153 } |
| 2154 __ ret(0); |
2125 } | 2155 } |
2126 | 2156 |
2127 | 2157 |
2128 void BinaryOpStub::GenerateGeneric(MacroAssembler* masm) { | 2158 void BinaryOpStub::GenerateGeneric(MacroAssembler* masm) { |
2129 Label call_runtime; | 2159 Label call_runtime; |
2130 | 2160 |
2131 Counters* counters = masm->isolate()->counters(); | 2161 Counters* counters = masm->isolate()->counters(); |
2132 __ IncrementCounter(counters->generic_binary_stub_calls(), 1); | 2162 __ IncrementCounter(counters->generic_binary_stub_calls(), 1); |
2133 | 2163 |
2134 switch (op_) { | 2164 switch (op_) { |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 // If all else fails, use the runtime system to get the correct | 2310 // If all else fails, use the runtime system to get the correct |
2281 // result. | 2311 // result. |
2282 __ bind(&call_runtime); | 2312 __ bind(&call_runtime); |
2283 switch (op_) { | 2313 switch (op_) { |
2284 case Token::ADD: | 2314 case Token::ADD: |
2285 GenerateAddStrings(masm); | 2315 GenerateAddStrings(masm); |
2286 // Fall through. | 2316 // Fall through. |
2287 case Token::SUB: | 2317 case Token::SUB: |
2288 case Token::MUL: | 2318 case Token::MUL: |
2289 case Token::DIV: | 2319 case Token::DIV: |
2290 GenerateRegisterArgsPush(masm); | |
2291 break; | 2320 break; |
2292 case Token::MOD: | 2321 case Token::MOD: |
2293 case Token::BIT_OR: | 2322 case Token::BIT_OR: |
2294 case Token::BIT_AND: | 2323 case Token::BIT_AND: |
2295 case Token::BIT_XOR: | 2324 case Token::BIT_XOR: |
2296 case Token::SAR: | 2325 case Token::SAR: |
2297 case Token::SHL: | 2326 case Token::SHL: |
2298 case Token::SHR: | 2327 case Token::SHR: |
| 2328 BinaryOpStub_GenerateRegisterArgsPop(masm); |
2299 break; | 2329 break; |
2300 default: | 2330 default: |
2301 UNREACHABLE(); | 2331 UNREACHABLE(); |
2302 } | 2332 } |
2303 GenerateCallRuntime(masm); | 2333 |
| 2334 { |
| 2335 FrameScope scope(masm, StackFrame::INTERNAL); |
| 2336 __ push(edx); |
| 2337 __ push(eax); |
| 2338 GenerateCallRuntime(masm); |
| 2339 } |
| 2340 __ ret(0); |
2304 } | 2341 } |
2305 | 2342 |
2306 | 2343 |
2307 void BinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { | 2344 void BinaryOpStub::GenerateAddStrings(MacroAssembler* masm) { |
2308 ASSERT(op_ == Token::ADD); | 2345 ASSERT(op_ == Token::ADD); |
2309 Label left_not_string, call_runtime; | 2346 Label left_not_string, call_runtime; |
2310 | 2347 |
2311 // Registers containing left and right operands respectively. | 2348 // Registers containing left and right operands respectively. |
2312 Register left = edx; | 2349 Register left = edx; |
2313 Register right = eax; | 2350 Register right = eax; |
2314 | 2351 |
2315 // Test if left operand is a string. | 2352 // Test if left operand is a string. |
2316 __ JumpIfSmi(left, &left_not_string, Label::kNear); | 2353 __ JumpIfSmi(left, &left_not_string, Label::kNear); |
2317 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); | 2354 __ CmpObjectType(left, FIRST_NONSTRING_TYPE, ecx); |
2318 __ j(above_equal, &left_not_string, Label::kNear); | 2355 __ j(above_equal, &left_not_string, Label::kNear); |
2319 | 2356 |
2320 StringAddStub string_add_left_stub(NO_STRING_CHECK_LEFT_IN_STUB); | 2357 StringAddStub string_add_left_stub((StringAddFlags) |
| 2358 (ERECT_FRAME | NO_STRING_CHECK_LEFT_IN_STUB)); |
2321 GenerateRegisterArgsPush(masm); | 2359 GenerateRegisterArgsPush(masm); |
2322 __ TailCallStub(&string_add_left_stub); | 2360 __ TailCallStub(&string_add_left_stub); |
2323 | 2361 |
2324 // Left operand is not a string, test right. | 2362 // Left operand is not a string, test right. |
2325 __ bind(&left_not_string); | 2363 __ bind(&left_not_string); |
2326 __ JumpIfSmi(right, &call_runtime, Label::kNear); | 2364 __ JumpIfSmi(right, &call_runtime, Label::kNear); |
2327 __ CmpObjectType(right, FIRST_NONSTRING_TYPE, ecx); | 2365 __ CmpObjectType(right, FIRST_NONSTRING_TYPE, ecx); |
2328 __ j(above_equal, &call_runtime, Label::kNear); | 2366 __ j(above_equal, &call_runtime, Label::kNear); |
2329 | 2367 |
2330 StringAddStub string_add_right_stub(NO_STRING_CHECK_RIGHT_IN_STUB); | 2368 StringAddStub string_add_right_stub((StringAddFlags) |
| 2369 (ERECT_FRAME | NO_STRING_CHECK_RIGHT_IN_STUB)); |
2331 GenerateRegisterArgsPush(masm); | 2370 GenerateRegisterArgsPush(masm); |
2332 __ TailCallStub(&string_add_right_stub); | 2371 __ TailCallStub(&string_add_right_stub); |
2333 | 2372 |
2334 // Neither argument is a string. | 2373 // Neither argument is a string. |
2335 __ bind(&call_runtime); | 2374 __ bind(&call_runtime); |
2336 } | 2375 } |
2337 | 2376 |
2338 | 2377 |
2339 static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm, | 2378 static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm, |
2340 Label* alloc_failure, | 2379 Label* alloc_failure, |
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5730 | 5769 |
5731 void StringAddStub::Generate(MacroAssembler* masm) { | 5770 void StringAddStub::Generate(MacroAssembler* masm) { |
5732 Label call_runtime, call_builtin; | 5771 Label call_runtime, call_builtin; |
5733 Builtins::JavaScript builtin_id = Builtins::ADD; | 5772 Builtins::JavaScript builtin_id = Builtins::ADD; |
5734 | 5773 |
5735 // Load the two arguments. | 5774 // Load the two arguments. |
5736 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument. | 5775 __ mov(eax, Operand(esp, 2 * kPointerSize)); // First argument. |
5737 __ mov(edx, Operand(esp, 1 * kPointerSize)); // Second argument. | 5776 __ mov(edx, Operand(esp, 1 * kPointerSize)); // Second argument. |
5738 | 5777 |
5739 // Make sure that both arguments are strings if not known in advance. | 5778 // Make sure that both arguments are strings if not known in advance. |
5740 if (flags_ == NO_STRING_ADD_FLAGS) { | 5779 if ((flags_ & NO_STRING_ADD_FLAGS) != 0) { |
5741 __ JumpIfSmi(eax, &call_runtime); | 5780 __ JumpIfSmi(eax, &call_runtime); |
5742 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ebx); | 5781 __ CmpObjectType(eax, FIRST_NONSTRING_TYPE, ebx); |
5743 __ j(above_equal, &call_runtime); | 5782 __ j(above_equal, &call_runtime); |
5744 | 5783 |
5745 // First argument is a a string, test second. | 5784 // First argument is a a string, test second. |
5746 __ JumpIfSmi(edx, &call_runtime); | 5785 __ JumpIfSmi(edx, &call_runtime); |
5747 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, ebx); | 5786 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, ebx); |
5748 __ j(above_equal, &call_runtime); | 5787 __ j(above_equal, &call_runtime); |
5749 } else { | 5788 } else { |
5750 // Here at least one of the arguments is definitely a string. | 5789 // Here at least one of the arguments is definitely a string. |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6038 // edi: length of second argument | 6077 // edi: length of second argument |
6039 StringHelper::GenerateCopyCharacters(masm, ecx, edx, edi, ebx, false); | 6078 StringHelper::GenerateCopyCharacters(masm, ecx, edx, edi, ebx, false); |
6040 __ IncrementCounter(counters->string_add_native(), 1); | 6079 __ IncrementCounter(counters->string_add_native(), 1); |
6041 __ ret(2 * kPointerSize); | 6080 __ ret(2 * kPointerSize); |
6042 | 6081 |
6043 // Recover stack pointer before jumping to runtime. | 6082 // Recover stack pointer before jumping to runtime. |
6044 __ bind(&call_runtime_drop_two); | 6083 __ bind(&call_runtime_drop_two); |
6045 __ Drop(2); | 6084 __ Drop(2); |
6046 // Just jump to runtime to add the two strings. | 6085 // Just jump to runtime to add the two strings. |
6047 __ bind(&call_runtime); | 6086 __ bind(&call_runtime); |
6048 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 6087 if ((flags_ & ERECT_FRAME) != 0) { |
| 6088 GenerateRegisterArgsPop(masm, ecx); |
| 6089 // Build a frame |
| 6090 { |
| 6091 FrameScope scope(masm, StackFrame::INTERNAL); |
| 6092 GenerateRegisterArgsPush(masm); |
| 6093 __ CallRuntime(Runtime::kStringAdd, 2); |
| 6094 } |
| 6095 __ ret(0); |
| 6096 } else { |
| 6097 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 6098 } |
6049 | 6099 |
6050 if (call_builtin.is_linked()) { | 6100 if (call_builtin.is_linked()) { |
6051 __ bind(&call_builtin); | 6101 __ bind(&call_builtin); |
6052 __ InvokeBuiltin(builtin_id, JUMP_FUNCTION); | 6102 if ((flags_ & ERECT_FRAME) != 0) { |
| 6103 GenerateRegisterArgsPop(masm, ecx); |
| 6104 // Build a frame |
| 6105 { |
| 6106 FrameScope scope(masm, StackFrame::INTERNAL); |
| 6107 GenerateRegisterArgsPush(masm); |
| 6108 __ InvokeBuiltin(builtin_id, CALL_FUNCTION); |
| 6109 } |
| 6110 __ ret(0); |
| 6111 } else { |
| 6112 __ InvokeBuiltin(builtin_id, JUMP_FUNCTION); |
| 6113 } |
6053 } | 6114 } |
6054 } | 6115 } |
6055 | 6116 |
6056 | 6117 |
| 6118 void StringAddStub::GenerateRegisterArgsPush(MacroAssembler* masm) { |
| 6119 __ push(eax); |
| 6120 __ push(edx); |
| 6121 } |
| 6122 |
| 6123 |
| 6124 void StringAddStub::GenerateRegisterArgsPop(MacroAssembler* masm, |
| 6125 Register temp) { |
| 6126 __ pop(temp); |
| 6127 __ pop(edx); |
| 6128 __ pop(eax); |
| 6129 __ push(temp); |
| 6130 } |
| 6131 |
| 6132 |
6057 void StringAddStub::GenerateConvertArgument(MacroAssembler* masm, | 6133 void StringAddStub::GenerateConvertArgument(MacroAssembler* masm, |
6058 int stack_offset, | 6134 int stack_offset, |
6059 Register arg, | 6135 Register arg, |
6060 Register scratch1, | 6136 Register scratch1, |
6061 Register scratch2, | 6137 Register scratch2, |
6062 Register scratch3, | 6138 Register scratch3, |
6063 Label* slow) { | 6139 Label* slow) { |
6064 // First check if the argument is already a string. | 6140 // First check if the argument is already a string. |
6065 Label not_string, done; | 6141 Label not_string, done; |
6066 __ JumpIfSmi(arg, ¬_string); | 6142 __ JumpIfSmi(arg, ¬_string); |
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7988 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 8064 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
7989 } | 8065 } |
7990 } | 8066 } |
7991 | 8067 |
7992 | 8068 |
7993 #undef __ | 8069 #undef __ |
7994 | 8070 |
7995 } } // namespace v8::internal | 8071 } } // namespace v8::internal |
7996 | 8072 |
7997 #endif // V8_TARGET_ARCH_IA32 | 8073 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |