parameters.test

Clone Tools
  • last updated 43 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- nx.tcl: * full rewrite of slot machinerie, much simpler structure * relation handling via parameter aliases instread of pseudo converter * mixinclass SlotOptimizer removed * new class BootStrapAttributeSlot

- ConvertToRelation() and handling of parametertype "relation"

- Make CompiledColonVarFetch() more robust in case of

half initialized objects (create vartable on the fly if needed)

- allow empty parameter options in parameter parser

- removed nsf::parametersfromslots (became simple, part of objectparameter now)

- removed hardcoded objectparameter (attributes, volatile and noinit)

- updated regression test

  1. … 8 more files in changeset.
Merge branch '2.0.0-develop' of ssh://alice.wu-wien.ac.at/usr/local/src/git-repo/xotcl into 2.0.0-develop

  1. … 3 more files in changeset.
- added shadowing for ::tcl::info::body to allow "info body" to be called on ::nsf::procs - commented nsfShadow.c - added regression test

  1. … 4 more files in changeset.
- extended regression test

  1. … 1 more file in changeset.
- nx.tcl: * new method requireClass to Combine two classes and return the more specialized one * make slot objects for parameter aliases and parameter forwarder instances of ObjectParameterSlot * get rid of attributes "isforward" and "isalias" and replace it by "dispositon" * complete list of predefined value checkers * we have now three approaches for providing parameter -object-filter and -object-method Approach 1: create RelationSlot with nosetter Approach 2: use parameter forwarder Approach 3: use parameter alias we switched from approach 1 to approach 3

  1. … 3 more files in changeset.
- renamed object parameter type "method" to "alias" - removed parameter option "slotobj=" in toParameterSyntax - renamed to [from|to]parameterSyntax to [from|to]parameterSpec

  1. … 7 more files in changeset.
- parameter specs: use "arg=" in object parameter type "method" as name of a called method to allow to call unregistered methods - eliminate protected method "noinit" for nx and allow it just as an object parameter

  1. … 3 more files in changeset.
- remove parameter option "opitional" when not needed

  1. … 1 more file in changeset.
- extended regression test

- no need to define "-class" as objectparameter

  1. … 1 more file in changeset.
- extended regression test

  1. … 1 more file in changeset.
- "info parameter": return :switch as parameteroption for C-defined cmds, when a nonpos-arg gets no arguments - updated regression test

  1. … 3 more files in changeset.
- made error messages more consistent - improved error messages for "returns" and "nsf::is" (omit parameter name)

  1. … 11 more files in changeset.
- new printf-style error message generator: NsfPrintError() - simplified error handling: removed NsfVarErrMsg() and NsfErrMsg() and replaced it by NsfPrintError()

  1. … 9 more files in changeset.
- fixed bug with required last object parameter without provided value - extended regression test

  1. … 4 more files in changeset.
- apply allowempty only on list, and not to elements

  1. … 1 more file in changeset.
- introduced a few forms of multiplicty * 0..1 allow empty value * 0..* list, can be empty (equivalent to 0..n) * 1..* list, cannot be empty (equivalent to 1..n) - deprecate multivalued in parameter specs in favor of multiplicty - deprecate allowempty in parameter specs in favor of multiplicty - adjust regression test

  1. … 8 more files in changeset.
- quote name of referenced parameter in error message to ease reading - new parameter checker "parameter", performing an approximate checking for valid parameter specs - set NSF_ARG_CHECK_NONPOS only when there are multiple arguments - remove space checking for NSF_ARG_CHECK_NONPOS in favor of parameter checker

  1. … 11 more files in changeset.
- changed returns syntax from '->' to '-returns'

  1. … 4 more files in changeset.
- nx.tcl: removed debugging output - nx.tcl: added syntactic sugar to "method" and "alias" for return value checking. One can write now: Class create C { :public method foo {a:int b:int} -> int { return [expr {$a + $b}] } } - extended regression test

  1. … 5 more files in changeset.
- changed relation handling by evaluating the relationcmd in the parent context to keep evaluation order. - extend introspection "nsf::configure objectsystem": the command returns now all system methods in the syntax of nsf::createobjectsystem - "nsf::createobjectsystem" creates now a warning when an existing objectsystem is redefined and ignores the new definition attempt. This was done with the purpose to allow "package forget nx; package require nx" - Allow overwriting of redefine protected method during bootstrap to ease "package forget nx; package require nx" - forward had just "-objscope", no general "-frame method|object". Since forwarder have client data, they always push a method frame. So, the situation is different to nsd::alias and ::nsf::dispatch. Therefore, the flag "-objscope" was renamed to "-objectframe" to provide better consistency with "-frame object" - fixed bug, where error handling of invalid options in ForwardProcessOptions() could lead to a crash - return forwardoption "-earlybinding" via instrospection - extended regression test

  1. … 14 more files in changeset.
- disallow object parameter of type "switch" to avoid possible confusion between (a) providing a value for the o.p., (b) calling it as a setter, and (c) calling it as a getter. For providing a value, no arg is used for switch. For calling a setter, it is necessary to provide a value even for a switch. - disallow type "switch" in setter definiton (use boolean instead) - disallow type "switch" for positional arguments (use boolean instead) - extended regression test

  1. … 4 more files in changeset.
- provide error message, when provided setter name starts with a colon

  1. … 2 more files in changeset.
Squashed commit of the following:

commit 370f47d26099dd8cda4125de67048461edb797a9

Author: ssoberni <stefan.sobernig@wu-wien.ac.at>

Date: Thu Nov 4 10:56:11 2010 +0100

Due to recent changes in InterpColonVarResolver() to handle the

slow-path execution the byte-compiled [variable], an unwanted

interaction between ::nsf::setter, *certain* per-object namespaces,

and the ColonCmd()-based invocation of setter methods became

visible. In short: Given a pre-existing Tcl namespace and the

colon-prefixed call specification to a setter method,

InterpColonVarResolver() handles the var resolution request issued by

the setter method (or SetInstVar(), more precisely). In a

colon-prefixed call, the Tcl_Obj carrying the setter method name and

used to lookup the object variable contains the ":". At the same time,

the per-object namespace causes the TCL_NAMESPACE_ONLY flag to be set

which causes InterpColonVarResolver() to pass on the request. In this

setting, we end up with colon-prefixed object variables! See

tests/parameter.test for an explanatory test case. For the time being,

I fixed this by preserving and using the original, colon-free Tcl_Obj

indicating the variable name in the client data structure of the

settercmd.

  1. … 1 more file in changeset.
- show "unwind unstacked entry" message appear only when debug level>0 - removed fixed TODO entries

  1. … 2 more files in changeset.
- fix a bug, where "o configure" (without arguments) resetted initialied values to the defaults.

  1. … 3 more files in changeset.
- fixed langauge hooks for emacs

  1. … 12 more files in changeset.
- renamed nx regression tests .test to follow tcl conventions

    • -0
    • +1317
    ./parameters.test
  1. … 35 more files in changeset.