// build it early since we rely heavily on the def-use chain later
t.buildDefUses()
- // pick up either an edge or SSA value from worklilst, process it
+ // pick up either an edge or SSA value from worklist, process it
for {
if len(t.edges) > 0 {
edge := t.edges[0]
return true
}
-// possibleConst checks if Value can be fold to const. For those Values that can
+// possibleConst checks if Value can be folded to const. For those Values that can
// never become constants(e.g. StaticCall), we don't make futile efforts.
func possibleConst(val *Value) bool {
if isConst(val) {
// However, this would create a huge switch for all opcodes that can be
// evaluated during compile time. Moreover, some operations can be evaluated
// only if its arguments satisfy additional conditions(e.g. divide by zero).
- // It's fragile and error prone. We did a trick by reusing the existing rules
+ // It's fragile and error-prone. We did a trick by reusing the existing rules
// in generic rules for compile-time evaluation. But generic rules rewrite
// original value, this behavior is undesired, because the lattice of values
// may change multiple times, once it was rewritten, we lose the opportunity