equal
deleted
inserted
replaced
59 vf->thread()->add_monitor_chunk(_monitors); |
59 vf->thread()->add_monitor_chunk(_monitors); |
60 |
60 |
61 // Migrate the BasicLocks from the stack to the monitor chunk |
61 // Migrate the BasicLocks from the stack to the monitor chunk |
62 for (index = 0; index < list->length(); index++) { |
62 for (index = 0; index < list->length(); index++) { |
63 MonitorInfo* monitor = list->at(index); |
63 MonitorInfo* monitor = list->at(index); |
|
64 assert(!monitor->owner_is_scalar_replaced(), "object should be reallocated already"); |
64 assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased"); |
65 assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased"); |
65 BasicObjectLock* dest = _monitors->at(index); |
66 BasicObjectLock* dest = _monitors->at(index); |
66 dest->set_obj(monitor->owner()); |
67 dest->set_obj(monitor->owner()); |
67 monitor->lock()->move_to(monitor->owner(), dest->lock()); |
68 monitor->lock()->move_to(monitor->owner(), dest->lock()); |
68 } |
69 } |
87 _locals = new StackValueCollection(locs->size()); |
88 _locals = new StackValueCollection(locs->size()); |
88 for(index = 0; index < locs->size(); index++) { |
89 for(index = 0; index < locs->size(); index++) { |
89 StackValue* value = locs->at(index); |
90 StackValue* value = locs->at(index); |
90 switch(value->type()) { |
91 switch(value->type()) { |
91 case T_OBJECT: |
92 case T_OBJECT: |
|
93 assert(!value->obj_is_scalar_replaced(), "object should be reallocated already"); |
92 // preserve object type |
94 // preserve object type |
93 _locals->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); |
95 _locals->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); |
94 break; |
96 break; |
95 case T_CONFLICT: |
97 case T_CONFLICT: |
96 // A dead local. Will be initialized to null/zero. |
98 // A dead local. Will be initialized to null/zero. |
111 _expressions = new StackValueCollection(exprs->size()); |
113 _expressions = new StackValueCollection(exprs->size()); |
112 for(index = 0; index < exprs->size(); index++) { |
114 for(index = 0; index < exprs->size(); index++) { |
113 StackValue* value = exprs->at(index); |
115 StackValue* value = exprs->at(index); |
114 switch(value->type()) { |
116 switch(value->type()) { |
115 case T_OBJECT: |
117 case T_OBJECT: |
|
118 assert(!value->obj_is_scalar_replaced(), "object should be reallocated already"); |
116 // preserve object type |
119 // preserve object type |
117 _expressions->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); |
120 _expressions->add( new StackValue((intptr_t) (value->get_obj()()), T_OBJECT )); |
118 break; |
121 break; |
119 case T_CONFLICT: |
122 case T_CONFLICT: |
120 // A dead stack element. Will be initialized to null/zero. |
123 // A dead stack element. Will be initialized to null/zero. |