comparison src/cpu/x86/vm/c1_LIRGenerator_x86.cpp @ 933:cdb8b7c37ac1

6875329: fix for 6795465 broke exception handler cloning Reviewed-by: kvn
author never
date Mon, 24 Aug 2009 22:26:15 -0700
parents 98cb887364d3
children 89e0543e1737 ff1a29907b6c
comparison
equal deleted inserted replaced
932:82bd76d4d7f2 933:cdb8b7c37ac1
1045 while (i-- > 0) { 1045 while (i-- > 0) {
1046 LIRItem* size = new LIRItem(dims->at(i), this); 1046 LIRItem* size = new LIRItem(dims->at(i), this);
1047 items->at_put(i, size); 1047 items->at_put(i, size);
1048 } 1048 }
1049 1049
1050 // need to get the info before, as the items may become invalid through item_free 1050 // Evaluate state_for early since it may emit code.
1051 CodeEmitInfo* patching_info = NULL; 1051 CodeEmitInfo* patching_info = NULL;
1052 if (!x->klass()->is_loaded() || PatchALot) { 1052 if (!x->klass()->is_loaded() || PatchALot) {
1053 patching_info = state_for(x, x->state_before()); 1053 patching_info = state_for(x, x->state_before());
1054 1054
1055 // cannot re-use same xhandlers for multiple CodeEmitInfos, so 1055 // cannot re-use same xhandlers for multiple CodeEmitInfos, so
1056 // clone all handlers. 1056 // clone all handlers. This is handled transparently in other
1057 // places by the CodeEmitInfo cloning logic but is handled
1058 // specially here because a stub isn't being used.
1057 x->set_exception_handlers(new XHandlers(x->exception_handlers())); 1059 x->set_exception_handlers(new XHandlers(x->exception_handlers()));
1058 } 1060 }
1059
1060 CodeEmitInfo* info = state_for(x, x->state()); 1061 CodeEmitInfo* info = state_for(x, x->state());
1061 1062
1062 i = dims->length(); 1063 i = dims->length();
1063 while (i-- > 0) { 1064 while (i-- > 0) {
1064 LIRItem* size = items->at(i); 1065 LIRItem* size = items->at(i);