aa
|
Classes | |
class | Iter |
Public Member Functions | |
Ary (Class< E > clazz) | |
Ary (E[] es) | |
Ary (E[] es, int len) | |
Ary< E > | add (E e) |
Add element in amortized constant time. More... | |
Ary< E > | addAll (Ary<? extends E > c) |
Ary< E > | addAll (Collection<? extends E > c) |
E[] | asAry () |
E | at (int i) |
E | atX (int i) |
void | clear () |
Remove all elements. More... | |
void | clear (int i) |
Clear element. More... | |
Ary< E > | deepCopy () |
E | del (E e) |
Element removal, using '=='. More... | |
E | del (int i) |
Fast, constant-time, element removal. More... | |
boolean | equals (Object o) |
void | fill (E e) |
Ary< E > | filter_update (Predicate< E > P) |
int | find (E e) |
Find the first matching element using ==, or -1 if none. More... | |
int | find (Predicate< E > P) |
Find the first element matching predicate P, or -1 if none. More... | |
int | hashCode () |
void | insert (int i, E e) |
Slow, linear-time, element insert. More... | |
boolean | isEmpty () |
Iterator< E > | iterator () |
E | last () |
int | len () |
Ary< E > | map_update (Function< E, E > f) |
E | pop () |
E | push (E e) |
Add element in amortized constant time. More... | |
E | remove (int i) |
Slow, linear-time, element removal. More... | |
boolean | replace (E old, E nnn) |
Find and replace the first matching element using ==. More... | |
E | set (int i, E e) |
Set existing element. More... | |
Ary< E > | set_len (int len) |
E | setX (int i, E e) |
void | sort_update (Comparator<? super E > c) |
Sorts in-place. More... | |
String | toString () |
Static Public Member Functions | |
static< X extends Comparable< X > Ary< X > | merge_and (Ary< X > a0, Ary< X > a1) |
Merge-And. More... | |
static< X extends Comparable< X > Ary< X > | merge_or (Ary< X > a0, Ary< X > a1) |
Merge-Or. More... | |
static< X > Ary< X > | merge_or (Ary< X > a0, Ary< X > a1, Comparator< X > cmpr, Predicate< X > filter) |
Merge-Or. More... | |
Public Attributes | |
E[] | _es |
int | _len |
Package Functions | |
public< F extends E > Ary< E > | addAll (F[] es) |
Private Member Functions | |
void | range_check (int i) |
com.cliffc.aa.util.Ary< E >.Ary | ( | E[] | es | ) |
Definition at line 14 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.equals().
com.cliffc.aa.util.Ary< E >.Ary | ( | E[] | es, |
int | len | ||
) |
com.cliffc.aa.util.Ary< E >.Ary | ( | Class< E > | clazz | ) |
Ary<E> com.cliffc.aa.util.Ary< E >.add | ( | E | e | ) |
Add element in amortized constant time.
e | Element to add at end of list |
Definition at line 49 of file Ary.java.
Referenced by com.cliffc.aa.node.MemSplitNode.add_alias(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.addAll(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.Parse.func(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_and(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_or(), com.cliffc.aa.node.FunNode.split_callers(), com.cliffc.aa.Parse.stmt(), and com.cliffc.aa.Parse.type0().
Ary<E> com.cliffc.aa.util.Ary< E >.addAll | ( | Ary<? extends E > | c | ) |
Ary<E> com.cliffc.aa.util.Ary< E >.addAll | ( | Collection<? extends E > | c | ) |
c | Collection to be added |
Definition at line 151 of file Ary.java.
Referenced by com.cliffc.aa.node.ScopeNode.IfScope.check(), com.cliffc.aa.node.FunNode.find_body(), and com.cliffc.aa.GVNGCM.retype_mem().
|
package |
E [] com.cliffc.aa.util.Ary< E >.asAry | ( | ) |
Definition at line 172 of file Ary.java.
Referenced by com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.Parse.func(), com.cliffc.aa.node.PrimNode.PRIMS(), com.cliffc.aa.HM.HM8.term(), com.cliffc.aa.HM.HM6.term(), com.cliffc.aa.HM.HM7.term(), com.cliffc.aa.HM.HM9.term(), com.cliffc.aa.HM.HM.term(), com.cliffc.aa.type.TestType.testStructTuple(), com.cliffc.aa.Parse.tuple(), com.cliffc.aa.Parse.type0(), and com.cliffc.aa.type.TypeMem.update().
E com.cliffc.aa.util.Ary< E >.at | ( | int | i | ) |
i | element index |
Definition at line 25 of file Ary.java.
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.node.MemSplitNode._update(), com.cliffc.aa.node.MemSplitNode.add_alias(), com.cliffc.aa.node.MemJoinNode.can_bypass(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.Node.dumprpo(), com.cliffc.aa.node.MemSplitNode.find_alias_index(), com.cliffc.aa.Parse.func(), com.cliffc.aa.type.TypeStruct.get_cyclic(), com.cliffc.aa.type.TypeStruct.reachable(), com.cliffc.aa.node.MemSplitNode.remove_alias(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.type.TypeStruct.shrink(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.node.MemSplitNode.str(), com.cliffc.aa.HM.HM9.term(), com.cliffc.aa.HM.HM.term(), com.cliffc.aa.node.MemJoinNode.unify(), com.cliffc.aa.node.MemSplitNode.value(), and com.cliffc.aa.node.MemJoinNode.value().
E com.cliffc.aa.util.Ary< E >.atX | ( | int | i | ) |
void com.cliffc.aa.util.Ary< E >.clear | ( | ) |
void com.cliffc.aa.util.Ary< E >.clear | ( | int | i | ) |
Ary<E> com.cliffc.aa.util.Ary< E >.deepCopy | ( | ) |
Definition at line 333 of file Ary.java.
Referenced by com.cliffc.aa.node.MemSplitNode.copy().
E com.cliffc.aa.util.Ary< E >.del | ( | E | e | ) |
E com.cliffc.aa.util.Ary< E >.del | ( | int | i | ) |
Fast, constant-time, element removal.
Does not preserve order
i | element to be removed |
Definition at line 78 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.filter_update(), and com.cliffc.aa.HM.HM4.hm().
boolean com.cliffc.aa.util.Ary< E >.equals | ( | Object | o | ) |
void com.cliffc.aa.util.Ary< E >.fill | ( | E | e | ) |
Ary<E> com.cliffc.aa.util.Ary< E >.filter_update | ( | Predicate< E > | P | ) |
int com.cliffc.aa.util.Ary< E >.find | ( | E | e | ) |
Find the first matching element using ==, or -1 if none.
Note that most del calls shuffle the list, so the first element might be random.
e | Element to find |
Definition at line 192 of file Ary.java.
Referenced by com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.Env.lookup_fref(), com.cliffc.aa.HM.HM4.Syntax.more_work_impl(), com.cliffc.aa.type.TypeStruct.push(), and com.cliffc.aa.Parse.type0().
int com.cliffc.aa.util.Ary< E >.find | ( | Predicate< E > | P | ) |
Find the first element matching predicate P, or -1 if none.
Note that most del calls shuffle the list, so the first element might be random.
P | Predicate to match |
int com.cliffc.aa.util.Ary< E >.hashCode | ( | ) |
void com.cliffc.aa.util.Ary< E >.insert | ( | int | i, |
E | e | ||
) |
Slow, linear-time, element insert.
Preserves order.
i | index to insert at, between 0 and _len inclusive. |
e | Element to insert |
boolean com.cliffc.aa.util.Ary< E >.isEmpty | ( | ) |
Definition at line 20 of file Ary.java.
Referenced by com.cliffc.aa.type.TypeStruct.ax_impl_struct(), com.cliffc.aa.node.ScopeNode.IfScope.check(), com.cliffc.aa.type.TypeMemPtr.depth(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.HM.HM4.hm(), com.cliffc.aa.Env.VStack.isEmpty(), com.cliffc.aa.type.Type< T extends Type< T >.Pool.malloc(), com.cliffc.aa.GVNGCM.retype_mem(), and com.cliffc.aa.Parse.stmt().
Iterator<E> com.cliffc.aa.util.Ary< E >.iterator | ( | ) |
E com.cliffc.aa.util.Ary< E >.last | ( | ) |
Definition at line 35 of file Ary.java.
Referenced by com.cliffc.aa.Parse.stmt().
int com.cliffc.aa.util.Ary< E >.len | ( | ) |
Definition at line 22 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.Ary(), and com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.set_len().
Ary<E> com.cliffc.aa.util.Ary< E >.map_update | ( | Function< E, E > | f | ) |
|
static |
Merge-And.
Merge 2 sorted Arys, keeping only duplicates. Return a new sorted Ary with the merged list. Undefined if the original arrays are not sorted. Error if they are not of the same type. Elements must implement Comparable.
Definition at line 275 of file Ary.java.
|
static |
Merge-Or.
Merge 2 sorted Arys, tossing out duplicates. Return a new sorted Ary with the merged list. Undefined if the original arrays are not sorted. Error if they are not of the same type. Elements must implement Comparable.
Definition at line 222 of file Ary.java.
|
static |
Merge-Or.
Merge two sorted Arys, tossing out duplicates and elements not passing the filter. Return a new sorted Ary with the merged list. Undefined if the original arrays are not sorted. Error if they are not of the same type. Elements must implement Comparable.
a0 | Sorted Ary to merge |
a1 | Sorted Ary to merge |
cmpr | Comparator |
filter | Predicate, null means no filter |
Definition at line 249 of file Ary.java.
E com.cliffc.aa.util.Ary< E >.pop | ( | ) |
Definition at line 41 of file Ary.java.
Referenced by com.cliffc.aa.type.TypeStruct.ax_impl_struct(), com.cliffc.aa.node.ScopeNode.IfScope.check(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.type.TypeMemPtr.depth(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.GVNGCM.gcp(), com.cliffc.aa.type.TypeStruct.get_cyclic(), com.cliffc.aa.type.Type< T extends Type< T >.Pool.malloc(), com.cliffc.aa.GVNGCM.retype_mem(), and com.cliffc.aa.Parse.type0().
E com.cliffc.aa.util.Ary< E >.push | ( | E | e | ) |
Add element in amortized constant time.
e | Element to add at end of list |
Definition at line 58 of file Ary.java.
Referenced by com.cliffc.aa.Env.VStack.add_var(), com.cliffc.aa.type.TypeStruct.ax_impl_struct(), com.cliffc.aa.type.Type< TypeFlt >.concat(), com.cliffc.aa.node.CallNode.err(), com.cliffc.aa.node.FunNode.find_body(), com.cliffc.aa.type.Type< T extends Type< T >.Pool.free(), com.cliffc.aa.Parse.func(), com.cliffc.aa.type.TypeStruct.get_cyclic(), com.cliffc.aa.HM.HM4.hm(), com.cliffc.aa.HM.HM4.Apply.hm(), com.cliffc.aa.node.Node.postorder(), com.cliffc.aa.HM.HM4.Syntax.prep_tree_impl(), com.cliffc.aa.node.PrimNode.PRIMS(), com.cliffc.aa.type.TypeStruct.push(), com.cliffc.aa.GVNGCM.retype_mem(), com.cliffc.aa.type.TypeStruct.shrink(), com.cliffc.aa.HM.HM6.term(), com.cliffc.aa.HM.HM8.term(), com.cliffc.aa.HM.HM7.term(), com.cliffc.aa.HM.HM9.term(), com.cliffc.aa.HM.HM.term(), and com.cliffc.aa.Parse.tuple().
|
private |
Definition at line 307 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.at(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.del(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.last(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.pop(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.remove(), and com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.set().
E com.cliffc.aa.util.Ary< E >.remove | ( | int | i | ) |
Slow, linear-time, element removal.
Preserves order.
i | element to be removed |
Definition at line 102 of file Ary.java.
Referenced by com.cliffc.aa.node.MemSplitNode.remove_alias().
boolean com.cliffc.aa.util.Ary< E >.replace | ( | E | old, |
E | nnn | ||
) |
E com.cliffc.aa.util.Ary< E >.set | ( | int | i, |
E | e | ||
) |
Set existing element.
i | element to set |
e | value to set |
Definition at line 133 of file Ary.java.
Referenced by com.cliffc.aa.node.MemSplitNode._update(), com.cliffc.aa.node.MemSplitNode.add_alias(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.node.MemSplitNode.remove_alias(), com.cliffc.aa.HM.HM9.term(), and com.cliffc.aa.HM.HM.term().
Ary<E> com.cliffc.aa.util.Ary< E >.set_len | ( | int | len | ) |
Definition at line 140 of file Ary.java.
Referenced by com.cliffc.aa.Parse.func().
E com.cliffc.aa.util.Ary< E >.setX | ( | int | i, |
E | e | ||
) |
Definition at line 115 of file Ary.java.
Referenced by com.cliffc.aa.type.TestType.testStructTuple(), and com.cliffc.aa.type.TypeMem.update().
void com.cliffc.aa.util.Ary< E >.sort_update | ( | Comparator<? super E > | c | ) |
Sorts in-place.
c | Comparator to sort by |
Definition at line 187 of file Ary.java.
Referenced by com.cliffc.aa.tvar.TV2.str().
String com.cliffc.aa.util.Ary< E >.toString | ( | ) |
Definition at line 298 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.toString().
E [] com.cliffc.aa.util.Ary< E >._es |
Definition at line 12 of file Ary.java.
Referenced by com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.add(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.addAll(), com.cliffc.aa.type.Type< TypeFlt >.ALL_TYPES(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.Ary(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.asAry(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.at(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.atX(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.clear(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.deepCopy(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.del(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.equals(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.fill(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.filter_update(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.find(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.hashCode(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.insert(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.last(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.map_update(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_and(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_or(), com.cliffc.aa.util.Ary< E >.Iter.next(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.pop(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.push(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.remove(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.replace(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.set(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.set_len(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.setX(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.sort_update(), and com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.toString().
int com.cliffc.aa.util.Ary< E >._len |
Definition at line 13 of file Ary.java.
Referenced by com.cliffc.aa.Parse._short_circuit_expr(), com.cliffc.aa.node.MemSplitNode._update(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.add(), com.cliffc.aa.node.MemSplitNode.add_alias(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.addAll(), com.cliffc.aa.type.Type< TypeFlt >.ALL_TYPES(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.Ary(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.asAry(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.atX(), com.cliffc.aa.node.MemJoinNode.can_bypass(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.clear(), com.cliffc.aa.node.MemJoinNode.combine_splits(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.deepCopy(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.del(), com.cliffc.aa.node.Node.dumprpo(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.equals(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.fill(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.filter_update(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.find(), com.cliffc.aa.node.MemSplitNode.find_alias_index(), com.cliffc.aa.Parse.func(), com.cliffc.aa.type.TypeStruct.get_cyclic(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.hashCode(), com.cliffc.aa.util.Ary< E >.Iter.hasNext(), com.cliffc.aa.HM.HM4.hm(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.insert(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.isEmpty(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.last(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.len(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.map_update(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_and(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.merge_or(), com.cliffc.aa.HM.HM4.Syntax.more_work_impl(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.pop(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.push(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.range_check(), com.cliffc.aa.type.TypeStruct.reachable(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.remove(), com.cliffc.aa.Parse.remove_unknown_callers(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.replace(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.set_len(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.setX(), com.cliffc.aa.type.TypeStruct.shrink(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.sort_update(), com.cliffc.aa.Parse.stmt(), com.cliffc.aa.node.MemSplitNode.str(), com.cliffc.aa.util.Ary< com.cliffc.aa.HM.HM3.Ident >.toString(), com.cliffc.aa.Parse.type0(), com.cliffc.aa.node.MemSplitNode.unify(), and com.cliffc.aa.node.MemSplitNode.value().