aboutsummaryrefslogtreecommitdiff
path: root/src/ldebug.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-08 15:41:19 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-08 16:07:38 +1000
commite67fb5f4cb51fbf4061ab647ef08ef4893b7f0e4 (patch)
treef42bc3854fe31ec86324dd55725d1d3ff963cf2e /src/ldebug.js
parent41ad8917ca15b275c8aca20f6e3907a08ae7ad15 (diff)
downloadfengari-e67fb5f4cb51fbf4061ab647ef08ef4893b7f0e4.tar.gz
fengari-e67fb5f4cb51fbf4061ab647ef08ef4893b7f0e4.tar.bz2
fengari-e67fb5f4cb51fbf4061ab647ef08ef4893b7f0e4.zip
Add accessors to TValue for TString values
Diffstat (limited to 'src/ldebug.js')
-rw-r--r--src/ldebug.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index fc5e378..af9b9a9 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -297,7 +297,7 @@ const kname = function(p, pc, c) {
if (OC.ISK(c)) { /* is 'c' a constant? */
let kvalue = p.k[OC.INDEXK(c)];
if (kvalue.ttisstring()) { /* literal constant? */
- r.name = kvalue.value; /* it is its own name */
+ r.name = kvalue.svalue(); /* it is its own name */
return r;
}
/* else no reasonable name found */
@@ -408,7 +408,7 @@ const getobjname = function(p, lastpc, reg) {
case 'OP_LOADKX': {
let b = op === 'OP_LOADK' ? i.Bx : p.code[pc + 1].Ax;
if (p.k[b].ttisstring()) {
- r.name = p.k[b].value;
+ r.name = p.k[b].tsvalue();
r.funcname = defs.to_luastring("constant", true);
return r;
}