Simplify object printer declarations.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/23619010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5e5ea8d4
...@@ -1521,10 +1521,7 @@ class Object : public MaybeObject { ...@@ -1521,10 +1521,7 @@ class Object : public MaybeObject {
inline void VerifyApiCallResultType(); inline void VerifyApiCallResultType();
// Prints this object without details. // Prints this object without details.
inline void ShortPrint() { void ShortPrint(FILE* out = stdout);
ShortPrint(stdout);
}
void ShortPrint(FILE* out);
// Prints this object without details to a message accumulator. // Prints this object without details to a message accumulator.
void ShortPrint(StringStream* accumulator); void ShortPrint(StringStream* accumulator);
...@@ -1563,10 +1560,7 @@ class Smi: public Object { ...@@ -1563,10 +1560,7 @@ class Smi: public Object {
static inline Smi* cast(Object* object); static inline Smi* cast(Object* object);
// Dispatched behavior. // Dispatched behavior.
inline void SmiPrint() { void SmiPrint(FILE* out = stdout);
SmiPrint(stdout);
}
void SmiPrint(FILE* out);
void SmiPrint(StringStream* accumulator); void SmiPrint(StringStream* accumulator);
DECLARE_VERIFIER(Smi) DECLARE_VERIFIER(Smi)
...@@ -1637,10 +1631,7 @@ class Failure: public MaybeObject { ...@@ -1637,10 +1631,7 @@ class Failure: public MaybeObject {
static inline Failure* cast(MaybeObject* object); static inline Failure* cast(MaybeObject* object);
// Dispatched behavior. // Dispatched behavior.
inline void FailurePrint() { void FailurePrint(FILE* out = stdout);
FailurePrint(stdout);
}
void FailurePrint(FILE* out);
void FailurePrint(StringStream* accumulator); void FailurePrint(StringStream* accumulator);
DECLARE_VERIFIER(Failure) DECLARE_VERIFIER(Failure)
...@@ -1769,12 +1760,9 @@ class HeapObject: public Object { ...@@ -1769,12 +1760,9 @@ class HeapObject: public Object {
// Dispatched behavior. // Dispatched behavior.
void HeapObjectShortPrint(StringStream* accumulator); void HeapObjectShortPrint(StringStream* accumulator);
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
inline void HeapObjectPrint() {
HeapObjectPrint(stdout);
}
void HeapObjectPrint(FILE* out);
void PrintHeader(FILE* out, const char* id); void PrintHeader(FILE* out, const char* id);
#endif #endif
DECLARE_PRINTER(HeapObject)
DECLARE_VERIFIER(HeapObject) DECLARE_VERIFIER(HeapObject)
#ifdef VERIFY_HEAP #ifdef VERIFY_HEAP
inline void VerifyObjectField(int offset); inline void VerifyObjectField(int offset);
...@@ -1858,10 +1846,7 @@ class HeapNumber: public HeapObject { ...@@ -1858,10 +1846,7 @@ class HeapNumber: public HeapObject {
// Dispatched behavior. // Dispatched behavior.
bool HeapNumberBooleanValue(); bool HeapNumberBooleanValue();
inline void HeapNumberPrint() { void HeapNumberPrint(FILE* out = stdout);
HeapNumberPrint(stdout);
}
void HeapNumberPrint(FILE* out);
void HeapNumberPrint(StringStream* accumulator); void HeapNumberPrint(StringStream* accumulator);
DECLARE_VERIFIER(HeapNumber) DECLARE_VERIFIER(HeapNumber)
...@@ -2642,19 +2627,9 @@ class JSObject: public JSReceiver { ...@@ -2642,19 +2627,9 @@ class JSObject: public JSReceiver {
DECLARE_PRINTER(JSObject) DECLARE_PRINTER(JSObject)
DECLARE_VERIFIER(JSObject) DECLARE_VERIFIER(JSObject)
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
inline void PrintProperties() { void PrintProperties(FILE* out = stdout);
PrintProperties(stdout); void PrintElements(FILE* out = stdout);
} void PrintTransitions(FILE* out = stdout);
void PrintProperties(FILE* out);
inline void PrintElements() {
PrintElements(stdout);
}
void PrintElements(FILE* out);
inline void PrintTransitions() {
PrintTransitions(stdout);
}
void PrintTransitions(FILE* out);
#endif #endif
void PrintElementsTransition( void PrintElementsTransition(
...@@ -3249,10 +3224,7 @@ class DescriptorArray: public FixedArray { ...@@ -3249,10 +3224,7 @@ class DescriptorArray: public FixedArray {
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
// Print all the descriptors. // Print all the descriptors.
inline void PrintDescriptors() { void PrintDescriptors(FILE* out = stdout);
PrintDescriptors(stdout);
}
void PrintDescriptors(FILE* out);
#endif #endif
#ifdef DEBUG #ifdef DEBUG
...@@ -3745,10 +3717,7 @@ class Dictionary: public HashTable<Shape, Key> { ...@@ -3745,10 +3717,7 @@ class Dictionary: public HashTable<Shape, Key> {
MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key); MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key);
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
inline void Print() { void Print(FILE* out = stdout);
Print(stdout);
}
void Print(FILE* out);
#endif #endif
// Returns the key (slow). // Returns the key (slow).
Object* SlowReverseLookup(Object* value); Object* SlowReverseLookup(Object* value);
...@@ -4830,10 +4799,7 @@ class Code: public HeapObject { ...@@ -4830,10 +4799,7 @@ class Code: public HeapObject {
static const char* ICState2String(InlineCacheState state); static const char* ICState2String(InlineCacheState state);
static const char* StubType2String(StubType type); static const char* StubType2String(StubType type);
static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra);
inline void Disassemble(const char* name) { void Disassemble(const char* name, FILE* out = stdout);
Disassemble(name, stdout);
}
void Disassemble(const char* name, FILE* out);
#endif // ENABLE_DISASSEMBLER #endif // ENABLE_DISASSEMBLER
// [instruction_size]: Size of the native instructions // [instruction_size]: Size of the native instructions
...@@ -7131,10 +7097,7 @@ class JSFunction: public JSObject { ...@@ -7131,10 +7097,7 @@ class JSFunction: public JSObject {
DECL_ACCESSORS(next_function_link, Object) DECL_ACCESSORS(next_function_link, Object)
// Prints the name of the function using PrintF. // Prints the name of the function using PrintF.
inline void PrintName() { void PrintName(FILE* out = stdout);
PrintName(stdout);
}
void PrintName(FILE* out);
// Casting. // Casting.
static inline JSFunction* cast(Object* obj); static inline JSFunction* cast(Object* obj);
...@@ -8379,13 +8342,9 @@ class String: public Name { ...@@ -8379,13 +8342,9 @@ class String: public Name {
// Dispatched behavior. // Dispatched behavior.
void StringShortPrint(StringStream* accumulator); void StringShortPrint(StringStream* accumulator);
#ifdef OBJECT_PRINT #ifdef OBJECT_PRINT
inline void StringPrint() {
StringPrint(stdout);
}
void StringPrint(FILE* out);
char* ToAsciiArray(); char* ToAsciiArray();
#endif #endif
DECLARE_PRINTER(String)
DECLARE_VERIFIER(String) DECLARE_VERIFIER(String)
inline bool IsFlat(); inline bool IsFlat();
......
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