returns true when it compiles, false otherwise
483672
public static function ccompile($in, $out, $less = null)
    {
        if ($less === null) {
            $less = new self();
        }

        return $less->checkedCompile($in, $out);
    }
749582
def compile_when_to_only_if(expression):
    '''
    
    '''

    # when: set $variable
    # when: unset $variable
    # when: failed $json_result
    # when: changed $json_result
    # when: int $x >= $z and $y < 3
    # when: int $x in $alist
    # when: float $x > 2 and $y <= $z
    # when: str $x != $y

    if type(expression) not in [ str, unicode ]:
        raise errors.AnsibleError("invalid usage of when_ operator: %s" % expression)
    tokens = expression.split()
    if len(tokens) < 2:
        raise errors.AnsibleError("invalid usage of when_ operator: %s" % expression)

    # when_set / when_unset
    if tokens[0] in [ 'set', 'unset' ]:
        tcopy = tokens[1:]
        for (i,t) in enumerate(tokens[1:]):
            if t.find("$") != -1:
                tcopy[i] = "is_%s('''%s''')" % (tokens[0], t)
            else:
                tcopy[i] = t
        return " ".join(tcopy)



    # when_failed / when_changed
    elif tokens[0] in [ 'failed', 'changed' ]:
        tcopy = tokens[1:]
        for (i,t) in enumerate(tokens[1:]):
            if t.find("$") != -1:
                tcopy[i] = "is_%s(%s)" % (tokens[0], t)
            else:
                tcopy[i] = t
        return " ".join(tcopy)



    # when_integer / when_float / when_string
    elif tokens[0] in [ 'integer', 'float', 'string' ]:
        cast = None
        if tokens[0] == 'integer':
            cast = 'int'
        elif tokens[0] == 'string':
            cast = 'str'
        elif tokens[0] == 'float':
            cast = 'float'
        tcopy = tokens[1:]
        for (i,t) in enumerate(tokens[1:]):
            if t.find("$") != -1:
                # final variable substitution will happen in Runner code
                tcopy[i] = "%s('''%s''')" % (cast, t)
            else:
                tcopy[i] = t
        return " ".join(tcopy)

    # when_boolean
    elif tokens[0] in [ 'bool', 'boolean' ]:
        tcopy = tokens[1:]
        for (i, t) in enumerate(tcopy):
            if t.find("$") != -1:
                tcopy[i] = "(is_set('''%s''') and '''%s'''.lower() not in ('false', 'no', 'n', 'none', '0', ''))" % (t, t)
        return " ".join(tcopy)

    else:
        raise errors.AnsibleError("invalid usage of when_ operator: %s" % expression)
148196
private boolean hasRuleSet(CssAtRule atRule, CssTokenIterator iter)
  {
    int debugIndex;
    if (debug)
    {
      checkArgument(iter.last.getChar() == '{');
      debugIndex = iter.index();
    }
    List<CssToken> list = iter.list;
    for (int i = iter.index() + 1; i < list.size(); i++)
    {
      CssToken tk = list.get(i);
      if (MATCH_OPENBRACE.apply(tk))
      {
        return true;
      }
      else if (MATCH_SEMI_CLOSEBRACE.apply(tk))
      {
        return false;
      }
    }
    if (debug)
    {
      checkState(iter.last.getChar() == '{');
      checkState(iter.index() == debugIndex);
    }
    return false;
  }
967417
static function isExecutionEnabled()
    {
        if ( isset( $GLOBALS['eZTemplateCompilerSettings']['execution'] ) and
             $GLOBALS['eZTemplateCompilerSettings']['execution'] !== null )
        {
            return $GLOBALS['eZTemplateCompilerSettings']['execution'];
        }

        $ini = eZINI::instance();
        $execution = $ini->variable( 'TemplateSettings', 'CompileExecution' ) == 'enabled';
        return $execution;
    }
456670
function isChildCompilerCacheOutdated (mainCompilation, childCompiler) {
  // If the compilation was never run there is no invalid cache
  if (!childCompiler.compilationStartedTimestamp) {
    return false;
  }
  // Check if any dependent file was changed after the last compilation
  const fileTimestamps = mainCompilation.fileTimestamps;
  const isCacheOutOfDate = childCompiler.fileDependencies.some((fileDependency) => {
    const timestamp = fileTimestamps.get(fileDependency);
    // If the timestamp is not known the file is new
    // If the timestamp is larger then the file has changed
    // Otherwise the file is still the same
    return !timestamp || timestamp > childCompiler.compilationStartedTimestamp;
  });
  return isCacheOutOfDate;
}
108036
static function isCompilationEnabled()
    {
        if ( isset( $GLOBALS['eZSiteBasics'] ) )
        {
            $siteBasics = $GLOBALS['eZSiteBasics'];
            if ( isset( $siteBasics['no-cache-adviced'] ) and
                 $siteBasics['no-cache-adviced'] )
            {
                return false;
            }
        }

        if ( isset( $GLOBALS['eZTemplateCompilerSettings']['compile'] ) and
             $GLOBALS['eZTemplateCompilerSettings']['compile'] !== null )
        {
            return $GLOBALS['eZTemplateCompilerSettings']['compile'];
        }

        $ini = eZINI::instance();
        $compilationEnabled = $ini->variable( 'TemplateSettings', 'TemplateCompile' ) == 'enabled';
        return $compilationEnabled;
    }
