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

Unified Diff: src/code-stubs.cc

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/code-stubs.h ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
===================================================================
--- src/code-stubs.cc (revision 3119)
+++ src/code-stubs.cc (working copy)
@@ -96,46 +96,9 @@
const char* CodeStub::MajorName(CodeStub::Major major_key) {
switch (major_key) {
- case CallFunction:
- return "CallFunction";
- case GenericBinaryOp:
- return "GenericBinaryOp";
- case SmiOp:
- return "SmiOp";
- case Compare:
- return "Compare";
- case RecordWrite:
- return "RecordWrite";
- case StackCheck:
- return "StackCheck";
- case UnarySub:
- return "UnarySub";
- case RevertToNumber:
- return "RevertToNumber";
- case ToBoolean:
- return "ToBoolean";
- case Instanceof:
- return "Instanceof";
- case CounterOp:
- return "CounterOp";
- case ArgumentsAccess:
- return "ArgumentsAccess";
- case Runtime:
- return "Runtime";
- case CEntry:
- return "CEntry";
- case JSEntry:
- return "JSEntry";
- case GetProperty:
- return "GetProperty";
- case SetProperty:
- return "SetProperty";
- case InvokeBuiltin:
- return "InvokeBuiltin";
- case ConvertToDouble:
- return "ConvertToDouble";
- case WriteInt32ToHeapNumber:
- return "WriteInt32ToHeapNumber";
+#define DEF_CASE(name) case name: return #name;
+ CODE_STUB_LIST_ALL(DEF_CASE)
+#undef DEF_CASE
default:
UNREACHABLE();
return NULL;
« no previous file with comments | « src/code-stubs.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698