diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-20 16:20:43 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-03-20 16:20:43 -0300 |
| commit | 5d60470508aad81eac145ab4e004fbf150130267 (patch) | |
| tree | e019d25234bccc195614a7303520db0b86aca2ed /fallback.h | |
| parent | 88d7ffb0d0c7303ef1b766b1100e4220e775ab57 (diff) | |
| download | lua-5d60470508aad81eac145ab4e004fbf150130267.tar.gz lua-5d60470508aad81eac145ab4e004fbf150130267.tar.bz2 lua-5d60470508aad81eac145ab4e004fbf150130267.zip | |
i.m. "arith" and "order" splited for different operations
Diffstat (limited to 'fallback.h')
| -rw-r--r-- | fallback.h | 60 |
1 files changed, 43 insertions, 17 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: fallback.h,v 1.14 1997/02/26 17:38:41 roberto Unstable roberto $ | 2 | ** $Id: fallback.h,v 1.15 1997/03/19 19:41:10 roberto Exp roberto $ |
| 3 | */ | 3 | */ |
| 4 | 4 | ||
| 5 | #ifndef fallback_h | 5 | #ifndef fallback_h |
| @@ -8,19 +8,44 @@ | |||
| 8 | #include "lua.h" | 8 | #include "lua.h" |
| 9 | #include "opcode.h" | 9 | #include "opcode.h" |
| 10 | 10 | ||
| 11 | #define IM_GETTABLE 0 | 11 | /* |
| 12 | #define IM_ARITH 1 | 12 | * WARNING: if you change the order of this enumeration, |
| 13 | #define IM_ORDER 2 | 13 | * grep "ORDER IM" |
| 14 | #define IM_CONCAT 3 | 14 | */ |
| 15 | #define IM_SETTABLE 4 | 15 | typedef enum { |
| 16 | #define IM_GC 5 | 16 | IM_GETTABLE = 0, |
| 17 | #define IM_FUNCTION 6 | 17 | IM_SETTABLE, |
| 18 | #define IM_INDEX 7 | 18 | IM_INDEX, |
| 19 | #define IM_N 8 | 19 | IM_ADD, |
| 20 | 20 | IM_SUB, | |
| 21 | #define GIM_ERROR 0 | 21 | IM_MUL, |
| 22 | #define GIM_GETGLOBAL 1 | 22 | IM_DIV, |
| 23 | #define GIM_SETGLOBAL 2 | 23 | IM_POW, |
| 24 | IM_UNM, | ||
| 25 | IM_LT, | ||
| 26 | IM_LE, | ||
| 27 | IM_GT, | ||
| 28 | IM_GE, | ||
| 29 | IM_CONCAT, | ||
| 30 | IM_GC, | ||
| 31 | IM_FUNCTION | ||
| 32 | } IMS; | ||
| 33 | |||
| 34 | #define IM_N 16 | ||
| 35 | |||
| 36 | extern char *luaI_eventname[]; | ||
| 37 | |||
| 38 | |||
| 39 | /* | ||
| 40 | * WARNING: if you change the order of this enumeration, | ||
| 41 | * grep "ORDER GIM" | ||
| 42 | */ | ||
| 43 | typedef enum { | ||
| 44 | GIM_ERROR = 0, | ||
| 45 | GIM_GETGLOBAL, | ||
| 46 | GIM_SETGLOBAL | ||
| 47 | } IMGS; | ||
| 48 | |||
| 24 | #define GIM_N 3 | 49 | #define GIM_N 3 |
| 25 | 50 | ||
| 26 | void luaI_setfallback (void); | 51 | void luaI_setfallback (void); |
| @@ -30,11 +55,12 @@ void luaI_travlock (int (*fn)(Object *)); | |||
| 30 | void luaI_invalidaterefs (void); | 55 | void luaI_invalidaterefs (void); |
| 31 | char *luaI_travfallbacks (int (*fn)(Object *)); | 56 | char *luaI_travfallbacks (int (*fn)(Object *)); |
| 32 | 57 | ||
| 58 | void luaI_type (void); | ||
| 33 | void luaI_settag (int tag, Object *o); | 59 | void luaI_settag (int tag, Object *o); |
| 34 | lua_Type luaI_typetag (int tag); | 60 | lua_Type luaI_typetag (int tag); |
| 35 | Object *luaI_getim (int tag, int event); | 61 | Object *luaI_getim (int tag, IMS event); |
| 36 | Object *luaI_getgim (int event); | 62 | Object *luaI_getgim (IMGS event); |
| 37 | Object *luaI_getimbyObj (Object *o, int event); | 63 | Object *luaI_getimbyObj (Object *o, IMS event); |
| 38 | int luaI_tag (Object *o); | 64 | int luaI_tag (Object *o); |
| 39 | void luaI_setintmethod (void); | 65 | void luaI_setintmethod (void); |
| 40 | void luaI_setglobalmethod (void); | 66 | void luaI_setglobalmethod (void); |
