lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 25 January 2011 13:40, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Tue, Jan 25, 2011 at 3:29 PM, Alexander Gladysh <agladysh@gmail.com> wrote:
>> Maybe metainformation in comments?
>
> Or as simple as this: the code generator puts out a big array mapping
> output source lines to input source lines (and of course filenames, if
> they're not 1-to-1). This is part of the generated source, maybe at
> the end. The redefined error() grabs the stack trace and changes all
> output source lines to input source lines.
>

That's such a hack, I might use it for squish's debug mode :)

I was patching bytecode, but that doesn't always go well in some cases
and I didn't have time to fix it. Also it won't work with LJ2 anyway.

Matthew