mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
@@ -18,6 +18,7 @@
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
#include "lapi.h"
|
||||
#include "ldebug.h"
|
||||
#include "lobject.h"
|
||||
#include "lopcodes.h"
|
||||
@@ -346,6 +347,8 @@ static void PrintCode(const Proto* f)
|
||||
int bx=GETARG_Bx(i);
|
||||
int sb=GETARG_sB(i);
|
||||
int sc=GETARG_sC(i);
|
||||
int vb=GETARG_vB(i);
|
||||
int vc=GETARG_vC(i);
|
||||
int sbx=GETARG_sBx(i);
|
||||
int isk=GETARG_k(i);
|
||||
int line=luaG_getfuncline(f,pc);
|
||||
@@ -427,8 +430,8 @@ static void PrintCode(const Proto* f)
|
||||
if (isk) { printf(" "); PrintConstant(f,c); }
|
||||
break;
|
||||
case OP_NEWTABLE:
|
||||
printf("%d %d %d",a,b,c);
|
||||
printf(COMMENT "%d",c+EXTRAARGC);
|
||||
printf("%d %d %d%s",a,vb,vc,ISK);
|
||||
printf(COMMENT "%d",vc+EXTRAARGC);
|
||||
break;
|
||||
case OP_SELF:
|
||||
printf("%d %d %d%s",a,b,c,ISK);
|
||||
@@ -477,10 +480,10 @@ static void PrintCode(const Proto* f)
|
||||
printf("%d %d %d",a,b,c);
|
||||
printf(COMMENT); PrintConstant(f,c);
|
||||
break;
|
||||
case OP_SHRI:
|
||||
case OP_SHLI:
|
||||
printf("%d %d %d",a,b,sc);
|
||||
break;
|
||||
case OP_SHLI:
|
||||
case OP_SHRI:
|
||||
printf("%d %d %d",a,b,sc);
|
||||
break;
|
||||
case OP_ADD:
|
||||
@@ -632,7 +635,7 @@ static void PrintCode(const Proto* f)
|
||||
printf(COMMENT "to %d",pc-bx+2);
|
||||
break;
|
||||
case OP_SETLIST:
|
||||
printf("%d %d %d",a,b,c);
|
||||
printf("%d %d %d%s",a,vb,vc,ISK);
|
||||
if (isk) printf(COMMENT "%d",c+EXTRAARGC);
|
||||
break;
|
||||
case OP_CLOSURE:
|
||||
@@ -640,10 +643,18 @@ static void PrintCode(const Proto* f)
|
||||
printf(COMMENT "%p",VOID(f->p[bx]));
|
||||
break;
|
||||
case OP_VARARG:
|
||||
printf("%d %d",a,c);
|
||||
printf("%d %d %d%s",a,b,c,ISK);
|
||||
printf(COMMENT);
|
||||
if (c==0) printf("all out"); else printf("%d out",c-1);
|
||||
break;
|
||||
case OP_GETVARG:
|
||||
printf("%d %d %d",a,b,c);
|
||||
break;
|
||||
case OP_ERRNNIL:
|
||||
printf("%d %d",a,bx);
|
||||
printf(COMMENT);
|
||||
if (bx==0) printf("?"); else PrintConstant(f,bx-1);
|
||||
break;
|
||||
case OP_VARARGPREP:
|
||||
printf("%d",a);
|
||||
break;
|
||||
@@ -661,7 +672,6 @@ static void PrintCode(const Proto* f)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#define SS(x) ((x==1)?"":"s")
|
||||
#define S(x) (int)(x),SS(x)
|
||||
|
||||
@@ -679,7 +689,7 @@ static void PrintHeader(const Proto* f)
|
||||
f->linedefined,f->lastlinedefined,
|
||||
S(f->sizecode),VOID(f));
|
||||
printf("%d%s param%s, %d slot%s, %d upvalue%s, ",
|
||||
(int)(f->numparams),f->is_vararg?"+":"",SS(f->numparams),
|
||||
(int)(f->numparams),isvararg(f)?"+":"",SS(f->numparams),
|
||||
S(f->maxstacksize),S(f->sizeupvalues));
|
||||
printf("%d local%s, %d constant%s, %d function%s\n",
|
||||
S(f->sizelocvars),S(f->sizek),S(f->sizep));
|
||||
|
||||
Reference in New Issue
Block a user