Commit 0bf49221 authored by mvstanton's avatar mvstanton Committed by Commit bot

OBJECT_PRINT needs to have ICState2String() defined.

R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2410353004
Cr-Commit-Position: refs/heads/master@{#40270}
parent 92844597
...@@ -14506,6 +14506,42 @@ WeakCell* Code::CachedWeakCell() { ...@@ -14506,6 +14506,42 @@ WeakCell* Code::CachedWeakCell() {
return NULL; 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 #ifdef ENABLE_DISASSEMBLER
void DeoptimizationInputData::DeoptimizationInputDataPrint( void DeoptimizationInputData::DeoptimizationInputDataPrint(
...@@ -14762,34 +14798,6 @@ void HandlerTable::HandlerTableReturnPrint(std::ostream& os) { ...@@ -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 void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
os << "kind = " << Kind2String(kind()) << "\n"; os << "kind = " << Kind2String(kind()) << "\n";
if (IsCodeStubOrIC()) { if (IsCodeStubOrIC()) {
......
...@@ -5238,11 +5238,14 @@ class Code: public HeapObject { ...@@ -5238,11 +5238,14 @@ class Code: public HeapObject {
static const int kPrologueOffsetNotSet = -1; static const int kPrologueOffsetNotSet = -1;
#ifdef ENABLE_DISASSEMBLER #if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
// Printing // Printing
static const char* ICState2String(InlineCacheState state); static const char* ICState2String(InlineCacheState state);
static void PrintExtraICState(std::ostream& os, // NOLINT static void PrintExtraICState(std::ostream& os, // NOLINT
Kind kind, ExtraICState extra); Kind kind, ExtraICState extra);
#endif // defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
#ifdef ENABLE_DISASSEMBLER
void Disassemble(const char* name, std::ostream& os); // NOLINT void Disassemble(const char* name, std::ostream& os); // NOLINT
#endif // ENABLE_DISASSEMBLER #endif // ENABLE_DISASSEMBLER
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment