Introducing mutators.
commitb919176b61b851a697ebdde431641535677e6deb
authorHenrik Tidefelt <tidefelt@isy.liu.se>
Tue, 4 Nov 2008 00:07:45 +0000 (4 01:07 +0100)
committerHenrik Tidefelt <tidefelt@isy.liu.se>
Mon, 1 Dec 2008 22:41:13 +0000 (1 23:41 +0100)
tree1126de0d3d5dadbe163d6fb8175ac76c37027805
parent216cfe7c711bec87444c4d39a94a8234d1d1437a
Introducing mutators.

Mutators have the syntax
  #state.[mutator arg1 ... argn]
and is basically a call to a mutator method stored in the type of #state.

Hence, #state is first used to find the type that the mutator method can be retrieved from, and then #state is also passed to the method.

To minimize conflicts with ordinary function calls, the state is passed in a special slot in Kernel::Arguments.  This is obviously associated with some overhead present in every function call...
15 files changed:
source/Shapes_Kernel_decls.h
source/astfun.cc
source/astfun.h
source/astvar.cc
source/astvar.h
source/classtypes.cc
source/classtypes.h
source/environment.cc
source/environment.h
source/functiontypes.cc
source/functiontypes.h
source/shapesexceptions.cc
source/shapesexceptions.h
source/shapesparser.yy
source/shapesvalue.cc