mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:12:43 +00:00 
			
		
		
		
	 b33b950e45
			
		
	
	
		b33b950e45
		
	
	
	
	
		
			
			This is implemented as a Clang frontend tool, and currently does two
things:
  - Ensure for all fields wrapped in {Nonnull,}GCPtr<T>, T inherits from
    JS::Cell
  - Ensure for all fields not wrapped in {Nonnull,}GCPtr, that the type
    does not inherit from JS::Cell (otherwise it should be wrapped in a
    Ptr class).
In the future, this tool could be extended further. For example, we may
consider validating all implementations of Cell::visit_impl.
		
	
			
		
			
				
	
	
	
	
		
			479 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			479 B
		
	
	
	
	
	
	
	
LibJSGCVerifier
This is a simple Clang tool to validate certain behavior relating to LibJS's GC. It currently validates two things:
- For all types wrapped by GCPtrorNonnullGCPtr, that the wrapped type inherits fromCell
- For all types not wrapped by GCPtrorNonnullGCPtr, that the wrapped type does not inherit fromCell(otherwise it should be wrapped).
Usage:
cmake -GNinja -B build
cmake --build build
src/main.py -b <path to serenity>/Build