diff options
author | Mike Pall <mike> | 2009-12-08 20:35:29 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2009-12-08 20:35:29 +0100 |
commit | 3f1f9e11f4f699ae94182d4cba158092f434a7f6 (patch) | |
tree | 88fbb674a21a1d554d4b1ee9d4ef2c5fed6a1d88 /src/lj_meta.c | |
parent | 5287b9326479ea2b7dddd6f642673e58e5a7f354 (diff) | |
download | luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.gz luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.bz2 luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.zip |
Fast forward to sync public repo.
Compile math.sinh(), math.cosh(), math.tanh() and math.random().
Compile various io.*() functions.
Drive the GC forward on string allocations in the parser.
Improve KNUM fuse vs. load heuristics.
Add abstract C call handling to IR.
Diffstat (limited to 'src/lj_meta.c')
-rw-r--r-- | src/lj_meta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_meta.c b/src/lj_meta.c index dff01f85..1182d908 100644 --- a/src/lj_meta.c +++ b/src/lj_meta.c | |||
@@ -60,7 +60,7 @@ cTValue *lj_meta_lookup(lua_State *L, cTValue *o, MMS mm) | |||
60 | else if (tvisudata(o)) | 60 | else if (tvisudata(o)) |
61 | mt = tabref(udataV(o)->metatable); | 61 | mt = tabref(udataV(o)->metatable); |
62 | else | 62 | else |
63 | mt = tabref(G(L)->basemt[itypemap(o)]); | 63 | mt = tabref(basemt_obj(G(L), o)); |
64 | if (mt) { | 64 | if (mt) { |
65 | cTValue *mo = lj_tab_getstr(mt, strref(G(L)->mmname[mm])); | 65 | cTValue *mo = lj_tab_getstr(mt, strref(G(L)->mmname[mm])); |
66 | if (mo) | 66 | if (mo) |
@@ -157,7 +157,7 @@ static cTValue *str2num(cTValue *o, TValue *n) | |||
157 | { | 157 | { |
158 | if (tvisnum(o)) | 158 | if (tvisnum(o)) |
159 | return o; | 159 | return o; |
160 | else if (tvisstr(o) && lj_str_numconv(strVdata(o), n)) | 160 | else if (tvisstr(o) && lj_str_tonum(strV(o), n)) |
161 | return n; | 161 | return n; |
162 | else | 162 | else |
163 | return NULL; | 163 | return NULL; |
@@ -295,7 +295,7 @@ TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne) | |||
295 | top = curr_top(L); | 295 | top = curr_top(L); |
296 | setcont(top, ne ? lj_cont_condf : lj_cont_condt); | 296 | setcont(top, ne ? lj_cont_condf : lj_cont_condt); |
297 | copyTV(L, top+1, mo); | 297 | copyTV(L, top+1, mo); |
298 | it = o1->gch.gct == ~LJ_TTAB ? LJ_TTAB : LJ_TUDATA; | 298 | it = ~o1->gch.gct; |
299 | setgcV(L, top+2, &o1->gch, it); | 299 | setgcV(L, top+2, &o1->gch, it); |
300 | setgcV(L, top+3, &o2->gch, it); | 300 | setgcV(L, top+3, &o2->gch, it); |
301 | return top+2; /* Trigger metamethod call. */ | 301 | return top+2; /* Trigger metamethod call. */ |