|Anonymous | Login | Signup for a new account||2017-03-25 18:31 PDT|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001779||Inform 6||General||public||2015-11-19 14:43||2016-10-01 12:40|
|Target Version||Fixed in Version|
|Summary||0001779: Feature: #origsource directive|
|Description||When compiling I7 to I6 code, we might want to record the I7 line number that corresponds to I6 line numbers. We can then use this information when reporting I6 compile errors, and in the gamedbg (-k) file.|
#origsource FILE LINE;
#origsource FILE LINE CHAR;
The first three forms set position information, describing a source location in the I7 file (or whatever is generating the I6). FILE is a quoted string; LINE and CHAR are (optional) nonnegative integers. The position information sticks until the next #origsource directive. (But does not carry down into #included files.)
The fourth form unsets the position information.
|Tags||No tags attached.|
I have started on this -- see my https://github.com/erkyrath/inform6/tree/origsource [^] branch. It's not finished yet.
It turns out to require a moderate amount of code surgery, because we want to put the #origsource file references in the InputFiles table. But the lexer assumes that any new entry in InputFiles is a freshly-opened #include file. I had to add some logic to tell the difference.
The good news is that for any game without #origsource directives (i.e., all existing I6 and I7 code) none of this logic makes a difference.
|I may wind up changing the slines array (in symbols.c) from int32 to structs. (It currently records source file/line in a compressed format, which is hacky to begin with. We'd like to record source file/line *and* the #origsource file/line, if available.)|
|Also: the current debug-file spec says that the <language> of a source location can be "Inform 6" or "Inform 7". I will be setting #origsource up to generate "Inform 7", because that's the only option on the horizon. However, we might someday want an option to change this.|
|Because of the bulkier structures, Inform now uses more memory and is slightly slower *even when the #origsource directive is not used*. My tests indicate that it's about 4% slower on most compiles. This is not a huge cost -- I6 is only a small fraction of the time of an I7 compile anyhow. But it's enough that I wanted to bring it up here.|
|I have now merged these changes to (my) master branch. (Many commits starting with dc6c72bd2e4171b51b3501d20856382d2fc63e2a.)|
|2015-11-19 14:43||zarf||New Issue|
|2015-11-19 14:43||zarf||Status||new => assigned|
|2015-11-19 14:43||zarf||Assigned To||=> zarf|
|2016-08-08 13:19||zarf||Note Added: 0004524|
|2016-08-08 13:23||zarf||Note Added: 0004525|
|2016-08-08 13:29||zarf||Note Added: 0004526|
|2016-08-17 10:00||zarf||Note Added: 0004527|
|2016-08-19 10:17||zarf||Note Added: 0004528|
|2016-08-19 10:17||zarf||Assigned To||zarf => DavidK|
|2016-10-01 12:40||DavidK||Status||assigned => resolved|
|2016-10-01 12:40||DavidK||Resolution||open => fixed|
|Copyright © 2000 - 2010 MantisBT Group|