758878
private boolean isSupportedPrimitive(PrimitiveTypeInfo type) {
        switch (type.getPrimitiveCategory()) {
            case VOID:
            case STRING:
            case BOOLEAN:
            case BYTE:
            case SHORT:
            case INT:
            case LONG:
            case FLOAT:
            case DOUBLE:
            case DATE:
            case TIMESTAMP:
                return true;
            default:
                return false;
        }
    }
804680
static boolean mayEffectMutableState(Node n, AbstractCompiler compiler) {
    checkNotNull(compiler);
    return checkForStateChangeHelper(n, true, compiler);
  }
342453
private boolean compileIfDirty(CompilationUnit unit) throws IOException {
        if (isDirty(unit)) {
            logger.debug("compiling less: {}", unit);
            long start = System.currentTimeMillis();

            try {
                String sourceMapFileName = unit.getSourceMapFile() != null ? unit.getSourceMapFile().getPath() : null;
                CompilationDetails compilationResult = lessCompiler.compileWithDetails(unit.getSourceAsString(), unit.getResourceReader(), unit.getOptions(), unit.getSourceLocation(), unit.getDestination().getPath(), sourceMapFileName);
                if (unit.getDestination() != null) {
                    unit.getDestination().getAbsoluteFile().getParentFile().mkdirs();
                    IOUtils.writeFile(compilationResult.getResult(), unit.getDestination(), unit.getEncoding());
                }
                if (unit.getSourceMapFile() != null && compilationResult.getSourceMap() != null) {
                    unit.getSourceMapFile().getAbsoluteFile().getParentFile().mkdirs();
                    IOUtils.writeFile(compilationResult.getSourceMap(), unit.getSourceMapFile(), unit.getEncoding());
                }
                updateImportsAndCache(unit, compilationResult.getImports());
                logger.info("compilation of less {} finished in {} millis", unit, System.currentTimeMillis() - start);
                return true;
            } catch (LessParseException e) {
                unit.setExceptionTimestamp(System.currentTimeMillis());
                cache(unit);
                throw e;
            }
        }
        return false;
    }
457937
public boolean isExecutable()
	{
		boolean result = isTag("object") || isTag("void") && hasAttr("class") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
				&& hasAttr("method") || isTag("array") || isPrimitive() //$NON-NLS-1$ //$NON-NLS-2$
				|| isTag("class") || isTag("null"); //$NON-NLS-1$ //$NON-NLS-2$
		return result;
	}
951744
def detect_compiler(libpath):
    
    from os import waitpid, path
    from subprocess import Popen, PIPE
    command = "nm {0}".format(path.abspath(libpath))
    child = Popen(command, shell=True, executable="/bin/bash", stdout=PIPE)
    # Need to do this so that we are sure the process is done before moving on
    waitpid(child.pid, 0)
    contents = child.stdout.readlines()
    i = 0
    found = False
    while i < len(contents) and found == False:
        if "_MOD_" in contents[i]:
            found = "gfortran"
        elif "_mp_" in contents[i]:
            found = "ifort"
        i += 1

    return found
1270019
def autoloaded?(desc)
      # No name => anonymous module.
      return false if desc.is_a?(Module) && desc.name.blank?
      name = to_constant_name desc
      return false unless qualified_const_defined? name
      return autoloaded_constants.include?(name)
    end
747629
static boolean isSomeCompileTimeConstStringValue(Node node) {
    // TODO(bangert): Support constants, using a Scope argument. See ConstParamCheck
    if (node.isString() || (node.isTemplateLit() && node.hasOneChild())) {
      return true;
    } else if (node.isAdd()) {
      checkState(node.hasTwoChildren(), node);
      Node left = node.getFirstChild();
      Node right = node.getLastChild();
      return isSomeCompileTimeConstStringValue(left) && isSomeCompileTimeConstStringValue(right);
    } else if (node.isHook()) {
      // Ternary operator a ? b : c
      Node left = node.getSecondChild();
      Node right = node.getLastChild();
      return isSomeCompileTimeConstStringValue(left) && isSomeCompileTimeConstStringValue(right);
    }
    return false;
  }
531085
public function compile(): bool
    {
        // Delete old twig cache files
        if (file_exists($this->cachePath)) {
            $this->removeDirectory($this->cachePath);
        }

        if (!file_exists($this->cachePath)) {
            mkdir($this->cachePath);
        }

        // Iterate over all your templates and force compilation
        $this->twig->disableDebug();
        $this->twig->enableAutoReload();

        if (!$this->twig->getCache()) {
            throw new RuntimeException('The Twig cache must be enabled!');
        }

        $loader = $this->twig->getLoader();

        if ($loader instanceof FilesystemLoader) {
            $paths = $loader->getPaths();

            foreach ($paths as $path) {
                $this->compileFiles($path);
            }
        }

        return true;
    }
1085849
public Result compile(SourceFile extern, SourceFile input, CompilerOptions options) {
    return compile(ImmutableList.of(extern), ImmutableList.of(input), options);
  }
1353571
public static boolean isHoistedFunctionDeclaration(Node n) {
    if (isFunctionDeclaration(n)) {
      Node parent = n.getParent();
      return parent.isScript()
          || parent.isModuleBody()
          || parent.getParent().isFunction()
          || parent.isExport();
    }
    return false;
  }
945557
public function beforeCompile(): void
	{
		$config = $this->validateConfig($this->defaults);

		if ($config['autoload'] === true) {
			if ($config['lazy'] === true) {
				$this->doBeforeCompileLaziness();
			} else {
				$this->doBeforeCompile();
			}
		}
	}