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