[][src]Trait weld::ast::HashIgnoringSymbols

pub trait HashIgnoringSymbols {
    fn hash_ignoring_symbols(&self) -> Result<u64, WeldCompileError>;
}

A trait that implements symbol-agnostic hashing.

Required methods

fn hash_ignoring_symbols(&self) -> Result<u64, WeldCompileError>

Hash an AST ignoring symbol names.

This method is useful for comparing two ASTs for structural equality, e.g., to check if an optimization pass changed the AST modulo changing symbol names. Comparing using a hash value is generally faster than cloning a tree, changing it, and then checking if it changed. This method may return an error if it encounters an undefined symbol.

Loading content...

Implementors

impl HashIgnoringSymbols for Expr[src]

Loading content...