Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/assembler.h

Issue 6909026: Additional minor cleanup regarding CallWrapper: Use the null object pattern. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698