diff options
author | Darrell Anderson <[email protected]> | 2012-03-07 17:22:58 -0600 |
---|---|---|
committer | Darrell Anderson <[email protected]> | 2012-03-07 17:22:58 -0600 |
commit | e15521d96b21cb0c771cce7cbe2ceb38f27c8844 (patch) | |
tree | d70ae645d1e414273f12736df3589cc96fdeebda /kjs | |
parent | 563d4ecebe282b0062cbdb74413ef960401a25bf (diff) | |
download | tdelibs-e15521d96b21cb0c771cce7cbe2ceb38f27c8844.tar.gz tdelibs-e15521d96b21cb0c771cce7cbe2ceb38f27c8844.zip |
Add source code module name to stdout/stderr messages to improve readability.
Diffstat (limited to 'kjs')
-rw-r--r-- | kjs/array_object.cpp | 2 | ||||
-rw-r--r-- | kjs/collector.cpp | 4 | ||||
-rw-r--r-- | kjs/internal.cpp | 12 | ||||
-rw-r--r-- | kjs/math_object.cpp | 2 | ||||
-rw-r--r-- | kjs/nodes.cpp | 4 | ||||
-rw-r--r-- | kjs/object.cpp | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/kjs/array_object.cpp b/kjs/array_object.cpp index a23e08dae..de49e4164 100644 --- a/kjs/array_object.cpp +++ b/kjs/array_object.cpp @@ -438,7 +438,7 @@ ArrayPrototypeImp::ArrayPrototypeImp(ExecState */*exec*/, Value ArrayPrototypeImp::get(ExecState *exec, const Identifier &propertyName) const { - //fprintf( stderr, "ArrayPrototypeImp::get(%s)\n", propertyName.ascii() ); + //fprintf( stderr, "[kjs-array_object] ArrayPrototypeImp::get(%s)\n", propertyName.ascii() ); return lookupGetFunction<ArrayProtoFuncImp, ArrayInstanceImp>( exec, propertyName, &arrayTable, this ); } diff --git a/kjs/collector.cpp b/kjs/collector.cpp index b8d233850..2ddd635a6 100644 --- a/kjs/collector.cpp +++ b/kjs/collector.cpp @@ -163,7 +163,7 @@ bool Collector::collect() if (InterpreterImp::s_hook) { InterpreterImp *scr = InterpreterImp::s_hook; do { - //fprintf( stderr, "Collector marking interpreter %p\n",(void*)scr); + //fprintf( stderr, "[kjs-collector] Collector marking interpreter %p\n",(void*)scr); scr->mark(); scr = scr->next; } while (scr != InterpreterImp::s_hook); @@ -221,7 +221,7 @@ bool Collector::collect() if (!(imp->_flags & ValueImp::VI_DESTRUCTED)) { if (!imp->refcount && imp->_flags == (ValueImp::VI_GCALLOWED | ValueImp::VI_CREATED)) { - //fprintf( stderr, "Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name()); + //fprintf( stderr, "[kjs-collector] Collector::deleting ValueImp %p (%s)\n", (void*)imp, typeid(*imp).name()); // emulate destructing part of 'operator delete()' imp->~ValueImp(); curBlock->usedCells--; diff --git a/kjs/internal.cpp b/kjs/internal.cpp index 25f7b6e31..3ab0b9de2 100644 --- a/kjs/internal.cpp +++ b/kjs/internal.cpp @@ -503,16 +503,16 @@ FunctionBodyNode *Parser::parse(const UChar *code, unsigned int length, SourceCo if (errMsg) *errMsg = "Parse error at line " + UString::from(eline); #ifdef KJS_VERBOSE - fprintf( stderr, "%s\n", UString(code,length).ascii() ); + fprintf( stderr, "[kjs-internal] %s\n", UString(code,length).ascii() ); #endif #ifndef NDEBUG - fprintf(stderr, "KJS: JavaScript parse error at line %d.\n", eline); + fprintf( stderr, "[kjs-internal] KJS: JavaScript parse error at line %d.\n", eline); #endif delete prog; return 0; } #ifdef KJS_VERBOSE - fprintf( stderr, "%s\n", prog->toCode().ascii() ); + fprintf( stderr, "[kjs-internal] %s\n", prog->toCode().ascii() ); #endif return prog; @@ -524,7 +524,7 @@ InterpreterImp* InterpreterImp::s_hook = 0L; void InterpreterImp::globalInit() { - //fprintf( stderr, "InterpreterImp::globalInit()\n" ); + //fprintf( stderr, "[kjs-internal] InterpreterImp::globalInit()\n" ); UndefinedImp::staticUndefined = new UndefinedImp(); UndefinedImp::staticUndefined->ref(); NullImp::staticNull = new NullImp(); @@ -539,7 +539,7 @@ void InterpreterImp::globalInit() void InterpreterImp::globalClear() { - //fprintf( stderr, "InterpreterImp::globalClear()\n" ); + //fprintf( stderr, "[kjs-internal] InterpreterImp::globalClear()\n" ); UndefinedImp::staticUndefined->deref(); UndefinedImp::staticUndefined->setGcAllowed(); UndefinedImp::staticUndefined = 0L; @@ -783,7 +783,7 @@ void InterpreterImp::mark() BooleanImp::staticTrue->mark(); if (BooleanImp::staticFalse && !BooleanImp::staticFalse->marked()) BooleanImp::staticFalse->mark(); - //fprintf( stderr, "InterpreterImp::mark this=%p global.imp()=%p\n", this, global.imp() ); + //fprintf( stderr, "[kjs-internal] InterpreterImp::mark this=%p global.imp()=%p\n", this, global.imp() ); if (global.imp()) global.imp()->mark(); if (m_interpreter) diff --git a/kjs/math_object.cpp b/kjs/math_object.cpp index 6ad8289b0..be4943319 100644 --- a/kjs/math_object.cpp +++ b/kjs/math_object.cpp @@ -122,7 +122,7 @@ Value MathObjectImp::getValueProperty(ExecState *, int token) const d = sqrt(2.0); break; default: - fprintf( stderr, "Internal error in MathObjectImp: unhandled token %d\n", token ); + fprintf( stderr, "[math_object] Internal error in MathObjectImp: unhandled token %d\n", token ); break; } diff --git a/kjs/nodes.cpp b/kjs/nodes.cpp index c6ee18bf1..6bb6cfaae 100644 --- a/kjs/nodes.cpp +++ b/kjs/nodes.cpp @@ -154,10 +154,10 @@ void Node::finalCheck() fprintf(stderr, "Node::finalCheck(): list 0\n"); return; } - fprintf( stderr, "Node::finalCheck(): list count : %d\n", (int)s_nodes->size() ); + fprintf( stderr, "[nodes] Node::finalCheck(): list count : %d\n", (int)s_nodes->size() ); std::list<Node *>::iterator it = s_nodes->begin(); for ( uint i = 0; it != s_nodes->end() ; ++it, ++i ) - fprintf( stderr, "[%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount ); + fprintf( stderr, "[nodes] [%d] Still having node %p (%s) (refcount %d)\n", i, (void*)*it, typeid( **it ).name(), (*it)->refcount ); delete s_nodes; s_nodes = 0L; } diff --git a/kjs/object.cpp b/kjs/object.cpp index fba1e0257..9afdb6c35 100644 --- a/kjs/object.cpp +++ b/kjs/object.cpp @@ -210,7 +210,7 @@ void ObjectImp::put(ExecState *exec, const Identifier &propertyName, // and let it override the canPut() check. if ((attr == None || attr == DontDelete) && !canPut(exec,propertyName)) { #ifdef KJS_VERBOSE - fprintf( stderr, "WARNING: canPut %s said NO\n", propertyName.ascii() ); + fprintf( stderr, "[kjs-object] WARNING: canPut %s said NO\n", propertyName.ascii() ); #endif return; } |