OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 8975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8986 __ IncrementCounter(&Counters::number_to_string_native, 1); | 8986 __ IncrementCounter(&Counters::number_to_string_native, 1); |
8987 } | 8987 } |
8988 | 8988 |
8989 | 8989 |
8990 void NumberToStringStub::Generate(MacroAssembler* masm) { | 8990 void NumberToStringStub::Generate(MacroAssembler* masm) { |
8991 Label runtime; | 8991 Label runtime; |
8992 | 8992 |
8993 __ mov(ebx, Operand(esp, kPointerSize)); | 8993 __ mov(ebx, Operand(esp, kPointerSize)); |
8994 | 8994 |
8995 // Generate code to lookup number in the number string cache. | 8995 // Generate code to lookup number in the number string cache. |
8996 GenerateLookupNumberStringCache(masm, ebx, eax, ebx, ecx, false, &runtime); | 8996 GenerateLookupNumberStringCache(masm, ebx, eax, ecx, edx, false, &runtime); |
8997 __ ret(1 * kPointerSize); | 8997 __ ret(1 * kPointerSize); |
8998 | 8998 |
8999 __ bind(&runtime); | 8999 __ bind(&runtime); |
9000 // Handle number to string in the runtime system if not found in the cache. | 9000 // Handle number to string in the runtime system if not found in the cache. |
9001 __ TailCallRuntime(ExternalReference(Runtime::kNumberToString), 1, 1); | 9001 __ TailCallRuntime(ExternalReference(Runtime::kNumberToString), 1, 1); |
9002 } | 9002 } |
9003 | 9003 |
9004 | 9004 |
9005 void CompareStub::Generate(MacroAssembler* masm) { | 9005 void CompareStub::Generate(MacroAssembler* masm) { |
9006 Label call_builtin, done; | 9006 Label call_builtin, done; |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10597 | 10597 |
10598 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 10598 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
10599 // tagged as a small integer. | 10599 // tagged as a small integer. |
10600 __ bind(&runtime); | 10600 __ bind(&runtime); |
10601 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 10601 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
10602 } | 10602 } |
10603 | 10603 |
10604 #undef __ | 10604 #undef __ |
10605 | 10605 |
10606 } } // namespace v8::internal | 10606 } } // namespace v8::internal |
OLD | NEW |