107 // Our locals were accounted for by the caller (or last_frame_adjust |
107 // Our locals were accounted for by the caller (or last_frame_adjust |
108 // on the transistion) Since the callee parameters already account |
108 // on the transistion) Since the callee parameters already account |
109 // for the callee's params we only need to account for the extra |
109 // for the callee's params we only need to account for the extra |
110 // locals. |
110 // locals. |
111 int size = overhead + |
111 int size = overhead + |
112 (callee_locals - callee_params)*Interpreter::stackElementWords + |
112 (callee_locals - callee_params) + |
113 monitors * frame::interpreter_frame_monitor_size() + |
113 monitors * frame::interpreter_frame_monitor_size() + |
114 temps* Interpreter::stackElementWords + extra_args; |
114 // On the top frame, at all times SP <= ESP, and SP is |
|
115 // 16-aligned. We ensure this by adjusting SP on method |
|
116 // entry and re-entry to allow room for the maximum size of |
|
117 // the expression stack. When we call another method we bump |
|
118 // SP so that no stack space is wasted. So, only on the top |
|
119 // frame do we need to allow max_stack words. |
|
120 (is_top_frame ? max_stack : temps + extra_args); |
115 |
121 |
116 // On AArch64 we always keep the stack pointer 16-aligned, so we |
122 // On AArch64 we always keep the stack pointer 16-aligned, so we |
117 // must round up here. |
123 // must round up here. |
118 size = round_to(size, 2); |
124 size = round_to(size, 2); |
119 |
125 |