jazzdotdev / jazz

The Scripting Engine that Combines Speed, Safety, and Simplicity
Apache License 2.0
146 stars 11 forks source link

Modify Lua module loader to trace each variable operated on in every loop #197

Open naturallymitchell opened 5 years ago

naturallymitchell commented 5 years ago

whenever a table is used as an argument and a loop is done over it, add a log.trace() for the current object in the loop. if it has a name, then use that for the log message, like https://github.com/foundpatterns/lighttouch-base/blob/3df4388e79f98e2ed364329179d41d910edc77e7/loaders/classes.lua#L1-L2

similar to #167

naturallymitchell commented 5 years ago

also related to https://github.com/foundpatterns/log.lua/issues/1 https://stackoverflow.com/questions/30499774/tracing-methods-execution-time "code weaving"

naturallymitchell commented 5 years ago

move to https://github.com/foundpatterns/torchbear-libs/issues/2 with https://github.com/foundpatterns/torchbear/issues/212