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

Unified 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, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
===================================================================
--- src/assembler.h (revision 7766)
+++ src/assembler.h (working copy)
@@ -852,11 +852,19 @@
virtual ~CallWrapper() { }
// Called just before emitting a call. Argument is the size of the generated
// call code.
- virtual void BeforeCall(int call_size) = 0;
+ virtual void BeforeCall(int call_size) const = 0;
// Called just after emitting a call, i.e., at the return site for the call.
- virtual void AfterCall() = 0;
+ virtual void AfterCall() const = 0;
};
+class NullCallWrapper : public CallWrapper {
+ public:
+ NullCallWrapper() { }
+ virtual ~NullCallWrapper() { }
+ virtual void BeforeCall(int call_size) const { }
+ virtual void AfterCall() const { }
+};
+
} } // namespace v8::internal
#endif // V8_ASSEMBLER_H_
« 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