Package org.adoptopenjdk.jitwatch.sandbox.compiler

Examples of org.adoptopenjdk.jitwatch.sandbox.compiler.ICompiler


    this.sandboxStage = sandboxStage;
  }

  private ICompiler getCompiler(String language, ISandboxLogListener logger)
  {
    ICompiler compiler = null;

    String compilerPath = logParser.getConfig().getVMLanguageCompilerPath(language);

    if (compilerPath != null && !S_EMPTY.equals(compilerPath))
    {
View Full Code Here


  public void runSandbox(String language, List<File> compileList, File fileToRun) throws Exception
  {
    logListener.log("Running Sandbox");
    logListener.log("Language is " + language);

    ICompiler compiler = getCompiler(language, logListener);

    if (compiler == null)
    {
      logListener.log(language + " compiler path not set. Please click Configure Sandbox and set up the path.");
      return;
    }

    IRuntime runtime = getRuntime(language, logListener);

    if (runtime == null)
    {
      logListener.log(language + " runtime path not set. Please click Configure Sandbox and set up the path.");
      return;
    }

    logListener.log("Compiling: " + StringUtil.listToString(compileList));

    boolean compiledOK = compiler.compile(compileList, logParser.getConfig().getClassLocations(), SANDBOX_CLASS_DIR.toFile(),
        logListener);

    logListener.log("Compilation success: " + compiledOK);

    if (compiledOK)
    {
      String fqClassNameToRun = runtime.getClassToExecute(fileToRun);

      boolean executionSuccess = executeClass(fqClassNameToRun, runtime, logParser.getConfig().isSandboxIntelMode());

      logListener.log("Execution success: " + executionSuccess);

      if (executionSuccess)
      {
        runJITWatch();

        if (!logParser.hasParseError())
        {
          String fqClassNameForTriView = runtime.getClassForTriView(fileToRun);

          showTriView(language, fqClassNameForTriView);
        }
      }
      else
      {
        sandboxStage.showError(runtime.getErrorStream());
      }
    }
    else
    {
      sandboxStage.showError(compiler.getErrorStream());
    }
  }
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.sandbox.compiler.ICompiler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.