* A command to register successor fstate expressions.
Unifying substitutes and successors isn't very feasible for now, since substitutes are only used when no path with a certain is known. Therefore, a normal form of some expression stored as a substitute would not be used unless the expression itself was missing.
This commit is contained in:
		
							parent
							
								
									8511571f65
								
							
						
					
					
						commit
						e5fbf58041
					
				
					 3 changed files with 28 additions and 1 deletions
				
			
		|  | @ -179,6 +179,12 @@ Hash writeTerm(ATerm t, const string & suffix, string * p) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| void registerSuccessor(const Hash & fsHash, const Hash & scHash) | ||||
| { | ||||
|     setDB(nixDB, dbSuccessors, fsHash, scHash); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| FState storeSuccessor(FState fs, FState sc, StringSet & paths) | ||||
| { | ||||
|     if (fs == sc) return sc; | ||||
|  | @ -186,7 +192,7 @@ FState storeSuccessor(FState fs, FState sc, StringSet & paths) | |||
|     string path; | ||||
|     Hash fsHash = hashTerm(fs); | ||||
|     Hash scHash = writeTerm(sc, "-s-" + (string) fsHash, &path); | ||||
|     setDB(nixDB, dbSuccessors, fsHash, scHash); | ||||
|     registerSuccessor(fsHash, scHash); | ||||
|     paths.insert(path); | ||||
| 
 | ||||
| #if 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue