Changeset 7786 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Oct 7, 2004, 2:30:47 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r7105 r7786 40 40 #include "nodes.h" 41 41 42 #ifndef NDEBUG 43 #define JAVASCRIPT_CALL_TRACING Yes 44 #endif 45 46 #ifdef JAVASCRIPT_CALL_TRACING 47 static bool traceJavaScript = false; 48 49 extern "C" { 50 void setTraceJavaScript(bool f) 51 { 52 traceJavaScript = f; 53 } 54 55 static bool traceJavaScript() 56 { 57 return traceJavaScript; 58 } 59 } 60 #endif 61 42 62 namespace KJS { 43 63 … … 57 77 #if KJS_MAX_STACK > 0 58 78 static int depth = 0; // sum of all concurrent interpreters 79 80 #ifdef JAVASCRIPT_CALL_TRACING 81 static bool tracing = false; 82 if (javaScriptTrace() && !tracing) { 83 tracing = true; 84 for (int i = 0; i < depth; i++) 85 putchar (' '); 86 printf ("*** calling: %s\n", toString(exec).ascii()); 87 for (int j = 0; j < args.size(); j++) { 88 for (int i = 0; i < depth; i++) 89 putchar (' '); 90 printf ("*** arg[%d] = %s\n", j, args[j].toString(exec).ascii()); 91 } 92 tracing = false; 93 } 94 #endif 95 59 96 if (++depth > KJS_MAX_STACK) { 60 97 --depth; … … 70 107 #if KJS_MAX_STACK > 0 71 108 --depth; 109 #endif 110 111 #ifdef JAVASCRIPT_CALL_TRACING 112 if (javaScriptTrace() && !tracing) { 113 tracing = true; 114 for (int i = 0; i < depth; i++) 115 putchar (' '); 116 printf ("*** returning: %s\n", ret.toString(exec).ascii()); 117 tracing = false; 118 } 72 119 #endif 73 120
Note:
See TracChangeset
for help on using the changeset viewer.