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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 | 581 |
582 // Fast support for StringCompare. | 582 // Fast support for StringCompare. |
583 void GenerateStringCompare(ZoneList<Expression*>* args); | 583 void GenerateStringCompare(ZoneList<Expression*>* args); |
584 | 584 |
585 // Support for direct calls from JavaScript to native RegExp code. | 585 // Support for direct calls from JavaScript to native RegExp code. |
586 void GenerateRegExpExec(ZoneList<Expression*>* args); | 586 void GenerateRegExpExec(ZoneList<Expression*>* args); |
587 | 587 |
588 // Fast support for number to string. | 588 // Fast support for number to string. |
589 void GenerateNumberToString(ZoneList<Expression*>* args); | 589 void GenerateNumberToString(ZoneList<Expression*>* args); |
590 | 590 |
| 591 // Fast call to transcendental functions. |
| 592 void GenerateMathSin(ZoneList<Expression*>* args); |
| 593 void GenerateMathCos(ZoneList<Expression*>* args); |
| 594 |
591 // Simple condition analysis. | 595 // Simple condition analysis. |
592 enum ConditionAnalysis { | 596 enum ConditionAnalysis { |
593 ALWAYS_TRUE, | 597 ALWAYS_TRUE, |
594 ALWAYS_FALSE, | 598 ALWAYS_FALSE, |
595 DONT_KNOW | 599 DONT_KNOW |
596 }; | 600 }; |
597 ConditionAnalysis AnalyzeCondition(Expression* cond); | 601 ConditionAnalysis AnalyzeCondition(Expression* cond); |
598 | 602 |
599 // Methods used to indicate which source code is generated for. Source | 603 // Methods used to indicate which source code is generated for. Source |
600 // positions are collected by the assembler and emitted with the relocation | 604 // positions are collected by the assembler and emitted with the relocation |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 friend class FastCodeGenerator; | 652 friend class FastCodeGenerator; |
649 friend class FullCodeGenerator; | 653 friend class FullCodeGenerator; |
650 friend class FullCodeGenSyntaxChecker; | 654 friend class FullCodeGenSyntaxChecker; |
651 | 655 |
652 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc | 656 friend class CodeGeneratorPatcher; // Used in test-log-stack-tracer.cc |
653 | 657 |
654 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); | 658 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); |
655 }; | 659 }; |
656 | 660 |
657 | 661 |
| 662 // Compute a transcendental math function natively, or call the |
| 663 // TranscendentalCache runtime function. |
| 664 class TranscendentalCacheStub: public CodeStub { |
| 665 public: |
| 666 explicit TranscendentalCacheStub(TranscendentalCache::Type type) |
| 667 : type_(type) {} |
| 668 void Generate(MacroAssembler* masm); |
| 669 private: |
| 670 TranscendentalCache::Type type_; |
| 671 Major MajorKey() { return TranscendentalCache; } |
| 672 int MinorKey() { return type_; } |
| 673 Runtime::FunctionId RuntimeFunction(); |
| 674 void GenerateOperation(MacroAssembler* masm); |
| 675 }; |
| 676 |
| 677 |
658 // Flag that indicates how to generate code for the stub GenericBinaryOpStub. | 678 // Flag that indicates how to generate code for the stub GenericBinaryOpStub. |
659 enum GenericBinaryFlags { | 679 enum GenericBinaryFlags { |
660 NO_GENERIC_BINARY_FLAGS = 0, | 680 NO_GENERIC_BINARY_FLAGS = 0, |
661 NO_SMI_CODE_IN_STUB = 1 << 0 // Omit smi code in stub. | 681 NO_SMI_CODE_IN_STUB = 1 << 0 // Omit smi code in stub. |
662 }; | 682 }; |
663 | 683 |
664 | 684 |
665 class GenericBinaryOpStub: public CodeStub { | 685 class GenericBinaryOpStub: public CodeStub { |
666 public: | 686 public: |
667 GenericBinaryOpStub(Token::Value op, | 687 GenericBinaryOpStub(Token::Value op, |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 void Print() { | 917 void Print() { |
898 PrintF("NumberToStringStub\n"); | 918 PrintF("NumberToStringStub\n"); |
899 } | 919 } |
900 #endif | 920 #endif |
901 }; | 921 }; |
902 | 922 |
903 | 923 |
904 } } // namespace v8::internal | 924 } } // namespace v8::internal |
905 | 925 |
906 #endif // V8_IA32_CODEGEN_IA32_H_ | 926 #endif // V8_IA32_CODEGEN_IA32_H_ |
OLD | NEW |