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()) { |