Add binding anchors; make profile-all use srcspan from anchors - #7730
Add binding anchors; make profile-all use srcspan from anchors#7730SeungheonOh wants to merge 2 commits into
profile-all use srcspan from anchors#7730Conversation
Execution Budget Golden Diffoutputplutus-tx-plugin/test/BuiltinList/NoCasing/9.12/unsafeUnconsOk.golden.eval
plutus-tx-plugin/test/BuiltinList/NoCasing/9.6/unsafeUnconsOk.golden.eval
plutus-tx-plugin/test/CallTrace/9.12/successfullEvaluationYieldsNoTraceLog.golden.eval
plutus-tx-plugin/test/CallTrace/9.6/successfullEvaluationYieldsNoTraceLog.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodeA.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodeC.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodeMixedNone.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodeMixedTwo.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodePairA.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodePairB.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.12/decodeSingle.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodeA.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodeC.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodeMixedNone.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodeMixedTwo.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodePairA.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodePairB.golden.eval
plutus-tx-plugin/test/IsData/Budget/SoP/9.6/decodeSingle.golden.eval
This comment will get updated when changes are made. |
| anchor for every hoisted binding, so profile-trace output identifies which | ||
| function was entered (the span points to the binder, not an arbitrary | ||
| sub-expression). See issue #7722. -} | ||
| anchorBinding |
There was a problem hiding this comment.
we are using same anchor function that's being used for anchoring expressions. It's working okay at the moment, but maybe in the future we want to separate binding anchors with some other anchor function like bindingAnchor so that it can be distinguished more easily
|
|
||
| {-| Find the first @anchor@-carried 'RealSrcSpan' anywhere inside a 'CoreExpr', | ||
| descending through applications, lambdas, lets, cases, casts, and ticks. | ||
| Useful when the immediate head of the expression is not an anchor call |
There was a problem hiding this comment.
Do you have an example where the immediate head of the expression is not an anchor call, because it was hoisted?
There was a problem hiding this comment.
Looking back, I don't think this is the case anymore after adding binding anchor.
9748b98 to
d47d3bb
Compare
d47d3bb to
a58eea9
Compare
|
I redid everything with a different approach: instead of using original |
|
Does |
|
It would be useful to expand the Haddock for |
|
|
closes #7722
Added anchors to bindings; added anchors can be used in
profile-allwhich is used for profiling and call tracing to mark function entrance/exit source span.Previously, function entrance and exit source span was extracted from GHC.Var which only gave source span when the module was freshly compiled. When module was not compiled and cache was used from previous compilation, GHC.Var will not provide any source span. New anchor based source span fixes this and provide correct source span even when module compilation is cached.