890
891 // Add Local and Expression Stack Information
892
893 // Insert locals into the locarray
894 GrowableArray<ScopeValue*> *locarray = new GrowableArray<ScopeValue*>(num_locs);
895 for( idx = 0; idx < num_locs; idx++ ) {
896 FillLocArray( idx, sfn, sfn->local(jvms, idx), locarray, objs );
897 }
898
899 // Insert expression stack entries into the exparray
900 GrowableArray<ScopeValue*> *exparray = new GrowableArray<ScopeValue*>(num_exps);
901 for( idx = 0; idx < num_exps; idx++ ) {
902 FillLocArray( idx, sfn, sfn->stack(jvms, idx), exparray, objs );
903 }
904
905 // Add in mappings of the monitors
906 assert( !method ||
907 !method->is_synchronized() ||
908 method->is_native() ||
909 num_mon > 0 ||
910 !GenerateSynchronizationCode,
911 "monitors must always exist for synchronized methods");
912
913 // Build the growable array of ScopeValues for exp stack
914 GrowableArray<MonitorValue*> *monarray = new GrowableArray<MonitorValue*>(num_mon);
915
916 // Loop over monitors and insert into array
917 for (idx = 0; idx < num_mon; idx++) {
918 // Grab the node that defines this monitor
919 Node* box_node = sfn->monitor_box(jvms, idx);
920 Node* obj_node = sfn->monitor_obj(jvms, idx);
921
922 // Create ScopeValue for object
923 ScopeValue *scval = NULL;
924
925 if (obj_node->is_SafePointScalarObject()) {
926 SafePointScalarObjectNode* spobj = obj_node->as_SafePointScalarObject();
927 scval = Compile::sv_for_node_id(objs, spobj->_idx);
928 if (scval == NULL) {
929 const Type *t = spobj->bottom_type();
930 ciKlass* cik = t->is_oopptr()->klass();
931 assert(cik->is_instance_klass() ||
|
890
891 // Add Local and Expression Stack Information
892
893 // Insert locals into the locarray
894 GrowableArray<ScopeValue*> *locarray = new GrowableArray<ScopeValue*>(num_locs);
895 for( idx = 0; idx < num_locs; idx++ ) {
896 FillLocArray( idx, sfn, sfn->local(jvms, idx), locarray, objs );
897 }
898
899 // Insert expression stack entries into the exparray
900 GrowableArray<ScopeValue*> *exparray = new GrowableArray<ScopeValue*>(num_exps);
901 for( idx = 0; idx < num_exps; idx++ ) {
902 FillLocArray( idx, sfn, sfn->stack(jvms, idx), exparray, objs );
903 }
904
905 // Add in mappings of the monitors
906 assert( !method ||
907 !method->is_synchronized() ||
908 method->is_native() ||
909 num_mon > 0 ||
910 !GenerateSynchronizationCode || (UseShenandoahGC && jvms->bci() < 0),
911 err_msg("monitors must always exist for synchronized methods, bci: %d", jvms->bci()));
912
913 // Build the growable array of ScopeValues for exp stack
914 GrowableArray<MonitorValue*> *monarray = new GrowableArray<MonitorValue*>(num_mon);
915
916 // Loop over monitors and insert into array
917 for (idx = 0; idx < num_mon; idx++) {
918 // Grab the node that defines this monitor
919 Node* box_node = sfn->monitor_box(jvms, idx);
920 Node* obj_node = sfn->monitor_obj(jvms, idx);
921
922 // Create ScopeValue for object
923 ScopeValue *scval = NULL;
924
925 if (obj_node->is_SafePointScalarObject()) {
926 SafePointScalarObjectNode* spobj = obj_node->as_SafePointScalarObject();
927 scval = Compile::sv_for_node_id(objs, spobj->_idx);
928 if (scval == NULL) {
929 const Type *t = spobj->bottom_type();
930 ciKlass* cik = t->is_oopptr()->klass();
931 assert(cik->is_instance_klass() ||
|