Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: pkg/front_end/tool/fasta

Issue 2740323002: Shell script to ease running fasta tools. (Closed)
Patch Set: Update testing.json. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/tool/_fasta/standard_deviation.dart ('k') | pkg/front_end/tool/fasta/abcompile.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/tool/fasta
diff --git a/pkg/front_end/tool/fasta b/pkg/front_end/tool/fasta
new file mode 100755
index 0000000000000000000000000000000000000000..a82ad51997cfb3dbda187f8e11e8ee13684b2c19
--- /dev/null
+++ b/pkg/front_end/tool/fasta
@@ -0,0 +1,57 @@
+#!/bin/bash
+# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+set -e
+
+REPO_DIR="$(git rev-parse --show-toplevel)"
+
+# TODO(ahe): We currently rely on the Dart VM wrapper script to define
+# DART_CONFIGURATION for locating platform.dill.
+DART_VM="${REPO_DIR}/sdk/bin/dart"
+
+TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta"
+
+KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin"
+
+function stop {
+ echo "$@" >&2
+ exit 1
+}
+
+case "${1//_/-}" in
+ abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";;
+ analyzer-compile) SCRIPT="${TOOL_DIR}/analyzer_compile.dart";;
+ compile) SCRIPT="${TOOL_DIR}/compile.dart";;
+ compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";;
+ compile-platform-dartk)
+ SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart"
+ if [ "$#" != "2" ]; then
+ stop "Usage: $1 file"
+ fi
+ ;;
+ log) SCRIPT="${TOOL_DIR}/log_analyzer.dart";;
+ logd) SCRIPT="${TOOL_DIR}/log_collector.dart";;
+ outline) SCRIPT="${TOOL_DIR}/outline.dart";;
+ parser) SCRIPT="${TOOL_DIR}/parser.dart";;
+ run) SCRIPT="${TOOL_DIR}/run.dart";;
+ scanner) SCRIPT="${TOOL_DIR}/scanner.dart";;
+ dump-ir)
+ SCRIPT="${KERNEL_BIN}/dump.dart"
+ if [ "$#" = "2" ]; then
+ # Write to stdout if no target is given.
+ set -- "$@" /dev/fd/1
+ fi
+ if [ "$#" != "3" ]; then
+ stop "Usage: $1 dillfile [output]"
+ fi
+ ;;
+ *)
+ stop "'$1' isn't a valid subcommand."
+ ;;
+esac
+
+shift
+
+exec "${DART_VM}" -c "${SCRIPT}" "$@"
« no previous file with comments | « pkg/front_end/tool/_fasta/standard_deviation.dart ('k') | pkg/front_end/tool/fasta/abcompile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698