@jdeighan/coffee-utils 6.0.6 → 6.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/call_stack.coffee +4 -4
- package/src/call_stack.js +5 -5
- package/src/log_utils.coffee +2 -0
- package/src/log_utils.js +3 -0
package/package.json
CHANGED
package/src/call_stack.coffee
CHANGED
@@ -26,7 +26,7 @@ export class CallStack
|
|
26
26
|
|
27
27
|
if doDebugStack
|
28
28
|
prefix = ' '.repeat(@lStack.length)
|
29
|
-
LOG "#{prefix}[CALL #{funcName}]"
|
29
|
+
LOG "#{prefix}[> CALL #{funcName}]"
|
30
30
|
@lStack.push({funcName, hInfo})
|
31
31
|
return
|
32
32
|
|
@@ -37,14 +37,14 @@ export class CallStack
|
|
37
37
|
if @lStack.length == 0
|
38
38
|
LOG "returnFrom('#{fName}') but stack is empty"
|
39
39
|
return undef
|
40
|
-
if doDebugStack
|
41
|
-
prefix = ' '.repeat(@lStack.length-1)
|
42
|
-
LOG "#{prefix}[RETURN FROM #{fName}]"
|
43
40
|
{funcName, hInfo} = @lStack.pop()
|
44
41
|
while (funcName != fName) && (@lStack.length > 0)
|
45
42
|
LOG "[MISSING RETURN FROM #{funcName} (return from #{fName})]"
|
46
43
|
{funcName, hInfo} = @lStack.pop()
|
47
44
|
|
45
|
+
if doDebugStack
|
46
|
+
prefix = ' '.repeat(@lStack.length)
|
47
|
+
LOG "#{prefix}[< BACK #{fName}]"
|
48
48
|
if (funcName == fName)
|
49
49
|
return hInfo
|
50
50
|
else
|
package/src/call_stack.js
CHANGED
@@ -31,7 +31,7 @@ export var CallStack = class CallStack {
|
|
31
31
|
var prefix;
|
32
32
|
if (doDebugStack) {
|
33
33
|
prefix = ' '.repeat(this.lStack.length);
|
34
|
-
LOG(`${prefix}[CALL ${funcName}]`);
|
34
|
+
LOG(`${prefix}[> CALL ${funcName}]`);
|
35
35
|
}
|
36
36
|
this.lStack.push({funcName, hInfo});
|
37
37
|
}
|
@@ -43,15 +43,15 @@ export var CallStack = class CallStack {
|
|
43
43
|
LOG(`returnFrom('${fName}') but stack is empty`);
|
44
44
|
return undef;
|
45
45
|
}
|
46
|
-
if (doDebugStack) {
|
47
|
-
prefix = ' '.repeat(this.lStack.length - 1);
|
48
|
-
LOG(`${prefix}[RETURN FROM ${fName}]`);
|
49
|
-
}
|
50
46
|
({funcName, hInfo} = this.lStack.pop());
|
51
47
|
while ((funcName !== fName) && (this.lStack.length > 0)) {
|
52
48
|
LOG(`[MISSING RETURN FROM ${funcName} (return from ${fName})]`);
|
53
49
|
({funcName, hInfo} = this.lStack.pop());
|
54
50
|
}
|
51
|
+
if (doDebugStack) {
|
52
|
+
prefix = ' '.repeat(this.lStack.length);
|
53
|
+
LOG(`${prefix}[< BACK ${fName}]`);
|
54
|
+
}
|
55
55
|
if (funcName === fName) {
|
56
56
|
return hInfo;
|
57
57
|
} else {
|
package/src/log_utils.coffee
CHANGED
package/src/log_utils.js
CHANGED