diff options
author | Kevin B Kenny <kennykb@acm.org> | 2010-09-25 14:51:11 (GMT) |
---|---|---|
committer | Kevin B Kenny <kennykb@acm.org> | 2010-09-25 14:51:11 (GMT) |
commit | 6d193c10f5fe2fc976310a714d80b35c28fcc227 (patch) | |
tree | bf7c48321b6cca5b3a99c8a02aba6441f406e92c /generic/tclAssembly.h | |
parent | c37fd6549cf183bb8e155b2492575551b1635b9a (diff) | |
download | tcl-6d193c10f5fe2fc976310a714d80b35c28fcc227.zip tcl-6d193c10f5fe2fc976310a714d80b35c28fcc227.tar.gz tcl-6d193c10f5fe2fc976310a714d80b35c28fcc227.tar.bz2 |
* tclAssembly.c: Massive refactoring of the assembler
* tclAssembly.h: to use a Tcl-like syntax (and use
* tests/assemble.test: Tcl_ParseCommand to parse it). The
* tests/assemble1.bench: refactoring also ensures that
Tcl_Tokens in the assembler have string ranges inside the source
code, which allows for [eval] and [expr] assembler directives
that simply call TclCompileScript and TclCompileExpr recursively.
Diffstat (limited to 'generic/tclAssembly.h')
-rw-r--r-- | generic/tclAssembly.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/generic/tclAssembly.h b/generic/tclAssembly.h index c788eed..c1cb0e5 100644 --- a/generic/tclAssembly.h +++ b/generic/tclAssembly.h @@ -3,18 +3,11 @@ #include "tclCompile.h" -typedef struct StackCheckerState { - Tcl_Interp* interp; - CompileEnv* envPtr; - int maxDepth; - Tcl_Obj* bcList; -} StackCheckerState; - typedef struct BasicBlock { /* FIXME: start needs to be an offset from envPtr->codeStart */ unsigned char * start; /* Instruction address of the start * of the block */ - int bcIndex; /* Index in the input instruction + int startLine; /* Index in the input instruction * list of the start of the block */ int may_fall_thru; /* Flag == 1 if control passes from this * block to its successor. */ @@ -77,7 +70,7 @@ typedef struct label { int offset; } label; -MODULE_SCOPE int TclAssembleCode(Tcl_Interp* interp, Tcl_Obj* code, - CompileEnv* compEnv, int flags); +MODULE_SCOPE int TclAssembleCode(CompileEnv* compEnv, const char* codePtr, + int codeLen, int flags); #endif |