diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-19 10:57:50 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-19 10:57:50 -0300 |
| commit | d1ef7e0ec6f0b3c40a4abedb3f79a3eaabe01631 (patch) | |
| tree | 38a4baf7abb3c0683fb4d0e5b527d210f7077210 /ldo.c | |
| parent | d513c3c66b3c71412d87a3f24b8f792b7b728e93 (diff) | |
| download | lua-d1ef7e0ec6f0b3c40a4abedb3f79a3eaabe01631.tar.gz lua-d1ef7e0ec6f0b3c40a4abedb3f79a3eaabe01631.tar.bz2 lua-d1ef7e0ec6f0b3c40a4abedb3f79a3eaabe01631.zip | |
avoid local "pc" in interpreter loop (tricky optimization with no real gain)
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 2.41 2006/09/11 12:44:56 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.42 2006/09/11 14:07:24 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -346,8 +346,11 @@ int luaD_poscall (lua_State *L, StkId firstResult) { | |||
| 346 | StkId res; | 346 | StkId res; |
| 347 | int wanted, i; | 347 | int wanted, i; |
| 348 | CallInfo *ci; | 348 | CallInfo *ci; |
| 349 | if (L->hookmask & LUA_MASKRET) | 349 | if (L->hookmask & (LUA_MASKRET | LUA_MASKLINE)) { |
| 350 | firstResult = callrethooks(L, firstResult); | 350 | if (L->hookmask & LUA_MASKRET) |
| 351 | firstResult = callrethooks(L, firstResult); | ||
| 352 | L->oldpc = (L->ci - 1)->savedpc; /* set 'oldpc' for returning function */ | ||
| 353 | } | ||
| 351 | ci = L->ci--; | 354 | ci = L->ci--; |
| 352 | res = ci->func; /* res == final position of 1st result */ | 355 | res = ci->func; /* res == final position of 1st result */ |
| 353 | wanted = ci->nresults; | 356 | wanted = ci->nresults; |
