thread: make_frame() optimization

Test case:

  public class Test {
    public static int sum(int x, int y) {
      return x+y;
    }

    public static void main(String[] args) {
      for (int i = 0; i < 10000000; i++) {
        sum(1, 2);
      }
    }
  }

Before:

[penberg@nero hornet]$ perf stat ./hornet Test
warning: java/lang/Object::registerNatives()V: stubbed
warning: java/lang/Object::registerNatives()V: stubbed

 Performance counter stats for './hornet Test':

       1960.029992      task-clock (msec)         #    0.998 CPUs utilized
                 7      context-switches          #    0.004 K/sec
                 1      cpu-migrations            #    0.001 K/sec
             2,052      page-faults               #    0.001 M/sec
     7,756,590,546      cycles                    #    3.957 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
    21,345,371,128      instructions              #    2.75  insns per cycle
     4,482,476,845      branches                  # 2286.943 M/sec
           198,243      branch-misses             #    0.00% of all branches

       1.963298566 seconds time elapsed

After:

[penberg@nero hornet]$ perf stat ./hornet Test
warning: java/lang/Object::registerNatives()V: stubbed
warning: java/lang/Object::registerNatives()V: stubbed

 Performance counter stats for './hornet Test':

       1758.548542      task-clock (msec)         #    0.998 CPUs utilized
                 5      context-switches          #    0.003 K/sec
                 1      cpu-migrations            #    0.001 K/sec
             2,052      page-faults               #    0.001 M/sec
     6,790,464,710      cycles                    #    3.861 GHz
   <not supported>      stalled-cycles-frontend
   <not supported>      stalled-cycles-backend
    19,144,896,892      instructions              #    2.82  insns per cycle
     3,942,398,988      branches                  # 2241.848 M/sec
           199,330      branch-misses             #    0.01% of all branches

       1.761814889 seconds time elapsed

Signed-off-by: Pekka Enberg <penberg@iki.fi>