Skip to content

Commit c348b30

Browse files
committed
Fix binding trace, report symb name instead of demunging lb.name so we don't report _a-bind as -a-bind
1 parent d456439 commit c348b30

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
99
### Bugs fixed
1010

11+
- Fix binding trace, report symb name instead of demunging lb.name so we don't report _a-bind as -a-bind
12+
1113
## 1.12.0-7 (10-03-2025)
1214

1315
### New Features

src/jvm/clojure/storm/Emitter.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,13 @@ public static void emitExprTrace(GeneratorAdapter gen, ObjExpr objx, IPersistent
359359
public static void emitBindTrace(GeneratorAdapter gen, ObjExpr objx, BindingInit bi, IPersistentVector coord) {
360360
Integer formId = (Integer) Compiler.FORM_ID.deref();
361361
if (bindInstrumentationEnable && formId != null) {
362-
String symName = Compiler.demunge(bi.binding().name);
362+
String bindingName = Compiler.demunge(bi.binding().name);
363+
String symName = bi.binding().sym.getName();
363364
Integer bIdx = bi.binding().idx;
364365

365366
if (((objx instanceof FnExpr && !skipInstrumentation(((FnExpr)objx).name())) || (objx instanceof NewInstanceExpr && !skipInstrumentation(((NewInstanceExpr)objx).name()))) &&
366367
coord != null &&
367-
(!(symName.equals("-") || symName.contains("--"))))
368+
(!(bindingName.equals("-") || bindingName.contains("--"))))
368369
{
369370

370371
Type valType = null;
@@ -390,12 +391,13 @@ public static void emitBindTraces(GeneratorAdapter gen, ObjExpr objx, IPersisten
390391
((objx instanceof FnExpr && !skipInstrumentation(((FnExpr) objx).name())) || (objx instanceof NewInstanceExpr && !skipInstrumentation(((NewInstanceExpr) objx).name())))) {
391392

392393
for (int i = 0; i < localBindings.count(); i++) {
393-
394+
394395
LocalBinding lb = (LocalBinding) localBindings.nth(i);
395396

396-
String symName = Compiler.demunge(lb.name);
397+
String bindingName = Compiler.demunge(lb.name);
398+
String symName = lb.sym.getName();
397399

398-
if (coord != null && !(symName.equals("-") || symName.contains("--")) && lb.used) {
400+
if (coord != null && !(bindingName.equals("-") || bindingName.contains("--")) && lb.used) {
399401

400402
objx.emitLocal(gen, lb, false, null);
401403

0 commit comments

Comments
 (0)