Closed stepancheg closed 11 years ago
The patch looks good; nice catch. String table constants are emitted as a length followed by the string contents, and the return value of stringTableConstant is a pointer to the length, so 3 is the correct answer for your example.
After some thinking I managed to reproduce a problem: 9313b1ffff01830b2c9759fdd9199066c3fbcadb.
I found a bug in code, but I cannot reproduce it.
evalStringTableConstant
function is called (I checked in debugger), but result seems to be ignored somehow. For instance, I tried this test:It outputs
3
, and not junk as I thought.Any idea how to write a unit test for the issue?