equal
deleted
inserted
replaced
42 class MoveResolver; |
42 class MoveResolver; |
43 class Range; |
43 class Range; |
44 |
44 |
45 typedef GrowableArray<Interval*> IntervalArray; |
45 typedef GrowableArray<Interval*> IntervalArray; |
46 typedef GrowableArray<Interval*> IntervalList; |
46 typedef GrowableArray<Interval*> IntervalList; |
47 |
47 typedef GrowableArray<IntervalList*> IntervalsList; |
48 define_array(IntervalsArray, IntervalList*) |
48 typedef GrowableArray<ScopeValue*> ScopeValueArray; |
49 define_stack(IntervalsList, IntervalsArray) |
49 typedef GrowableArray<LIR_OpList*> LIR_OpListStack; |
50 |
|
51 define_array(OopMapArray, OopMap*) |
|
52 define_stack(OopMapList, OopMapArray) |
|
53 |
|
54 define_array(ScopeValueArray, ScopeValue*) |
|
55 |
|
56 define_array(LIR_OpListArray, LIR_OpList*); |
|
57 define_stack(LIR_OpListStack, LIR_OpListArray); |
|
58 |
|
59 |
50 |
60 enum IntervalUseKind { |
51 enum IntervalUseKind { |
61 // priority of use kinds must be ascending |
52 // priority of use kinds must be ascending |
62 noUse = 0, |
53 noUse = 0, |
63 loopEndMarker = 1, |
54 loopEndMarker = 1, |
65 mustHaveRegister = 3, |
56 mustHaveRegister = 3, |
66 |
57 |
67 firstValidKind = 1, |
58 firstValidKind = 1, |
68 lastValidKind = 3 |
59 lastValidKind = 3 |
69 }; |
60 }; |
70 define_array(UseKindArray, IntervalUseKind) |
|
71 define_stack(UseKindStack, UseKindArray) |
|
72 |
|
73 |
61 |
74 enum IntervalKind { |
62 enum IntervalKind { |
75 fixedKind = 0, // interval pre-colored by LIR_Generator |
63 fixedKind = 0, // interval pre-colored by LIR_Generator |
76 anyKind = 1, // no register/memory allocated by LIR_Generator |
64 anyKind = 1, // no register/memory allocated by LIR_Generator |
77 nofKinds, |
65 nofKinds, |
617 // manipulating intervals |
605 // manipulating intervals |
618 void add_use_pos(int pos, IntervalUseKind use_kind); |
606 void add_use_pos(int pos, IntervalUseKind use_kind); |
619 void add_range(int from, int to); |
607 void add_range(int from, int to); |
620 Interval* split(int split_pos); |
608 Interval* split(int split_pos); |
621 Interval* split_from_start(int split_pos); |
609 Interval* split_from_start(int split_pos); |
622 void remove_first_use_pos() { _use_pos_and_kinds.truncate(_use_pos_and_kinds.length() - 2); } |
610 void remove_first_use_pos() { _use_pos_and_kinds.trunc_to(_use_pos_and_kinds.length() - 2); } |
623 |
611 |
624 // test intersection |
612 // test intersection |
625 bool covers(int op_id, LIR_OpVisitState::OprMode mode) const; |
613 bool covers(int op_id, LIR_OpVisitState::OprMode mode) const; |
626 bool has_hole_between(int from, int to); |
614 bool has_hole_between(int from, int to); |
627 bool intersects(Interval* i) const { return _first->intersects(i->_first); } |
615 bool intersects(Interval* i) const { return _first->intersects(i->_first); } |