MCPcopy Create free account
hub / github.com/crownengine/crown / dobytecode

Function dobytecode

3rdparty/luajit/src/luajit.c:377–392  ·  view source on GitHub ↗

Save or list bytecode. */

Source from the content-addressed store, hash-verified

375
376/* Save or list bytecode. */
377static int dobytecode(lua_State *L, char **argv)
378{
379 int narg = 0;
380 lua_pushliteral(L, "bcsave");
381 if (loadjitmodule(L))
382 return 1;
383 if (argv[0][2]) {
384 narg++;
385 argv[0][1] = '-';
386 lua_pushstring(L, argv[0]+1);
387 }
388 for (argv++; *argv != NULL; narg++, argv++)
389 lua_pushstring(L, *argv);
390 report(L, lua_pcall(L, narg, 0, 0));
391 return -1;
392}
393
394/* check that argument has no extra characters at the end */
395#define notail(x) {if ((x)[2] != '\0') return -1;}

Callers 1

runargsFunction · 0.85

Calls 4

loadjitmoduleFunction · 0.85
lua_pushstringFunction · 0.70
reportFunction · 0.70
lua_pcallFunction · 0.70

Tested by

no test coverage detected