Make Env self-describing
If the Env denotes a 'with', then values[0] may be an Expr* cast to a Value*. For code that generically traverses Values/Envs, it's useful to know this.
This commit is contained in:
		
							parent
							
								
									9fd7cf98db
								
							
						
					
					
						commit
						4bb8741b98
					
				
					 2 changed files with 12 additions and 8 deletions
				
			
		|  | @ -35,8 +35,8 @@ struct Env | |||
| { | ||||
|     Env * up; | ||||
|     unsigned short size; // used by ‘valueSize’
 | ||||
|     unsigned short prevWith:15; // nr of levels up to next `with' environment
 | ||||
|     unsigned short haveWithAttrs:1; | ||||
|     unsigned short prevWith:14; // nr of levels up to next `with' environment
 | ||||
|     enum { Plain = 0, HasWithExpr, HasWithAttrs } type:2; | ||||
|     Value * values[0]; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue