diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-01-25 11:42:12 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2008-01-25 11:42:12 -0200 |
| commit | dd3519ab89078fb270797332f0d661b5f6b7612a (patch) | |
| tree | e9a9003458dc6487f0712b29f2bd99dd340eda43 | |
| parent | 3a515df086d952e320991e7d7c64fadf9c5364e2 (diff) | |
| download | lua-dd3519ab89078fb270797332f0d661b5f6b7612a.tar.gz lua-dd3519ab89078fb270797332f0d661b5f6b7612a.tar.bz2 lua-dd3519ab89078fb270797332f0d661b5f6b7612a.zip | |
comment (LUA_GLOBALSINDEX does not need write barrier in lua_replace)
| -rw-r--r-- | lapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.61 2007/08/07 16:53:40 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.62 2007/11/28 18:27:38 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -193,6 +193,7 @@ LUA_API void lua_replace (lua_State *L, int idx) { | |||
| 193 | if (idx < LUA_GLOBALSINDEX) /* function upvalue? */ | 193 | if (idx < LUA_GLOBALSINDEX) /* function upvalue? */ |
| 194 | luaC_barrier(L, curr_func(L), L->top - 1); | 194 | luaC_barrier(L, curr_func(L), L->top - 1); |
| 195 | } | 195 | } |
| 196 | /* LUA_GLOBALSINDEX does not need gc barrier (threads are never black) */ | ||
| 196 | L->top--; | 197 | L->top--; |
| 197 | lua_unlock(L); | 198 | lua_unlock(L); |
| 198 | } | 199 | } |
