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

Unified Diff: src/code-stubs.h

Issue 335025: Handle the list of code-stub types using macro expansion (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 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/regexp-macro-assembler-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.h
===================================================================
--- src/code-stubs.h (revision 3119)
+++ src/code-stubs.h (working copy)
@@ -31,32 +31,50 @@
namespace v8 {
namespace internal {
+// List of code stubs used on all platforms. The order in this list is important
+// as only the stubs up to and including RecordWrite allows nested stub calls.
+#define CODE_STUB_LIST_ALL(V) \
+ V(CallFunction) \
+ V(GenericBinaryOp) \
+ V(SmiOp) \
+ V(Compare) \
+ V(RecordWrite) \
+ V(ConvertToDouble) \
+ V(WriteInt32ToHeapNumber) \
+ V(StackCheck) \
+ V(UnarySub) \
+ V(RevertToNumber) \
+ V(ToBoolean) \
+ V(Instanceof) \
+ V(CounterOp) \
+ V(ArgumentsAccess) \
+ V(Runtime) \
+ V(CEntry) \
+ V(JSEntry)
+// List of code stubs only used on ARM platforms.
+#ifdef V8_TARGET_ARCH_ARM
+#define CODE_STUB_LIST_ARM(V) \
+ V(GetProperty) \
+ V(SetProperty) \
+ V(InvokeBuiltin) \
+ V(RegExpCEntry)
+#else
+#define CODE_STUB_LIST_ARM(V)
+#endif
+
+// Combined list of code stubs.
+#define CODE_STUB_LIST(V) \
+ CODE_STUB_LIST_ALL(V) \
+ CODE_STUB_LIST_ARM(V)
+
// Stub is base classes of all stubs.
class CodeStub BASE_EMBEDDED {
public:
enum Major {
- CallFunction,
- GenericBinaryOp,
- SmiOp,
- Compare,
- RecordWrite, // Last stub that allows stub calls inside.
- ConvertToDouble,
- WriteInt32ToHeapNumber,
- StackCheck,
- UnarySub,
- RevertToNumber,
- ToBoolean,
- Instanceof,
- CounterOp,
- ArgumentsAccess,
- Runtime,
- CEntry,
- JSEntry,
- GetProperty, // ARM only
- SetProperty, // ARM only
- InvokeBuiltin, // ARM only
- RegExpCEntry, // ARM only
+#define DEF_ENUM(name) name,
+ CODE_STUB_LIST(DEF_ENUM)
+#undef DEF_ENUM
NUMBER_OF_IDS
};
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698