From 426cbdccfdf8fcfcda07b86d8e524d1034b2d0b7 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 22 Jun 2006 04:49:26 +0000 Subject: tests and "fix" for pr148007 - workaround JRockit "goto" bug by generating code closer to that produced by javac when weaving after and after returning. In particular: avoid adding a goto that branches to the next instruction (now replaces that return opcode with a nop instead), and store the return value on the top of the stack in a temp before branching to the after advice dispatch and restore it afterwards. --- tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java | 2 ++ tests/src/org/aspectj/systemtest/ajc152/ajc152.xml | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'tests/src') diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index 22c02cd03..79a3dc233 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -99,6 +99,8 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testSuperCallsInAtAspectJAdvice_pr139749() { runTest("Super calls in @AspectJ advice");} public void testNoClassCastExceptionWithPerThis_pr138286() { runTest("No ClassCastException with perThis");} public void testGenericAspectHierarchyWithBounds_pr147845() { runTest("Generic abstract aspect hierarchy with bounds"); } + public void testJRockitBooleanReturn_pr148007() { runTest("jrockit boolean fun");} + public void testJRockitBooleanReturn2_pr148007() { runTest("jrockit boolean fun (no aspects)");} public void testDeclareAtMethodRelationship_pr143924() { //AsmManager.setReporting("c:/debug.txt",true,true,true,true); diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index 370d24ad9..da553bad9 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -729,5 +729,14 @@ - + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3