78 intptr_t pop() { 79 assert(_sp < _top, "stack underflow"); 80 return *(_sp++); 81 } 82 83 void *alloc(size_t size) { 84 int count = align_size_up(size, wordSize) >> LogBytesPerWord; 85 assert(count <= available_words(), "stack overflow"); 86 return _sp -= count; 87 } 88 89 int shadow_pages_size() const { 90 return _shadow_pages_size; 91 } 92 93 public: 94 void overflow_check(int required_words, TRAPS); 95 static void handle_overflow(TRAPS); 96 97 public: 98 static ByteSize base_offset() { 99 return byte_offset_of(ZeroStack, _base); 100 } 101 static ByteSize top_offset() { 102 return byte_offset_of(ZeroStack, _top); 103 } 104 static ByteSize sp_offset() { 105 return byte_offset_of(ZeroStack, _sp); 106 } 107 }; 108 109 110 class EntryFrame; 111 class InterpreterFrame; 112 class SharkFrame; 113 class FakeStubFrame; 114 115 // 116 // | ... | 117 // +--------------------+ ------------------ | 78 intptr_t pop() { 79 assert(_sp < _top, "stack underflow"); 80 return *(_sp++); 81 } 82 83 void *alloc(size_t size) { 84 int count = align_size_up(size, wordSize) >> LogBytesPerWord; 85 assert(count <= available_words(), "stack overflow"); 86 return _sp -= count; 87 } 88 89 int shadow_pages_size() const { 90 return _shadow_pages_size; 91 } 92 93 public: 94 void overflow_check(int required_words, TRAPS); 95 static void handle_overflow(TRAPS); 96 97 public: 98 void zap(int c) PRODUCT_RETURN; 99 100 public: 101 static ByteSize base_offset() { 102 return byte_offset_of(ZeroStack, _base); 103 } 104 static ByteSize top_offset() { 105 return byte_offset_of(ZeroStack, _top); 106 } 107 static ByteSize sp_offset() { 108 return byte_offset_of(ZeroStack, _sp); 109 } 110 }; 111 112 113 class EntryFrame; 114 class InterpreterFrame; 115 class SharkFrame; 116 class FakeStubFrame; 117 118 // 119 // | ... | 120 // +--------------------+ ------------------ |