# HG changeset patch # User Gary Benson # Date 1236856094 14400 # Node ID 019ce4c19ba2a92e72fd0d3c68cd22b2501d9f55 # Parent 5caf65dd9bd3ab891d33839c39526f7bca334df2 2009-03-12 Gary Benson * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Ensure that state setup code is the first code for the block. (transplanted from 832443ed76f7032e2e26d4453ce420cbd0c6d72d) diff -r 5caf65dd9bd3 -r 019ce4c19ba2 ChangeLog --- a/ChangeLog Wed Mar 11 09:03:27 2009 -0400 +++ b/ChangeLog Thu Mar 12 07:08:14 2009 -0400 @@ -1,3 +1,9 @@ +2009-03-12 Gary Benson + + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Ensure that state setup + code is the first code for the block. + 2009-03-11 Gary Benson * ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: New file. diff -r 5caf65dd9bd3 -r 019ce4c19ba2 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Mar 11 09:03:27 2009 -0400 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Thu Mar 12 07:08:14 2009 -0400 @@ -33,6 +33,11 @@ SharkValue *a, *b, *c, *d; int i; + // Ensure the current state is initialized before we emit any code, + // so that any setup code for the state is at the start of the block + current_state(); + + // Parse the bytecodes iter()->reset_to_bci(start); while (iter()->next_bci() < limit) { NOT_PRODUCT(a = b = c = d = NULL);