diff options
author | aclement <aclement> | 2004-10-12 16:24:10 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-10-12 16:24:10 +0000 |
commit | 234bea2297cc780d5bf38ebbc4087e938cc3b6e8 (patch) | |
tree | 33014f9efe600b0eed5685d0a0054ba4d0771b36 /tests/cflow/CounterTest01.java | |
parent | 5c996fc559581581e9dde60a6f555aa3ff7cc042 (diff) | |
download | aspectj-234bea2297cc780d5bf38ebbc4087e938cc3b6e8.tar.gz aspectj-234bea2297cc780d5bf38ebbc4087e938cc3b6e8.zip |
76030 - cflow optimizations. Part 2 fix - share counters and stacks when we can.
Diffstat (limited to 'tests/cflow/CounterTest01.java')
-rw-r--r-- | tests/cflow/CounterTest01.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/cflow/CounterTest01.java b/tests/cflow/CounterTest01.java index 1578ea0f8..0240d6056 100644 --- a/tests/cflow/CounterTest01.java +++ b/tests/cflow/CounterTest01.java @@ -4,13 +4,20 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +/** + * In this testcase we are using cflow() with a pointcut that doesn't include state - + * this should be managed by our new CflowCounter rather than a CflowStack. + * + * Because the two cflow pointcuts are identical (both are 'cflow(execution(* main(..))' it also + * means we can share a single counter for both of them ! + */ public class CounterTest01 { public static void main(String []argv) { new CounterTest01().sayMessage(); int ctrs = ReflectionHelper.howManyCflowCounterFields(Cflow1.aspectOf()); - if (ctrs!=2) { - throw new RuntimeException("Should be two cflow counters, but found: "+ctrs); + if (ctrs!=1) { + throw new RuntimeException("Should be one cflow counter, but found: "+ctrs); } int stacks = ReflectionHelper.howManyCflowStackFields(Cflow1.aspectOf()); if (stacks!=1) { |