orc-lang / orc

Orc programming language implementation
https://orc.csres.utexas.edu/
BSD 3-Clause "New" or "Revised" License
40 stars 3 forks source link

OIL AST node source code position wrong for values #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Procedure to Repeat:
Compile and dump OIL on a program like:
----
def f() = signal

f
----
or
----
import site Let = "orc.lib.builtin.Let"

Let | Let
----

Expected / Actual Results:
The OIL AST nodes at the point of use of "f" and "Let" in the above examples 
have an incorrect source code position.

Version and Platform:
SVN r3168 and earlier

Reporter's Comments:
When a name is bound, the AST node (BoundVar or Constant) of its definition is 
added to the environment.  When it is referred to, that node is added to the 
AST, but it carries position data from its binding point, or no position.  If 
it has not position, the position will be set to its first point of use, which 
causes extremely confusing diagnostics to be issued.

Original issue reported on code.google.com by jthywissen on 26 Jan 2013 at 9:02

GoogleCodeExporter commented 9 years ago
orc.compile.translate.Translator.convert creates Constants without a pos for 
SiteImport and ClassImport

Original comment by jthywissen on 26 Jan 2013 at 9:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r3241.

Original comment by jthywissen on 9 Aug 2013 at 1:13