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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 } | 738 } |
739 | 739 |
740 void SetArgsInRegisters() { args_in_registers_ = true; } | 740 void SetArgsInRegisters() { args_in_registers_ = true; } |
741 void SetArgsReversed() { args_reversed_ = true; } | 741 void SetArgsReversed() { args_reversed_ = true; } |
742 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } | 742 bool HasSmiCodeInStub() { return (flags_ & NO_SMI_CODE_IN_STUB) == 0; } |
743 bool HasArgumentsInRegisters() { return args_in_registers_; } | 743 bool HasArgumentsInRegisters() { return args_in_registers_; } |
744 bool HasArgumentsReversed() { return args_reversed_; } | 744 bool HasArgumentsReversed() { return args_reversed_; } |
745 }; | 745 }; |
746 | 746 |
747 | 747 |
| 748 // Flag that indicates how to generate code for the stub StringAddStub. |
| 749 enum StringAddFlags { |
| 750 NO_STRING_ADD_FLAGS = 0, |
| 751 NO_STRING_CHECK_IN_STUB = 1 << 0 // Omit string check in stub. |
| 752 }; |
| 753 |
| 754 |
| 755 class StringAddStub: public CodeStub { |
| 756 public: |
| 757 explicit StringAddStub(StringAddFlags flags) { |
| 758 string_check_ = ((flags & NO_STRING_CHECK_IN_STUB) == 0); |
| 759 } |
| 760 |
| 761 private: |
| 762 Major MajorKey() { return StringAdd; } |
| 763 int MinorKey() { return string_check_ ? 0 : 1; } |
| 764 |
| 765 void Generate(MacroAssembler* masm); |
| 766 |
| 767 void GenerateCopyCharacters(MacroAssembler* masm, |
| 768 Register desc, |
| 769 Register src, |
| 770 Register count, |
| 771 bool ascii); |
| 772 |
| 773 // Should the stub check whether arguments are strings? |
| 774 bool string_check_; |
| 775 }; |
| 776 |
| 777 |
748 } } // namespace v8::internal | 778 } } // namespace v8::internal |
749 | 779 |
750 #endif // V8_X64_CODEGEN_X64_H_ | 780 #endif // V8_X64_CODEGEN_X64_H_ |
OLD | NEW |