X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..ed1e77d3adeb83d26fd1dfb16dd84cabdcefd250:/heap/GCLogging.cpp?ds=sidebyside diff --git a/heap/GCLogging.cpp b/heap/GCLogging.cpp index 4c16a33..b8ed121 100644 --- a/heap/GCLogging.cpp +++ b/heap/GCLogging.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Apple Inc. All rights reserved. + * Copyright (C) 2014, 2015 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,6 +31,7 @@ #include "HeapIterationScope.h" #include "JSCell.h" #include "JSCellInlines.h" +#include namespace JSC { @@ -63,10 +64,11 @@ public: reviveCells(); } - void operator()(JSCell* cell) + IterationStatus operator()(JSCell* cell) { m_liveCells.append(cell); MarkedBlock::blockFor(cell)->clearMarked(cell); + return IterationStatus::Continue; } void log() @@ -112,3 +114,26 @@ void GCLogging::dumpObjectGraph(Heap* heap) } } // namespace JSC + +namespace WTF { + +void printInternal(PrintStream& out, JSC::GCLogging::Level level) +{ + switch (level) { + case JSC::GCLogging::Level::None: + out.print("None"); + return; + case JSC::GCLogging::Level::Basic: + out.print("Basic"); + return; + case JSC::GCLogging::Level::Verbose: + out.print("Verbose"); + return; + default: + out.print("Level=", level - JSC::GCLogging::Level::None); + return; + } +} + +} // namespace WTF +