aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-22 13:37:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-03-22 13:37:17 -0300
commit23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff (patch)
treeb8f01be3b195252ecb414092dce98299fc325a54 /ltm.h
parent682054920ddc434fd4a7f8cc78027dbb03f47f00 (diff)
downloadlua-23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff.tar.gz
lua-23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff.tar.bz2
lua-23e6bac8a0bbb9e5df43cbc0b7634b6d1395b0ff.zip
Keep correct type for immediate operands in comparisons
When calling metamethods for things like 'a < 3.0', which generates the opcode OP_LTI, the C register tells that the operand was converted to an integer, so that it can be corrected to float when calling a metamethod. This commit also includes some other stuff: - file 'onelua.c' added to the project - opcode OP_PREPVARARG renamed to OP_VARARGPREP - comparison opcodes rewritten through macros
Diffstat (limited to 'ltm.h')
-rw-r--r--ltm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ltm.h b/ltm.h
index fad47842..e308fb80 100644
--- a/ltm.h
+++ b/ltm.h
@@ -82,7 +82,7 @@ LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
82LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, 82LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,
83 const TValue *p2, TMS event); 83 const TValue *p2, TMS event);
84LUAI_FUNC int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2, 84LUAI_FUNC int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2,
85 int inv, TMS event); 85 int inv, int isfloat, TMS event);
86 86
87LUAI_FUNC void luaT_adjustvarargs (lua_State *L, int nfixparams, 87LUAI_FUNC void luaT_adjustvarargs (lua_State *L, int nfixparams,
88 struct CallInfo *ci, const Proto *p); 88 struct CallInfo *ci, const Proto *p);