issue #15 set savedpc prior to entering a JITed function

pull/81/head
dibyendumajumdar 9 years ago
parent c4b7141a4e
commit 65bc503fdc

@ -151,9 +151,7 @@ report"gc.lua"
local f = assert(loadfile('gc.lua'))
f()
--if not ravi or not ravi.auto() then
dofile('db.lua')
--end
assert(dofile('calls.lua') == deep and deep)
olddofile('strings.lua')
olddofile('literals.lua')
@ -178,9 +176,7 @@ dofile('vararg.lua')
dofile('closure.lua')
dofile('coroutine.lua')
dofile('goto.lua', true)
if not ravi or not ravi.auto() then
dofile('errors.lua')
end
dofile('errors.lua')
dofile('math.lua')
dofile('sort.lua', true)
dofile('bitwise.lua')

@ -359,10 +359,7 @@ if not _soft then
end
local i=1
while stack[i] ~= l1 do
-- RAVI bug
if not ravi or ravi.auto() and i > 1 then
assert(stack[i] == l)
end
i = i+1
end
assert(i > 15)

@ -378,6 +378,13 @@ int luaD_precall (lua_State *L, StkId func, int nresults, int op_call) {
/* compiled */
lua_assert(p->ravi_jit.jit_function != NULL);
ci->jitstatus = 1;
/* Since the JITed function does not update savedpc
* other than for calls by default - the stack trace error
* message below will be unable to find the line info
* as savedpc is not set correctly - so we set this here
* prior to the call
*/
ci->u.l.savedpc++;
/* As JITed function is like a C function
* employ the same restrictions on recursive
* calls as for C functions

Loading…
Cancel
Save