| 106 | static void dumpFunction(DumpState *D, const Proto *f, TString *psource); |
| 107 | |
| 108 | static void dumpConstants (DumpState *D, const Proto *f) { |
| 109 | int i; |
| 110 | int n = f->sizek; |
| 111 | dumpInt(D, n); |
| 112 | for (i = 0; i < n; i++) { |
| 113 | const TValue *o = &f->k[i]; |
| 114 | int tt = ttypetag(o); |
| 115 | dumpByte(D, tt); |
| 116 | switch (tt) { |
| 117 | case LUA_VNUMFLT: |
| 118 | dumpNumber(D, fltvalue(o)); |
| 119 | break; |
| 120 | case LUA_VNUMINT: |
| 121 | dumpInteger(D, ivalue(o)); |
| 122 | break; |
| 123 | case LUA_VSHRSTR: |
| 124 | case LUA_VLNGSTR: |
| 125 | dumpString(D, tsvalue(o)); |
| 126 | break; |
| 127 | default: |
| 128 | lua_assert(tt == LUA_VNIL || tt == LUA_VFALSE || tt == LUA_VTRUE); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | |
| 134 | static void dumpProtos (DumpState *D, const Proto *f) { |
no test coverage detected