< prev index next >

src/hotspot/share/ci/bcEscapeAnalyzer.cpp

Print this page

 538         ArgumentMap arr = state.apop();
 539         set_method_escape(arr);
 540         set_modified(arr, OFFSET_ANY, type2size[T_INT]*HeapWordSize);
 541         break;
 542       }
 543       case Bytecodes::_lastore:
 544       case Bytecodes::_dastore:
 545       {
 546         state.lpop();
 547         state.spop();
 548         ArgumentMap arr = state.apop();
 549         set_method_escape(arr);
 550         set_modified(arr, OFFSET_ANY, type2size[T_LONG]*HeapWordSize);
 551         break;
 552       }
 553       case Bytecodes::_aastore:
 554       {
 555         set_global_escape(state.apop());
 556         state.spop();
 557         ArgumentMap arr = state.apop();



 558         set_modified(arr, OFFSET_ANY, type2size[T_OBJECT]*HeapWordSize);
 559         break;
 560       }
 561       case Bytecodes::_pop:
 562         state.raw_pop();
 563         break;
 564       case Bytecodes::_pop2:
 565         state.raw_pop();
 566         state.raw_pop();
 567         break;
 568       case Bytecodes::_dup:
 569         { ArgumentMap w1 = state.raw_pop();
 570           state.raw_push(w1);
 571           state.raw_push(w1);
 572         }
 573         break;
 574       case Bytecodes::_dup_x1:
 575         { ArgumentMap w1 = state.raw_pop();
 576           ArgumentMap w2 = state.raw_pop();
 577           state.raw_push(w1);

 922               Bytecodes::has_optional_appendix(s.cur_bc_raw()) &&
 923               target->intrinsic_id() != vmIntrinsics::_invokeBasic) {
 924             state.apush(unknown_obj);
 925           }
 926           // Pass in raw bytecode because we need to see invokehandle instructions.
 927           invoke(state, s.cur_bc_raw(), target, holder);
 928           // We are using the return type of the declared signature here because
 929           // it might be a more concrete type than the one from the target (for
 930           // e.g. invokedynamic and invokehandle).
 931           ciType* return_type = declared_signature->return_type();
 932           if (!return_type->is_primitive_type()) {
 933             state.apush(unknown_obj);
 934           } else if (return_type->is_one_word()) {
 935             state.spush();
 936           } else if (return_type->is_two_word()) {
 937             state.lpush();
 938           }
 939         }
 940         break;
 941       case Bytecodes::_new:

 942         state.apush(allocated_obj);
 943         break;















 944       case Bytecodes::_newarray:
 945       case Bytecodes::_anewarray:
 946         state.spop();
 947         state.apush(allocated_obj);
 948         break;
 949       case Bytecodes::_multianewarray:
 950         { int i = s.cur_bcp()[3];
 951           while (i-- > 0) state.spop();
 952           state.apush(allocated_obj);
 953         }
 954         break;
 955       case Bytecodes::_arraylength:
 956         set_method_escape(state.apop());
 957         state.spush();
 958         break;
 959       case Bytecodes::_athrow:
 960         set_global_escape(state.apop());
 961         fall_through = false;
 962         break;
 963       case Bytecodes::_checkcast:

 538         ArgumentMap arr = state.apop();
 539         set_method_escape(arr);
 540         set_modified(arr, OFFSET_ANY, type2size[T_INT]*HeapWordSize);
 541         break;
 542       }
 543       case Bytecodes::_lastore:
 544       case Bytecodes::_dastore:
 545       {
 546         state.lpop();
 547         state.spop();
 548         ArgumentMap arr = state.apop();
 549         set_method_escape(arr);
 550         set_modified(arr, OFFSET_ANY, type2size[T_LONG]*HeapWordSize);
 551         break;
 552       }
 553       case Bytecodes::_aastore:
 554       {
 555         set_global_escape(state.apop());
 556         state.spop();
 557         ArgumentMap arr = state.apop();
 558         // If the array is flattened, a larger part of it is modified than
 559         // the size of a reference. However, if OFFSET_ANY is given as
 560         // parameter to set_modified(), size is not taken into account.
 561         set_modified(arr, OFFSET_ANY, type2size[T_OBJECT]*HeapWordSize);
 562         break;
 563       }
 564       case Bytecodes::_pop:
 565         state.raw_pop();
 566         break;
 567       case Bytecodes::_pop2:
 568         state.raw_pop();
 569         state.raw_pop();
 570         break;
 571       case Bytecodes::_dup:
 572         { ArgumentMap w1 = state.raw_pop();
 573           state.raw_push(w1);
 574           state.raw_push(w1);
 575         }
 576         break;
 577       case Bytecodes::_dup_x1:
 578         { ArgumentMap w1 = state.raw_pop();
 579           ArgumentMap w2 = state.raw_pop();
 580           state.raw_push(w1);

 925               Bytecodes::has_optional_appendix(s.cur_bc_raw()) &&
 926               target->intrinsic_id() != vmIntrinsics::_invokeBasic) {
 927             state.apush(unknown_obj);
 928           }
 929           // Pass in raw bytecode because we need to see invokehandle instructions.
 930           invoke(state, s.cur_bc_raw(), target, holder);
 931           // We are using the return type of the declared signature here because
 932           // it might be a more concrete type than the one from the target (for
 933           // e.g. invokedynamic and invokehandle).
 934           ciType* return_type = declared_signature->return_type();
 935           if (!return_type->is_primitive_type()) {
 936             state.apush(unknown_obj);
 937           } else if (return_type->is_one_word()) {
 938             state.spush();
 939           } else if (return_type->is_two_word()) {
 940             state.lpush();
 941           }
 942         }
 943         break;
 944       case Bytecodes::_new:
 945       case Bytecodes::_defaultvalue:
 946         state.apush(allocated_obj);
 947         break;
 948       case Bytecodes::_withfield: {
 949         bool will_link;
 950         ciField* field = s.get_field(will_link);
 951         BasicType field_type = field->type()->basic_type();
 952         if (field_type == T_OBJECT || field_type == T_ARRAY) {
 953           set_global_escape(state.apop());
 954         } else if (type2size[field_type] == 1) {
 955           state.spop();
 956         } else {
 957           state.lpop();
 958         }
 959         set_method_escape(state.apop());
 960         state.apush(allocated_obj);
 961         break;
 962       }
 963       case Bytecodes::_newarray:
 964       case Bytecodes::_anewarray:
 965         state.spop();
 966         state.apush(allocated_obj);
 967         break;
 968       case Bytecodes::_multianewarray:
 969         { int i = s.cur_bcp()[3];
 970           while (i-- > 0) state.spop();
 971           state.apush(allocated_obj);
 972         }
 973         break;
 974       case Bytecodes::_arraylength:
 975         set_method_escape(state.apop());
 976         state.spush();
 977         break;
 978       case Bytecodes::_athrow:
 979         set_global_escape(state.apop());
 980         fall_through = false;
 981         break;
 982       case Bytecodes::_checkcast:
< prev index next >