OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 628 |
629 // ------------------------------------------------------------------------- | 629 // ------------------------------------------------------------------------- |
630 // Code stubs | 630 // Code stubs |
631 // | 631 // |
632 // These independent code objects are created once, and used multiple | 632 // These independent code objects are created once, and used multiple |
633 // times by generated code to perform common tasks, often the slow | 633 // times by generated code to perform common tasks, often the slow |
634 // case of a JavaScript operation. They are all subclasses of CodeStub, | 634 // case of a JavaScript operation. They are all subclasses of CodeStub, |
635 // which is declared in code-stubs.h. | 635 // which is declared in code-stubs.h. |
636 | 636 |
637 | 637 |
| 638 class ToBooleanStub: public CodeStub { |
| 639 public: |
| 640 ToBooleanStub() { } |
| 641 |
| 642 void Generate(MacroAssembler* masm); |
| 643 |
| 644 private: |
| 645 Major MajorKey() { return ToBoolean; } |
| 646 int MinorKey() { return 0; } |
| 647 }; |
| 648 |
| 649 |
638 // Flag that indicates whether or not the code that handles smi arguments | 650 // Flag that indicates whether or not the code that handles smi arguments |
639 // should be placed in the stub, inlined, or omitted entirely. | 651 // should be placed in the stub, inlined, or omitted entirely. |
640 enum GenericBinaryFlags { | 652 enum GenericBinaryFlags { |
641 SMI_CODE_IN_STUB, | 653 SMI_CODE_IN_STUB, |
642 SMI_CODE_INLINED | 654 SMI_CODE_INLINED |
643 }; | 655 }; |
644 | 656 |
645 | 657 |
646 class GenericBinaryOpStub: public CodeStub { | 658 class GenericBinaryOpStub: public CodeStub { |
647 public: | 659 public: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 | FlagBits::encode(flags_) | 698 | FlagBits::encode(flags_) |
687 | SSE3Bits::encode(use_sse3_); | 699 | SSE3Bits::encode(use_sse3_); |
688 } | 700 } |
689 void Generate(MacroAssembler* masm); | 701 void Generate(MacroAssembler* masm); |
690 }; | 702 }; |
691 | 703 |
692 | 704 |
693 } } // namespace v8::internal | 705 } } // namespace v8::internal |
694 | 706 |
695 #endif // V8_X64_CODEGEN_X64_H_ | 707 #endif // V8_X64_CODEGEN_X64_H_ |
OLD | NEW |