Uploaded image for project: 'JikesRVM'
  1. JikesRVM
  2. RVM-796

Generalize objectAsThread, objectAsType, etc. magic wih Magic.eatCast

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.1.5
    • Component/s: Compiler: Optimizing
    • Labels:
      None

      Description

      We have a bunch of Magic.objectAsXXX methods. It would be nice to generalize these. We would like to be able to do:

      RVMThread t = (RVMThread)Magic.eatCast(o);

      instead of:

      RVMThread t = Magic.objectAsThread(o);

      since this results in fewer Magic methods. The semantics of eatCast would be as follows:

      • ignored in baseline compiler (because we don't care about performance there, and this will be used in runtime code that is opt compiled anyway),
      • any checkcast on the result of the eatCast() call is eliminated.

      Included is a patch that appears to implement this. Please review if you have a chance. I'm using it in my branch but it would be nice to get this into the trunk to simplify work for others doing similar things as me.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pizlo Filip Pizlo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: