OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 | 845 |
846 // Helper class for generating code or data associated with the code | 846 // Helper class for generating code or data associated with the code |
847 // right after a call instruction. As an example this can be used to | 847 // right after a call instruction. As an example this can be used to |
848 // generate safepoint data after calls for crankshaft. | 848 // generate safepoint data after calls for crankshaft. |
849 class CallWrapper { | 849 class CallWrapper { |
850 public: | 850 public: |
851 CallWrapper() { } | 851 CallWrapper() { } |
852 virtual ~CallWrapper() { } | 852 virtual ~CallWrapper() { } |
853 // Called just before emitting a call. Argument is the size of the generated | 853 // Called just before emitting a call. Argument is the size of the generated |
854 // call code. | 854 // call code. |
855 virtual void BeforeCall(int call_size) = 0; | 855 virtual void BeforeCall(int call_size) const = 0; |
856 // Called just after emitting a call, i.e., at the return site for the call. | 856 // Called just after emitting a call, i.e., at the return site for the call. |
857 virtual void AfterCall() = 0; | 857 virtual void AfterCall() const = 0; |
| 858 }; |
| 859 |
| 860 class NullCallWrapper : public CallWrapper { |
| 861 public: |
| 862 NullCallWrapper() { } |
| 863 virtual ~NullCallWrapper() { } |
| 864 virtual void BeforeCall(int call_size) const { } |
| 865 virtual void AfterCall() const { } |
858 }; | 866 }; |
859 | 867 |
860 } } // namespace v8::internal | 868 } } // namespace v8::internal |
861 | 869 |
862 #endif // V8_ASSEMBLER_H_ | 870 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |