mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 15:34:09 +00:00
Implement rawget.
This commit is contained in:
parent
c08fa1c119
commit
60fb35cb68
@ -1189,8 +1189,19 @@ static void build_subroutines(BuildCtx *ctx)
|
|||||||
| j ->fff_res1
|
| j ->fff_res1
|
||||||
|
|
|
|
||||||
|.ffunc_2 rawget
|
|.ffunc_2 rawget
|
||||||
| stg r0, 0(r0)
|
| lg TAB:CARG2, 0(BASE)
|
||||||
| stg r0, 0(r0)
|
| checktab TAB:CARG2, ->fff_fallback
|
||||||
|
| lgr RB, BASE // Save BASE.
|
||||||
|
| la CARG3, 8(BASE)
|
||||||
|
| lg CARG1, SAVE_L
|
||||||
|
| brasl r14, extern lj_tab_get // (lua_State *L, GCtab *t, cTValue *key)
|
||||||
|
| // cTValue * returned in r2 (CRET1).
|
||||||
|
| lgr BASE, RB // Restore BASE.
|
||||||
|
| // Copy table slot.
|
||||||
|
| lg RB, 0(CRET1)
|
||||||
|
| lg PC, -8(BASE)
|
||||||
|
| stg RB, -16(BASE)
|
||||||
|
| j ->fff_res1
|
||||||
|
|
|
|
||||||
|//-- Base library: conversions ------------------------------------------
|
|//-- Base library: conversions ------------------------------------------
|
||||||
|
|
|
|
||||||
|
Loading…
Reference in New Issue
Block a user