# HG changeset patch # User Matthew Wild # Date 1290251461 0 # Node ID e9da9847121ad1743aef98ce4cb21110d30aba28 # Parent 298efa276aff547e6c34ffb33f906a5bda7995d8 Pass sourceName to child chunks (in binary files it's only set in the top-level chunk) diff -r 298efa276aff -r e9da9847121a lvm.js --- a/lvm.js Sat Nov 20 11:07:24 2010 +0000 +++ b/lvm.js Sat Nov 20 11:11:01 2010 +0000 @@ -150,12 +150,14 @@ } }; -function LBinaryChunk(vm, chunk, start) +function LBinaryChunk(vm, chunk, start, sourceName) { this.chunk = chunk; this.pos = start||12; this.sourceName = this.readString(); + if(sourceName) + this.sourceName = sourceName; this.lineDefined = this.readInt(); this.lastLineDefined = this.readInt(); this.numUpvalues = this.readByte(); @@ -212,7 +214,7 @@ this.numPrototypes = this.readInt(); for(var i=0;i