Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright (C) 2017 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 import java.lang.reflect.Constructor;
     18 import java.lang.reflect.Executable;
     19 import java.lang.reflect.Field;
     20 import java.lang.reflect.Method;
     21 import java.lang.reflect.Modifier;
     22 
     23 import java.time.Duration;
     24 
     25 import java.util.concurrent.*;
     26 import java.util.ArrayList;
     27 import java.util.Arrays;
     28 import java.util.List;
     29 import java.util.Optional;
     30 import java.util.Random;
     31 import java.util.Stack;
     32 import java.util.Vector;
     33 
     34 import java.util.function.Supplier;
     35 
     36 import art.*;
     37 
     38 public class Main extends Test1953 {
     39   public Main(boolean run_class_load_tests) {
     40     super(run_class_load_tests, (testObj) -> {
     41       try {
     42         // Make sure the calling method is jitted
     43         ensureMethodJitCompiled(testObj.getCallingMethod());
     44       } catch (Exception e) {}
     45     });
     46   }
     47 
     48   public static void main(String[] args) throws Exception {
     49     new Main(!Arrays.asList(args).contains("DISABLE_CLASS_LOAD_TESTS")).runTests();
     50   }
     51 
     52   public static native void ensureMethodJitCompiled(Method meth);
     53 }
     54