| 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 573 |
| 574 // Fast support for SubString. | 574 // Fast support for SubString. |
| 575 void GenerateSubString(ZoneList<Expression*>* args); | 575 void GenerateSubString(ZoneList<Expression*>* args); |
| 576 | 576 |
| 577 // Fast support for StringCompare. | 577 // Fast support for StringCompare. |
| 578 void GenerateStringCompare(ZoneList<Expression*>* args); | 578 void GenerateStringCompare(ZoneList<Expression*>* args); |
| 579 | 579 |
| 580 // Support for direct calls from JavaScript to native RegExp code. | 580 // Support for direct calls from JavaScript to native RegExp code. |
| 581 void GenerateRegExpExec(ZoneList<Expression*>* args); | 581 void GenerateRegExpExec(ZoneList<Expression*>* args); |
| 582 | 582 |
| 583 // Fast support for number to string. |
| 584 void GenerateNumberToString(ZoneList<Expression*>* args); |
| 585 |
| 583 // Simple condition analysis. | 586 // Simple condition analysis. |
| 584 enum ConditionAnalysis { | 587 enum ConditionAnalysis { |
| 585 ALWAYS_TRUE, | 588 ALWAYS_TRUE, |
| 586 ALWAYS_FALSE, | 589 ALWAYS_FALSE, |
| 587 DONT_KNOW | 590 DONT_KNOW |
| 588 }; | 591 }; |
| 589 ConditionAnalysis AnalyzeCondition(Expression* cond); | 592 ConditionAnalysis AnalyzeCondition(Expression* cond); |
| 590 | 593 |
| 591 // Methods used to indicate which source code is generated for. Source | 594 // Methods used to indicate which source code is generated for. Source |
| 592 // positions are collected by the assembler and emitted with the relocation | 595 // positions are collected by the assembler and emitted with the relocation |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 Register scratch3); | 856 Register scratch3); |
| 854 | 857 |
| 855 private: | 858 private: |
| 856 Major MajorKey() { return StringCompare; } | 859 Major MajorKey() { return StringCompare; } |
| 857 int MinorKey() { return 0; } | 860 int MinorKey() { return 0; } |
| 858 | 861 |
| 859 void Generate(MacroAssembler* masm); | 862 void Generate(MacroAssembler* masm); |
| 860 }; | 863 }; |
| 861 | 864 |
| 862 | 865 |
| 866 class NumberToStringStub: public CodeStub { |
| 867 public: |
| 868 NumberToStringStub() { } |
| 869 |
| 870 // Generate code to do a lookup in the number string cache. If the number in |
| 871 // the register object is found in the cache the generated code falls through |
| 872 // with the result in the result register. The object and the result register |
| 873 // can be the same. If the number is not found in the cache the code jumps to |
| 874 // the label not_found with only the content of register object unchanged. |
| 875 static void GenerateLookupNumberStringCache(MacroAssembler* masm, |
| 876 Register object, |
| 877 Register result, |
| 878 Register scratch1, |
| 879 Register scratch2, |
| 880 bool object_is_smi, |
| 881 Label* not_found); |
| 882 |
| 883 private: |
| 884 Major MajorKey() { return NumberToString; } |
| 885 int MinorKey() { return 0; } |
| 886 |
| 887 void Generate(MacroAssembler* masm); |
| 888 |
| 889 const char* GetName() { return "NumberToStringStub"; } |
| 890 |
| 891 #ifdef DEBUG |
| 892 void Print() { |
| 893 PrintF("NumberToStringStub\n"); |
| 894 } |
| 895 #endif |
| 896 }; |
| 897 |
| 898 |
| 863 } } // namespace v8::internal | 899 } } // namespace v8::internal |
| 864 | 900 |
| 865 #endif // V8_IA32_CODEGEN_IA32_H_ | 901 #endif // V8_IA32_CODEGEN_IA32_H_ |
| OLD | NEW |