Skip to content

Commit

Permalink
add experiemental "atline" feature which removes closures and add spc…
Browse files Browse the repository at this point in the history
…ial "atline" tag for better stack trace. Only supported on specially built spidermonkey platforms
  • Loading branch information
client9 committed Apr 26, 2010
1 parent 5f17715 commit 994b48f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions misc/build.py
Expand Up @@ -42,9 +42,11 @@ def concat(base, src, outfile, atline=True, platform=None):
for f in files:
fname = os.path.join(base, src, f)
data = open(fname, 'r')
if atline:
if atline and f != 'common/outro.js' and f != 'common/intro.js':
outfile.write('\n//@line 1 "' + f + '"\n')
outfile.write(data.read())
outfile.write(data.read())
else:
outfile.write(data.read())
data.close()

if __name__ == '__main__':
Expand All @@ -59,6 +61,8 @@ def concat(base, src, outfile, atline=True, platform=None):
help="Destination directory, default 'dist'")
parser.add_option('-p', '--platform', dest='platform', default='',
help="platform type, optional. Defaults to core platform. 'rhino' is the only value supported")
parser.add_option('-a', '--atline', dest='atline', action="store_true",
help="platform type, optional. Defaults to core platform. 'rhino' is the only value supported")
(options, args) = parser.parse_args()

outname = 'env.js'
Expand All @@ -69,5 +73,7 @@ def concat(base, src, outfile, atline=True, platform=None):

concat(os.path.expanduser(options.top),
os.path.expanduser(options.src),
os.path.expanduser(outfile), atline=True, platform=options.platform)
os.path.expanduser(outfile),
atline=options.atline,
platform=options.platform)

0 comments on commit 994b48f

Please sign in to comment.