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

Unified Diff: src/objects.cc

Issue 2410353004: OBJECT_PRINT needs to have ICState2String() defined. (Closed)
Patch Set: Created 4 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/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 551e4a35dbb17be555bed0591d8bccb384f9d066..1b312a4f921fde7ef72603dd4cb8ca2ffcd7e1be 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -14506,6 +14506,42 @@ WeakCell* Code::CachedWeakCell() {
return NULL;
}
+#if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
+
+const char* Code::ICState2String(InlineCacheState state) {
+ switch (state) {
+ case UNINITIALIZED:
+ return "UNINITIALIZED";
+ case PREMONOMORPHIC:
+ return "PREMONOMORPHIC";
+ case MONOMORPHIC:
+ return "MONOMORPHIC";
+ case RECOMPUTE_HANDLER:
+ return "RECOMPUTE_HANDLER";
+ case POLYMORPHIC:
+ return "POLYMORPHIC";
+ case MEGAMORPHIC:
+ return "MEGAMORPHIC";
+ case GENERIC:
+ return "GENERIC";
+ }
+ UNREACHABLE();
+ return NULL;
+}
+
+void Code::PrintExtraICState(std::ostream& os, // NOLINT
+ Kind kind, ExtraICState extra) {
+ os << "extra_ic_state = ";
+ if ((kind == STORE_IC || kind == KEYED_STORE_IC) &&
+ is_strict(static_cast<LanguageMode>(extra))) {
+ os << "STRICT\n";
+ } else {
+ os << extra << "\n";
+ }
+}
+
+#endif // defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
+
#ifdef ENABLE_DISASSEMBLER
void DeoptimizationInputData::DeoptimizationInputDataPrint(
@@ -14762,34 +14798,6 @@ void HandlerTable::HandlerTableReturnPrint(std::ostream& os) {
}
-const char* Code::ICState2String(InlineCacheState state) {
- switch (state) {
- case UNINITIALIZED: return "UNINITIALIZED";
- case PREMONOMORPHIC: return "PREMONOMORPHIC";
- case MONOMORPHIC: return "MONOMORPHIC";
- case RECOMPUTE_HANDLER:
- return "RECOMPUTE_HANDLER";
- case POLYMORPHIC: return "POLYMORPHIC";
- case MEGAMORPHIC: return "MEGAMORPHIC";
- case GENERIC: return "GENERIC";
- }
- UNREACHABLE();
- return NULL;
-}
-
-
-void Code::PrintExtraICState(std::ostream& os, // NOLINT
- Kind kind, ExtraICState extra) {
- os << "extra_ic_state = ";
- if ((kind == STORE_IC || kind == KEYED_STORE_IC) &&
- is_strict(static_cast<LanguageMode>(extra))) {
- os << "STRICT\n";
- } else {
- os << extra << "\n";
- }
-}
-
-
void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
os << "kind = " << Kind2String(kind()) << "\n";
if (IsCodeStubOrIC()) {
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698