tokyo.remotedb: remove stack effects.
							parent
							
								
									860a734e96
								
							
						
					
					
						commit
						623e6af857
					
				| 
						 | 
					@ -28,11 +28,11 @@ INSTANCE: TYPE assoc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE dispose* [ DBDEL f ] change-handle drop ;
 | 
					M: TYPE dispose* [ DBDEL f ] change-handle drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE at* ( key db -- value/f ? )
 | 
					M: TYPE at*
 | 
				
			||||||
    handle>> swap object>bytes dup length 0 int <ref>
 | 
					    handle>> swap object>bytes dup length 0 int <ref>
 | 
				
			||||||
    DBGET [ [ memory>object ] [ tcfree ] bi t ] [ f f ] if* ;
 | 
					    DBGET [ [ memory>object ] [ tcfree ] bi t ] [ f f ] if* ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE assoc-size ( db -- size ) handle>> DBRNUM ;
 | 
					M: TYPE assoc-size handle>> DBRNUM ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: DBKEYS ( db -- keys )
 | 
					: DBKEYS ( db -- keys )
 | 
				
			||||||
    [ assoc-size <vector> ] [ handle>> ] bi
 | 
					    [ assoc-size <vector> ] [ handle>> ] bi
 | 
				
			||||||
| 
						 | 
					@ -42,16 +42,16 @@ M: TYPE assoc-size ( db -- size ) handle>> DBRNUM ;
 | 
				
			||||||
        [ pick ] dip swap push
 | 
					        [ pick ] dip swap push
 | 
				
			||||||
    ] while 3drop ;
 | 
					    ] while 3drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE >alist ( db -- alist )
 | 
					M: TYPE >alist
 | 
				
			||||||
    [ DBKEYS dup ] keep '[ dup _ at 2array ] map! drop ;
 | 
					    [ DBKEYS dup ] keep '[ dup _ at 2array ] map! drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE set-at ( value key db -- )
 | 
					M: TYPE set-at
 | 
				
			||||||
    handle>> swap rot [ object>bytes dup length ] bi@ DBPUT drop ;
 | 
					    handle>> swap rot [ object>bytes dup length ] bi@ DBPUT drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE delete-at ( key db -- )
 | 
					M: TYPE delete-at
 | 
				
			||||||
    handle>> swap object>bytes dup length DBOUT drop ;
 | 
					    handle>> swap object>bytes dup length DBOUT drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE clear-assoc ( db -- ) handle>> DBVANISH drop ;
 | 
					M: TYPE clear-assoc handle>> DBVANISH drop ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M: TYPE equal? assoc= ;
 | 
					M: TYPE equal? assoc= ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue