public static function compilePartial($template, $options = array('flags' => self::FLAG_BESTPERFORMANCE)) {
        $context = Context::create($options);

        if (static::handleError($context)) {
            return false;
        }

        $code = Partial::compile($context, SafeString::escapeTemplate($template));

        static::$lastParsed = Compiler::$lastParsed;

        // return false when fatal error
        if (static::handleError($context)) {
            return false;
        }

        return $code;
    }