summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-11-02 18:13:20 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-11-02 18:13:20 (GMT)
commitce7c13b7962d2ebcd432dfb05fffe812c4d172d2 (patch)
tree51f3474d6aea4c638b7abdc0ee79609ab7fccd98 /generic/tclCompCmds.c
parenta7dc229d16889c9f6f66d197d4e0bf1afbec5578 (diff)
downloadtcl-ce7c13b7962d2ebcd432dfb05fffe812c4d172d2.zip
tcl-ce7c13b7962d2ebcd432dfb05fffe812c4d172d2.tar.gz
tcl-ce7c13b7962d2ebcd432dfb05fffe812c4d172d2.tar.bz2
Added more TclOO introspection bytecodes ([info object class], [info object namespace]). Also moved TclOO-in-8.6 to using the main Tcl internal ensemble builder.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 5beb7bd..e476cf0 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -3666,6 +3666,46 @@ TclCompileInfoLevelCmd(
}
return TCL_OK;
}
+
+int
+TclCompileInfoObjectClassCmd(
+ Tcl_Interp *interp, /* Used for error reporting. */
+ Tcl_Parse *parsePtr, /* Points to a parse structure for the command
+ * created by Tcl_ParseCommand. */
+ Command *cmdPtr, /* Points to defintion of command being
+ * compiled. */
+ CompileEnv *envPtr)
+{
+ DefineLineInformation; /* TIP #280 */
+ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr);
+
+ if (parsePtr->numWords != 2) {
+ return TCL_ERROR;
+ }
+ CompileWord(envPtr, tokenPtr, interp, 1);
+ TclEmitOpcode( INST_TCLOO_CLASS, envPtr);
+ return TCL_OK;
+}
+
+int
+TclCompileInfoObjectNamespaceCmd(
+ Tcl_Interp *interp, /* Used for error reporting. */
+ Tcl_Parse *parsePtr, /* Points to a parse structure for the command
+ * created by Tcl_ParseCommand. */
+ Command *cmdPtr, /* Points to defintion of command being
+ * compiled. */
+ CompileEnv *envPtr)
+{
+ DefineLineInformation; /* TIP #280 */
+ Tcl_Token *tokenPtr = TokenAfter(parsePtr->tokenPtr);
+
+ if (parsePtr->numWords != 2) {
+ return TCL_ERROR;
+ }
+ CompileWord(envPtr, tokenPtr, interp, 1);
+ TclEmitOpcode( INST_TCLOO_NS, envPtr);
+ return TCL_OK;
+}
/*
*----------------------------------------------------------------------