1 /*
2 * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
842 state.spop();
843 fall_through = false;
844 break;
845 case Bytecodes::_lreturn:
846 case Bytecodes::_dreturn:
847 state.lpop();
848 fall_through = false;
849 break;
850 case Bytecodes::_areturn:
851 set_returned(state.apop());
852 fall_through = false;
853 break;
854 case Bytecodes::_getstatic:
855 case Bytecodes::_getfield:
856 { bool ignored_will_link;
857 ciField* field = s.get_field(ignored_will_link);
858 BasicType field_type = field->type()->basic_type();
859 if (s.cur_bc() != Bytecodes::_getstatic) {
860 set_method_escape(state.apop());
861 }
862 if (field_type == T_OBJECT || field_type == T_ARRAY) {
863 state.apush(unknown_obj);
864 } else if (type2size[field_type] == 1) {
865 state.spush();
866 } else {
867 state.lpush();
868 }
869 }
870 break;
871 case Bytecodes::_putstatic:
872 case Bytecodes::_putfield:
873 { bool will_link;
874 ciField* field = s.get_field(will_link);
875 BasicType field_type = field->type()->basic_type();
876 if (field_type == T_OBJECT || field_type == T_ARRAY) {
877 set_global_escape(state.apop());
878 } else if (type2size[field_type] == 1) {
879 state.spop();
880 } else {
881 state.lpop();
882 }
883 if (s.cur_bc() != Bytecodes::_putstatic) {
884 ArgumentMap p = state.apop();
885 set_method_escape(p);
886 set_modified(p, will_link ? field->offset() : OFFSET_ANY, type2size[field_type]*HeapWordSize);
887 }
888 }
889 break;
890 case Bytecodes::_invokevirtual:
891 case Bytecodes::_invokespecial:
892 case Bytecodes::_invokestatic:
893 case Bytecodes::_invokedynamic:
894 case Bytecodes::_invokeinterface:
895 { bool ignored_will_link;
896 ciSignature* declared_signature = NULL;
|
1 /*
2 * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
842 state.spop();
843 fall_through = false;
844 break;
845 case Bytecodes::_lreturn:
846 case Bytecodes::_dreturn:
847 state.lpop();
848 fall_through = false;
849 break;
850 case Bytecodes::_areturn:
851 set_returned(state.apop());
852 fall_through = false;
853 break;
854 case Bytecodes::_getstatic:
855 case Bytecodes::_getfield:
856 { bool ignored_will_link;
857 ciField* field = s.get_field(ignored_will_link);
858 BasicType field_type = field->type()->basic_type();
859 if (s.cur_bc() != Bytecodes::_getstatic) {
860 set_method_escape(state.apop());
861 }
862 if (is_reference_type(field_type)) {
863 state.apush(unknown_obj);
864 } else if (type2size[field_type] == 1) {
865 state.spush();
866 } else {
867 state.lpush();
868 }
869 }
870 break;
871 case Bytecodes::_putstatic:
872 case Bytecodes::_putfield:
873 { bool will_link;
874 ciField* field = s.get_field(will_link);
875 BasicType field_type = field->type()->basic_type();
876 if (is_reference_type(field_type)) {
877 set_global_escape(state.apop());
878 } else if (type2size[field_type] == 1) {
879 state.spop();
880 } else {
881 state.lpop();
882 }
883 if (s.cur_bc() != Bytecodes::_putstatic) {
884 ArgumentMap p = state.apop();
885 set_method_escape(p);
886 set_modified(p, will_link ? field->offset() : OFFSET_ANY, type2size[field_type]*HeapWordSize);
887 }
888 }
889 break;
890 case Bytecodes::_invokevirtual:
891 case Bytecodes::_invokespecial:
892 case Bytecodes::_invokestatic:
893 case Bytecodes::_invokedynamic:
894 case Bytecodes::_invokeinterface:
895 { bool ignored_will_link;
896 ciSignature* declared_signature = NULL;
|