58 assert(h == NULL, "hi-word of doubleword value must be NULL");
59 return check(tag, t);
60 }
61
62 // helper routine
63 static void apply(Values list, ValueVisitor* f);
64
65 // for simplified copying
66 ValueStack(ValueStack* copy_from, Kind kind, int bci);
67
68 public:
69 // creation
70 ValueStack(IRScope* scope, ValueStack* caller_state);
71
72 ValueStack* copy() { return new ValueStack(this, _kind, _bci); }
73 ValueStack* copy(Kind new_kind, int new_bci) { return new ValueStack(this, new_kind, new_bci); }
74 ValueStack* copy_for_parsing() { return new ValueStack(this, Parsing, -99); }
75
76 void set_caller_state(ValueStack* s) {
77 assert(kind() == EmptyExceptionState ||
78 (Compilation::current()->env()->jvmti_can_access_local_variables() && kind() == ExceptionState),
79 "only EmptyExceptionStates can be modified");
80 _caller_state = s;
81 }
82
83 bool is_same(ValueStack* s); // returns true if this & s's types match (w/o checking locals)
84
85 // accessors
86 IRScope* scope() const { return _scope; }
87 ValueStack* caller_state() const { return _caller_state; }
88 int bci() const { return _bci; }
89 Kind kind() const { return _kind; }
90
91 int locals_size() const { return _locals.length(); }
92 int stack_size() const { return _stack.length(); }
93 int locks_size() const { return _locks.length(); }
94 bool stack_is_empty() const { return _stack.is_empty(); }
95 bool no_active_locks() const { return _locks.is_empty(); }
96 int total_locks_size() const;
97
98 // locals access
|
58 assert(h == NULL, "hi-word of doubleword value must be NULL");
59 return check(tag, t);
60 }
61
62 // helper routine
63 static void apply(Values list, ValueVisitor* f);
64
65 // for simplified copying
66 ValueStack(ValueStack* copy_from, Kind kind, int bci);
67
68 public:
69 // creation
70 ValueStack(IRScope* scope, ValueStack* caller_state);
71
72 ValueStack* copy() { return new ValueStack(this, _kind, _bci); }
73 ValueStack* copy(Kind new_kind, int new_bci) { return new ValueStack(this, new_kind, new_bci); }
74 ValueStack* copy_for_parsing() { return new ValueStack(this, Parsing, -99); }
75
76 void set_caller_state(ValueStack* s) {
77 assert(kind() == EmptyExceptionState ||
78 (Compilation::current()->env()->should_retain_local_variables() && kind() == ExceptionState),
79 "only EmptyExceptionStates can be modified");
80 _caller_state = s;
81 }
82
83 bool is_same(ValueStack* s); // returns true if this & s's types match (w/o checking locals)
84
85 // accessors
86 IRScope* scope() const { return _scope; }
87 ValueStack* caller_state() const { return _caller_state; }
88 int bci() const { return _bci; }
89 Kind kind() const { return _kind; }
90
91 int locals_size() const { return _locals.length(); }
92 int stack_size() const { return _stack.length(); }
93 int locks_size() const { return _locks.length(); }
94 bool stack_is_empty() const { return _stack.is_empty(); }
95 bool no_active_locks() const { return _locks.is_empty(); }
96 int total_locks_size() const;
97
98 // locals access
|