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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 Register scratch4); | 827 Register scratch4); |
828 | 828 |
829 private: | 829 private: |
830 Major MajorKey() { return StringCompare; } | 830 Major MajorKey() { return StringCompare; } |
831 int MinorKey() { return 0; } | 831 int MinorKey() { return 0; } |
832 | 832 |
833 void Generate(MacroAssembler* masm); | 833 void Generate(MacroAssembler* masm); |
834 }; | 834 }; |
835 | 835 |
836 | 836 |
| 837 class NumberToStringStub: public CodeStub { |
| 838 public: |
| 839 NumberToStringStub() { } |
| 840 |
| 841 // Generate code to do a lookup in the number string cache. If the number in |
| 842 // the register object is found in the cache the generated code falls through |
| 843 // with the result in the result register. The object and the result register |
| 844 // can be the same. If the number is not found in the cache the code jumps to |
| 845 // the label not_found with only the content of register object unchanged. |
| 846 static void GenerateLookupNumberStringCache(MacroAssembler* masm, |
| 847 Register object, |
| 848 Register result, |
| 849 Register scratch1, |
| 850 Register scratch2, |
| 851 bool object_is_smi, |
| 852 Label* not_found); |
| 853 |
| 854 private: |
| 855 Major MajorKey() { return NumberToString; } |
| 856 int MinorKey() { return 0; } |
| 857 |
| 858 void Generate(MacroAssembler* masm); |
| 859 |
| 860 const char* GetName() { return "NumberToStringStub"; } |
| 861 |
| 862 #ifdef DEBUG |
| 863 void Print() { |
| 864 PrintF("NumberToStringStub\n"); |
| 865 } |
| 866 #endif |
| 867 }; |
| 868 |
| 869 |
837 } } // namespace v8::internal | 870 } } // namespace v8::internal |
838 | 871 |
839 #endif // V8_X64_CODEGEN_X64_H_ | 872 #endif // V8_X64_CODEGEN_X64_H_ |
OLD | NEW |