Changes between Version 5 and Version 6 of LoritoPrimitives

Show
Ignore:
Timestamp:
02/26/10 02:51:15 (12 years ago)
Author:
cotto
Comment:

fill in some more descriptions, remove Lorito name field

Legend:

Unmodified
Added
Removed
Modified
  • LoritoPrimitives

    v5 v6  
    55Memory access goes through a set of 6 macros for reading and writing single bytes, 4-byte words and 8-byte floats.  
    66 
    7 ||Squeak operation ||example Smalltalk code||description||equivalent C code||Lorito op name|| 
    8 ||&                ||                      ||           ||                 ||         || 
    9 |||                ||                      ||           ||                 ||         || 
    10 ||and:             ||                      ||           ||                 ||         ||  
    11 ||or:              ||                      ||           ||                 ||         ||  
    12 ||not              ||                      ||           ||                 ||         ||  
    13 ||+                ||5+5                   ||addition   ||a = 5 + 5        ||add      ||  
    14 ||-                ||4-3                   ||subtraction||a = 4 - 3        ||sub      || 
    15 ||*                ||6*7                   ||multiplication||a = 6 * 7     ||mul      ||  
    16 ||//               ||15//5                 ||division   ||a = 15 / 5       ||div      ||  
    17 ||\\               ||7\\3                  ||mod        ||a  = 7 % 3       ||mod      ||  
    18 ||max:             |||a b| a := 1. b := 2. a max: b.||max||a = a>b?a:b;    ||max      ||  
    19 ||min:             |||a b| a := 1. b := 2. a min: b.||min||a = a<b?a:b;    ||min      ||  
    20 ||bitAnd:          ||                      ||           ||                 ||         ||  
    21 ||bitOr:           ||                      ||           ||                 ||         ||  
    22 ||bitXor:          ||                      ||           ||                 ||         || 
    23 ||bitShift:        ||                      ||           ||                 ||         ||  
    24 ||<                ||5<3                   ||less than  ||a = 5 < 3        ||lt       ||  
    25 ||<=               ||5<=3                  ||less than or equal||a = 5 <= 3||le       ||  
    26 ||=                ||5=3                   ||equality (deep)||a = 5 == 3   ||eqd      || 
    27 ||>                ||5>3                   ||greater than||a = 5 > 3       ||gt       || 
    28 ||>=               ||5>=3                  ||greater than or equal||a = 5 <= 3||ge    || 
    29 ||~=               ||5=~3                  ||inequality (deep)||           ||ned      || 
    30 ||==               ||5==5                  ||equality (shallow)||a = 5 == 5||eqs      || 
    31 ||isNil            ||                      ||           ||                 ||         || 
    32 ||notNil           ||                      ||           ||                 ||         || 
    33 ||whileTrue:       ||                      ||           ||                 ||         ||  
    34 ||whileFalse:      ||                      ||           ||                 ||         || 
    35 ||to:do:           ||                      ||           ||                 ||         || 
    36 ||to:by:do:        ||                      ||           ||                 ||         ||  
    37 ||ifTrue:          ||                      ||           ||                 ||         || 
    38 ||ifFalse:         ||                      ||           ||                 ||         || 
    39 ||ifTrue:ifFalse:  ||                      ||           ||                 ||         ||  
    40 ||ifFalse:ifTrue:  ||                      ||           ||                 ||         ||  
    41 ||at:              ||                      ||           ||                 ||         ||  
    42 ||at:put:          ||                      ||           ||                 ||         ||  
    43 ||<<               ||                      ||           ||                 ||         ||  
    44 ||>>               ||                      ||           ||                 ||         || 
    45 ||bitInvert32      ||                      ||           ||                 ||         ||  
    46 ||preIncrement     ||                      ||           ||                 ||         ||  
    47 ||integerValueOf:  ||                      ||           ||                 ||         ||  
    48 ||integerObjectOf: ||                      ||           ||                 ||         ||  
    49 ||isIntegerObject: ||                      ||           ||                 ||         ||  
     7||Squeak operation ||example Smalltalk code||description||equivalent C code|| 
     8||&                ||                      ||logical and (no short-circuiting)||                 || 
     9|||                ||                      ||logical or (no short-circuiting)||                 ||        
     10||and:             ||                      ||logical and (short-circuiting)||                 ||         
     11||or:              ||                      ||logical or (short-circuiting)||                 ||         
     12||not              ||                      ||logical not||                 ||         
     13||+                ||5+5                   ||addition   ||a = 5 + 5        ||       
     14||-                ||4-3                   ||subtraction||a = 4 - 3        ||       
     15||*                ||6*7                   ||multiplication||a = 6 * 7     ||       
     16||//               ||15//5                 ||division   ||a = 15 / 5       ||       
     17||\\               ||7\\3                  ||mod        ||a  = 7 % 3       ||       
     18||max:             |||a b| a := 1. b := 2. a max: b.||max||a = a>b?a:b;    ||       
     19||min:             |||a b| a := 1. b := 2. a min: b.||min||a = a<b?a:b;    ||       
     20||bitAnd:          ||                      ||bitwise and||                 ||           
     21||bitOr:           ||                      ||bitwise or ||                 ||           
     22||bitXor:          ||                      ||bitwise xor||                 ||          
     23||bitShift:        ||                      ||bitwise shift||               ||           
     24||<                ||5<3                   ||less than  ||a = 5 < 3        ||         
     25||<=               ||5<=3                  ||less than or equal||a = 5 <= 3||       
     26||=                ||5=3                   ||equality (deep)||a = 5 == 3   ||       
     27||>                ||5>3                   ||greater than||a = 5 > 3       ||       
     28||>=               ||5>=3                  ||greater than or equal||a = 5 <= 3||     
     29||~=               ||5=~3                  ||inequality (deep)||           ||       
     30||==               ||5==5                  ||equality (shallow)||a = 5 == 5|| 
     31||isNil            ||                      ||null test  ||                 ||          
     32||notNil           ||                      ||non-null test||                 ||        
     33||whileTrue:       ||                      ||while loop ||                 ||           
     34||whileFalse:      ||                      ||while loop ||                 ||          
     35||to:do:           ||                      ||           ||                 ||          
     36||to:by:do:        ||                      ||           ||                 ||           
     37||ifTrue:          ||                      ||if         ||                 ||          
     38||ifFalse:         ||                      ||unless     ||                 ||          
     39||ifTrue:ifFalse:  ||                      ||if/else    ||                 ||           
     40||ifFalse:ifTrue:  ||                      ||           ||                 ||           
     41||at:              ||                      ||hash/array read  ||                 ||           
     42||at:put:          ||                      ||hash/array write ||                 ||           
     43||<<               ||                      ||           ||                 ||           
     44||>>               ||                      ||           ||                 ||          
     45||bitInvert32      ||                      ||bitwise negation||                 ||           
     46||preIncrement     ||                      ||           ||                 ||           
     47||integerValueOf:  ||                      ||           ||                 ||           
     48||integerObjectOf: ||                      ||           ||                 ||           
     49||isIntegerObject: ||                      ||           ||                 ||