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

Unified Diff: src/compiler/opcodes.h

Issue 818203002: [turbofan] Turn IrOpcode::Mnemonic() into a table lookup. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « BUILD.gn ('k') | src/compiler/opcodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/opcodes.h
diff --git a/src/compiler/opcodes.h b/src/compiler/opcodes.h
index ccdec4d215f1ba75c825a752ce82ccdc7edd1289..3f00e6a178668a4d623e6c5855dc4a370b26d3aa 100644
--- a/src/compiler/opcodes.h
+++ b/src/compiler/opcodes.h
@@ -268,18 +268,7 @@ class IrOpcode {
};
// Returns the mnemonic name of an opcode.
- static const char* Mnemonic(Value val) {
- // TODO(turbofan): make this a table lookup.
- switch (val) {
-#define RETURN_NAME(x) \
- case k##x: \
- return #x;
- ALL_OP_LIST(RETURN_NAME)
-#undef RETURN_NAME
- default:
- return "UnknownOpcode";
- }
- }
+ static char const* Mnemonic(Value value);
static bool IsJsOpcode(Value val) {
switch (val) {
« no previous file with comments | « BUILD.gn ('k') | src/compiler/opcodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698