@@ -200,18 +200,19 @@ void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
200
200
for (loop = 0 ; loop < MAXTAGLOOP ; loop ++ ) {
201
201
const TValue * tm ;
202
202
if (oldval != NULL ) {
203
- lua_assert (ttistable (t ) && ttisnil (oldval ));
203
+ Table * h = hvalue (t );
204
+ lua_assert (ttisnil (oldval ));
204
205
/* must check the metamethod */
205
- if ((tm = fasttm (L , hvalue ( t ) -> metatable , TM_NEWINDEX )) == NULL &&
206
+ if ((tm = fasttm (L , h -> metatable , TM_NEWINDEX )) == NULL &&
206
207
/* no metamethod; is there a previous entry in the table? */
207
208
(oldval != luaO_nilobject ||
208
209
/* no previous entry; must create one. (The next test is
209
210
always true; we only need the assignment.) */
210
- (oldval = luaH_newkey (L , hvalue ( t ) , key ), 1 ))) {
211
+ (oldval = luaH_newkey (L , h , key ), 1 ))) {
211
212
/* no metamethod and (now) there is an entry with given key */
212
213
setobj2t (L , cast (TValue * , oldval ), val );
213
- invalidateTMcache (hvalue ( t ) );
214
- luaC_barrierback (L , hvalue ( t ) , val );
214
+ invalidateTMcache (h );
215
+ luaC_barrierback (L , h , val );
215
216
return ;
216
217
}
217
218
/* else will try the metamethod */
0 commit comments