decompile.h

来自「flash swf file player」· C头文件 代码 · 共 62 行

H
62
字号
/*  take a stack, turn it into a tree.  e.g.:  cmd        stack  push 'a'   'a'  push 'a'   'a' 'a'  getvar     'a'  a  push '1'   'a'  a   1  add        'a'  a+1  setvar     a = a+1  when all that's left on the stack is a tree, you've got a statement.  read everything into a list of statements, noting offsets and branches.  step through list, resolving branches into if/else/while/do:  if branch backwards, it's a do (or while(true))  if forwards, check instruction before branch target:	 if a branch, this is either:           branch backwards- while            branch forwards- if/else  inside loop, continue jumps to beginning, break jumps to end.*/#include "action.h"typedef unsigned char byte;struct _stack;struct _tree{  struct _stack *left;  struct _stack *right;  Action action;};typedef struct _tree *Tree;struct _stack{  struct _stack *next;  char type; /* (s)tring, (t)ree, (p)roperty, (b)ranch, (i), (d) */  union  {    char *string;    int inum;    double dnum;    Tree tree;    Property prop;  } data;  int offset;  int target; /* statement number which branches to this statement */};typedef struct _stack *Stack;void decompile4Action(FILE *f, int length, int indent);void decompile5Action(FILE *f, int length, int indent);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?