equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
591 bool frame::interpreter_frame_equals_unpacked_fp(intptr_t* fp) { |
591 bool frame::interpreter_frame_equals_unpacked_fp(intptr_t* fp) { |
592 assert(is_interpreted_frame(), "must be interpreter frame"); |
592 assert(is_interpreted_frame(), "must be interpreter frame"); |
593 return this->fp() == fp; |
593 return this->fp() == fp; |
594 } |
594 } |
595 |
595 |
596 |
|
597 void frame::pd_gc_epilog() { |
|
598 if (is_interpreted_frame()) { |
|
599 // set constant pool cache entry for interpreter |
|
600 Method* m = interpreter_frame_method(); |
|
601 |
|
602 *interpreter_frame_cpoolcache_addr() = m->constants()->cache(); |
|
603 } |
|
604 } |
|
605 |
|
606 |
|
607 bool frame::is_interpreted_frame_valid(JavaThread* thread) const { |
596 bool frame::is_interpreted_frame_valid(JavaThread* thread) const { |
608 #ifdef CC_INTERP |
597 #ifdef CC_INTERP |
609 // Is there anything to do? |
598 // Is there anything to do? |
610 #else |
599 #else |
611 assert(is_interpreted_frame(), "Not an interpreted frame"); |
600 assert(is_interpreted_frame(), "Not an interpreted frame"); |
639 |
628 |
640 if (fp() - sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) { |
629 if (fp() - sp() > 1024 + m->max_stack()*Interpreter::stackElementSize) { |
641 return false; |
630 return false; |
642 } |
631 } |
643 |
632 |
644 // validate bci/bcx |
633 // validate bci/bcp |
645 |
634 |
646 intptr_t bcx = interpreter_frame_bcx(); |
635 address bcp = interpreter_frame_bcp(); |
647 if (m->validate_bci_from_bcx(bcx) < 0) { |
636 if (m->validate_bci_from_bcp(bcp) < 0) { |
648 return false; |
637 return false; |
649 } |
638 } |
650 |
639 |
651 // validate ConstantPoolCache* |
640 // validate ConstantPoolCache* |
652 ConstantPoolCache* cp = *interpreter_frame_cache_addr(); |
641 ConstantPoolCache* cp = *interpreter_frame_cache_addr(); |