Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • None
    • None
    • tools
    • None

    Description

      Create a tool which removes bridge method and injects an attribute.

      ------Description from email------

      The problem we're trying to test is support for bridge method generation in the VM. Recall that there are several cases where javac generates "bridge" methods:

      interface Foo<T> {
          void accept(T t);
      }

      class Moo implements Foo<STring> {
          void accept(STring s) { ... }
      }

      Now, the erases signature for Foo.accept is accept(Object)V, so the compiler generates a bridge method:

          void accept(Object o) { accept((String) o); }

      Similarly the compiler generates a bridge when there are covariant overrides. Such methods (I believe) have the ACC_BRIDGE bit set.

      Keith wrote support for enabling bridging all methods in the VM, which is triggered by the presence of a classfile attribute. To test it, one way we can do this is to strip bridges out of classes and inject this attribute, and run regular tests.

      So what we'd need is another mini-mangler to remove all methods tagged with ACC_BRIDGE, and add the "please bridge me" attribute into all classes.


      Attachments

        Issue Links

          Activity

            People

              ksrini Kumar Srinivasan
              ksrini Kumar Srinivasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: