Index: Makefile.in =================================================================== diff -u -r2510d1890d89e9b98cfdbf2106c1d4e50c9dba6a -rd137fce76cdcb71cb10ea76a24e480923124d12c --- Makefile.in (.../Makefile.in) (revision 2510d1890d89e9b98cfdbf2106c1d4e50c9dba6a) +++ Makefile.in (.../Makefile.in) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -465,16 +465,16 @@ install-pkgIndex: # @echo package ifneeded nsf $(PACKAGE_VERSION) [list load [file join \$$dir .. "$(PKG_LIB_FILE)"] nsf] > "$(pkglibdir)/pkgIndex.tcl" -nxsh: tclAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) - $(CC) -rdynamic -o $@ tclAppInit.o \ - $(CFLAGS) $(TCL_LIB_SPEC) \ - $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) +#nxsh: tclAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) +# $(CC) -rdynamic -o $@ tclAppInit.o \ +# $(CFLAGS) $(TCL_LIB_SPEC) \ +# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) -xowish: tkAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) - $(CC) -rdynamic -o $@ tkAppInit.o \ - $(PKG_OBJECTS) \ - $(CFLAGS) $(TCL_LIB_SPEC) $(TK_LIB_SPEC) \ - $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) +#xowish: tkAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) +# $(CC) -rdynamic -o $@ tkAppInit.o \ +# $(PKG_OBJECTS) \ +# $(CFLAGS) $(TCL_LIB_SPEC) $(TK_LIB_SPEC) \ +# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) install-shells: @if test -f nxsh; then \ Index: TODO =================================================================== diff -u -rb19a6e9aa168b386cf12ae0f66998c7a2a9ce495 -rd137fce76cdcb71cb10ea76a24e480923124d12c --- TODO (.../TODO) (revision b19a6e9aa168b386cf12ae0f66998c7a2a9ce495) +++ TODO (.../TODO) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -1512,9 +1512,8 @@ tcl-stack entries in GetSelfObj() TODO: -- check my for NRE-enabling -- major coro cleanup, when working - extend coro regression test +- remove traces of xowish - subcmd * handle sucmd for other method factories Fisheye: Tag d137fce76cdcb71cb10ea76a24e480923124d12c refers to a dead (removed) revision in file `config/config.guess'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d137fce76cdcb71cb10ea76a24e480923124d12c refers to a dead (removed) revision in file `config/config.sub'. Fisheye: No comparison available. Pass `N' to diff? Index: configure =================================================================== diff -u -r0e8b567e2a1808c514f6340430920ad4d59953bc -rd137fce76cdcb71cb10ea76a24e480923124d12c --- configure (.../configure) (revision 0e8b567e2a1808c514f6340430920ad4d59953bc) +++ configure (.../configure) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -10940,9 +10940,9 @@ # target, defined in Makefile.in #-------------------------------------------------------------------- -CONFIG_CLEAN_FILES="Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix autom4te.cache/" +CONFIG_CLEAN_FILES="Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh autom4te.cache/" -ac_config_files="$ac_config_files Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix" +ac_config_files="$ac_config_files Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh" #-------------------------------------------------------------------- @@ -11530,6 +11530,7 @@ "library/xotcl/apps/utils/xowish") CONFIG_FILES="$CONFIG_FILES library/xotcl/apps/utils/xowish" ;; "unix/xotcl.spec") CONFIG_FILES="$CONFIG_FILES unix/xotcl.spec" ;; "unix/pkgIndex.unix") CONFIG_FILES="$CONFIG_FILES unix/pkgIndex.unix" ;; + "nxsh") CONFIG_FILES="$CONFIG_FILES nxsh" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -12112,6 +12113,7 @@ fi +chmod +x nxsh echo "==================== building genstubs (needed for Tcl 8.6)" make genstubs echo "==================== genstubs built" @@ -12149,44 +12151,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: configure.in =================================================================== diff -u -r0e8b567e2a1808c514f6340430920ad4d59953bc -rd137fce76cdcb71cb10ea76a24e480923124d12c --- configure.in (.../configure.in) (revision 0e8b567e2a1808c514f6340430920ad4d59953bc) +++ configure.in (.../configure.in) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -424,7 +424,7 @@ dnl Change the value of -this- macro if you want to add or remove dnl such files. -AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix]]) +AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh]]) #-------------------------------------------------------------------- # the value of this variable is set to the files which are to be @@ -449,6 +449,7 @@ AC_OUTPUT +chmod +x nxsh echo "==================== building genstubs (needed for Tcl 8.6)" make genstubs echo "==================== genstubs built" @@ -486,44 +487,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: generic/nsfStack.c =================================================================== diff -u -rb19a6e9aa168b386cf12ae0f66998c7a2a9ce495 -rd137fce76cdcb71cb10ea76a24e480923124d12c --- generic/nsfStack.c (.../nsfStack.c) (revision b19a6e9aa168b386cf12ae0f66998c7a2a9ce495) +++ generic/nsfStack.c (.../nsfStack.c) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -129,8 +129,15 @@ return framePtr; } -#define SKIP_LEVELS +//#define SKIP_LEVELS 1 +#define SKIP_LAMBDA 1 +#if defined(SKIP_LAMBDA) +# if !defined(SKIP_LEVELS) +# define SKIP_LEVELS 1 +# endif +#endif + NSF_INLINE static NsfObject* GetSelfObj(Tcl_Interp *interp) { register Tcl_CallFrame *varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp); @@ -146,16 +153,22 @@ NULL #endif ) { - register int flag = Tcl_CallFrame_isProcCallFrame(varFramePtr); + register int flags = Tcl_CallFrame_isProcCallFrame(varFramePtr); - if (flag & (FRAME_IS_NSF_METHOD|FRAME_IS_NSF_CMETHOD)) { + if (flags & (FRAME_IS_NSF_METHOD|FRAME_IS_NSF_CMETHOD)) { NsfCallStackContent *cscPtr = (NsfCallStackContent *)Tcl_CallFrame_clientData(varFramePtr); return cscPtr->self; - } else if (flag & FRAME_IS_NSF_OBJECT) { + } else if (flags & FRAME_IS_NSF_OBJECT) { return (NsfObject *)Tcl_CallFrame_clientData(varFramePtr); } +#if defined(SKIP_LAMBDA) + if (flags & FRAME_IS_LAMBDA) { + continue; + } + break; +#endif } return NULL; } Index: nsfConfig.sh.in =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -rd137fce76cdcb71cb10ea76a24e480923124d12c --- nsfConfig.sh.in (.../nsfConfig.sh.in) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ nsfConfig.sh.in (.../nsfConfig.sh.in) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -1,17 +1,17 @@ -# xotclConfig.sh -- +# nsfConfig.sh -- # -# This shell script (for sh) is generated automatically by XOTcl's -# configure script. It will create shell variables for most of -# the configuration options discovered by the configure script. -# This script is intended to be included by the configure scripts -# for XOTcl extensions so that they don't have to figure this all +# This shell script (for sh) is generated automatically by the Next +# Scripting configure script. It will create shell variables for most +# of the configuration options discovered by the configure script. +# This script is intended to be included by the configure scripts for +# Next Scripting extensions so that they don't have to figure this all # out for themselves. This file does not duplicate information -# already provided by tclConfig.sh, so you may need to use that -# file in addition to this one. +# already provided by tclConfig.sh, so you may need to use that file +# in addition to this one. # # The information in this file is specific to a single platform. -# XOTcl's version number. +# Version number. NSF_VERSION='@NSF_VERSION@' NSF_MAJOR_VERSION='@NSF_MAJOR_VERSION@' NSF_MINOR_VERSION='@NSF_MINOR_VERSION@' @@ -22,19 +22,19 @@ NSF_BUILD_INCLUDE_DIR='@NSF_BUILD_INCLUDE_DIR@' NSF_BUILD_INCLUDE_SPEC="-I${NSF_BUILD_INCLUDE_DIR}" -# String to pass to compiles to pick up the XOTcl includes from their +# String to pass to compiles to pick up the nsf includes from their # installed directory. NSF_INCLUDE_DIR="@pkgincludedir@" NSF_INCLUDE_SPEC="-I$NSF_INCLUDE_DIR" -# The name of the XOTcl library (may be either a .a file or a shared library): +# The name of the nsf library (may be either a .a file or a shared library): NSF_LIB_FILE=@PKG_LIB_FILE@ -# String to pass to linker to pick up the XOTcl library from its +# String to pass to linker to pick up the nsf library from its # build directory. NSF_BUILD_LIB_SPEC='@NSF_BUILD_LIB_SPEC@' -# String to pass to linker to pick up the XOTcl library from its +# String to pass to linker to pick up the nsf library from its # installed directory. NSF_LIB_SPEC='@NSF_LIB_SPEC@' @@ -53,17 +53,17 @@ NSF_BUILD_STUB_LIB_PATH='@NSF_BUILD_STUB_LIB_PATH@' NSF_STUB_LIB_PATH='@NSF_STUB_LIB_PATH@' -# Location of the top-level source directories from which XOTcl +# Location of the top-level source directories from which nsf # was built. This is the directory that contains generic, unix, etc. -# If XOTcl was compiled in a different place than the directory +# If nsf was compiled in a different place than the directory # containing the source files, this points to the location of the sources, -# not the location where XOTcl was compiled. +# not the location where nsf was compiled. NSF_SRC_DIR='@NSF_SRC_DIR@' # shared and unshared library suffix NSF_SHARED_LIB_SUFFIX=@SHARED_LIB_SUFFIX@ NSF_UNSHARED_LIB_SUFFIX=@UNSHARED_LIB_SUFFIX@ -# the shell in whose installation dirs the xotcl package is installed +# the shell in whose installation dirs the nsf package is installed NSF_COMPATIBLE_TCLSH=@NSF_COMPATIBLE_TCLSH@ Index: nxsh.in =================================================================== diff -u --- nxsh.in (revision 0) +++ nxsh.in (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -0,0 +1,35 @@ +#!@NSF_COMPATIBLE_TCLSH@ +#!/bin/env tclsh +puts @NSF_COMPATIBLE_TCLSH@ +# +# Tiny scripted replacement of a binary nxsh. This script can be used +# as interactive shell for testing or like a regular shell with the !# +# markup in the first line of a script. It is designed to work with +# multiple installed shells during development. For installed +# versions, it should be sufficient to remove the first line. +# +package require nx +namespace import ::nx::* + +if {$argc == 0} { + set prefix "" + set line "" + while {1} { + if {$line eq ""} { + puts -nonewline "% " + flush stdout + } + append line [gets stdin] + if {[info complete $line]} { + puts [eval $line] + set line "" + continue + } + append line \n + } +} else { + set argv0 [lindex $argv 0] + set argv [lreplace $argv 0 0] + incr argc -1 + source $argv0 +} Index: tests/tcl86.tcl =================================================================== diff -u -r2510d1890d89e9b98cfdbf2106c1d4e50c9dba6a -rd137fce76cdcb71cb10ea76a24e480923124d12c --- tests/tcl86.tcl (.../tcl86.tcl) (revision 2510d1890d89e9b98cfdbf2106c1d4e50c9dba6a) +++ tests/tcl86.tcl (.../tcl86.tcl) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) @@ -60,6 +60,10 @@ ? {o map {x {expr {$x**2 + 3*$x - 2}}} {-4 -3 -2 -1 0 1 2 3 4}} \ "2 -2 -4 -4 -2 2 8 16 26" + ## Test case accessing object specific variable + #? {o map {x {::nsf::__db_show_stack; return [expr {$x * ${:delta}}]}} {-4 -3 -2 -1 0 1 2 3 4}} \ + # "-400 -300 -200 -100 0 100 200 300 400" + # Test case accessing object specific variable ? {o map {x {expr {$x * ${:delta}}}} {-4 -3 -2 -1 0 1 2 3 4}} \ "-400 -300 -200 -100 0 100 200 300 400"