help-smalltalk
[Top][All Lists]
Advanced

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

[Help-smalltalk] [bug] Line numbers not reported at start of blocks


From: Mark Bush
Subject: [Help-smalltalk] [bug] Line numbers not reported at start of blocks
Date: Sat, 10 May 2014 09:25:47 -0700

Issue status update for http://smalltalk.gnu.org/node/858 Post a follow up: http://smalltalk.gnu.org/project/comments/add/858

Project:      GNU Smalltalk
Version:      <none>
Component:    VM
Category:     bug reports
Priority:     normal
Assigned to:  Unassigned
Reported by:  bush
Updated by:   bush
Status:       active

At the start of a block, a line number bytecode is not generated.  This
is compounded when blocks contain only statements that are messages to
blocks or when blocks are stored for later evaluation.

The following code will highlight this:
[ [
  Processor activeProcess context backtrace
] value.
[
  Processor activeProcess context backtrace
] value
] value

Evaluation will produce:
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:3)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:1)
UndefinedObject>>executeStatements (LineNumberTest.st:1)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:6)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:1)
UndefinedObject>>executeStatements (LineNumberTest.st:1)

The second and fifth output lines are showing the start of the outer
block, but should be showing the start of the inner blocks.

The code to request a line number bytecode is in libgst/comp.c (line
1227) using flag LN_FORCE, but in libgst/byte.c this does not generate a
line number bytecode.  The enclosed patch will allow a line number
bytecode to be produced in this situation (this is the only place where
LN_FORCE is used).  With this, the output from the above code becomes:
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:3)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:2)
UndefinedObject>>executeStatements (LineNumberTest.st:1)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:6)
optimized [] in UndefinedObject>>executeStatements (LineNumberTest.st:5)
UndefinedObject>>executeStatements (LineNumberTest.st:1)

Here, the correct lines for the inner blocks are displayed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]