[BACK]Return to kobj2.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / debug

File: [local] / OpenXM / src / k097 / debug / kobj2.sm1 (download)

Revision 1.1.1.1 (vendor branch), Fri Oct 8 02:12:16 1999 UTC (24 years, 7 months ago) by maekawa
Branch: OpenXM, MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_20000124, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, RELEASE_1_1_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9, ALPHA
Changes since 1.1: +0 -0 lines

o import OpenXM sources

StandardContextp setcontext
[(parse) (/home/nobuki/SSWork/yacc/incmac.sm1) pushfile] extension

%% These are defined in incmac.sm1
%%/PrimitiveContextp StandardContextp def
%%/Object  [PrimitiveContextp]  def

/new {Object} def

/Complex [(Complex) Object 0 get newcontext] def
     Complex 0 get setcontext

/new {
       /Arglist set /FunctionValue [ ] def
       [/a /b] /ArgNames set 
       [/a /b /this /super] pushVariables
       [
        Arglist ArgNames mapset
        /super Object def
        super [ ] {new} sendmsg2  /this set
        Complex this {rest} primmsg {append} primmsg
        [null null] {append} primmsg  /this set
        this 1 a {put} primmsg
        this 2 b {put} primmsg
        /FunctionValue this def
       ] pop
       popVariables
       FunctionValue
} def
       
/new0 {
       /Arglist set /Argthis set /FunctionValue [ ] def
       [/a /b] /ArgNames set 
       [/this /a /b  /super] pushVariables
       [
        Arglist ArgNames mapset
        /super Object def
        super [ ] {new} sendmsg2  /this set
        Complex this {rest} primmsg {append} primmsg
        [null null] {append} primmsg  /this set
        this 1 a {put} primmsg
        this 2 b {put} primmsg
        /FunctionValue this def
       ] pop
       popVariables
       FunctionValue
} def

/add {
   /Arglist set /Argthis set
   [/this /ans /b] pushVariables
   [
      /this Argthis def /b Arglist def
      /ans Complex [0 0] {new0} sendmsg2 def
      [/ans 1 ] << this 1 get >> << b 1 get >> {add} sendmsg2 Put
      [/ans 2 ] << this 2 get >> << b 2 get >> {add} sendmsg2 Put
      /FunctionValue ans def
   ] pop
   popVariables
   FunctionValue
} def

/mul {
   /Arglist set /Argthis set
   [/this /ans /b /x1 /x2 /y1 /y2] pushVariables
   [
      /this Argthis def /b Arglist def
      /ans Complex [0 0] {new0} sendmsg2 def
      /x1 this 1 get def /x2 this 2 get def
      /y1 b 1 get def    /y2 b    2 get def
      [/ans 1 ] x1 y1 {mul} sendmsg2 x2 y2 {mul} sendmsg2 {sub} sendmsg2 Put
      [/ans 2 ] x1 y2 {mul} sendmsg2 x2 y1 {mul} sendmsg2 {add} sendmsg2 Put
      /FunctionValue ans def
   ] pop
   popVariables
   FunctionValue
} def


Object 0 get setcontext