summaryrefslogtreecommitdiffstats
path: root/opcode-gen
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2010-12-03 17:58:01 -0800
committerDan Bornstein <danfuzz@android.com>2010-12-03 17:58:01 -0800
commit9dc57d3f402abcaacae2943cb374f46d48cceae7 (patch)
treeb6dbb9bcb5221db9cdbf106d3c70d5a49e078198 /opcode-gen
parentfbddc6e5683e31fddf9546881212e663e9c0bf6f (diff)
downloadandroid_dalvik-9dc57d3f402abcaacae2943cb374f46d48cceae7.tar.gz
android_dalvik-9dc57d3f402abcaacae2943cb374f46d48cceae7.tar.bz2
android_dalvik-9dc57d3f402abcaacae2943cb374f46d48cceae7.zip
Minor simplification.
Change-Id: Ie17ba83ead45028a8b7b32c1cc5763f9dd6d684c
Diffstat (limited to 'opcode-gen')
-rw-r--r--opcode-gen/opcode-gen.awk18
1 files changed, 8 insertions, 10 deletions
diff --git a/opcode-gen/opcode-gen.awk b/opcode-gen/opcode-gen.awk
index 82e4fcf36..934413fd6 100644
--- a/opcode-gen/opcode-gen.awk
+++ b/opcode-gen/opcode-gen.awk
@@ -53,6 +53,11 @@ consumeUntil != "" {
emission = substr($0, i + 6, RLENGTH - 7);
consumeUntil = "END(" emission ")";
emissionHandled = 0;
+}
+
+# Most lines just get copied from the source as-is, including the start
+# comment for directives.
+{
print;
}
@@ -195,11 +200,8 @@ emission == "libdex-index-types" {
}
}
-#
-# General control (must appear after the directives).
-#
-
-# Handle the end of directive processing.
+# Handle the end of directive processing (must appear after the directive
+# clauses).
emission != "" {
if (!emissionHandled) {
printf("WARNING: unknown tag \"%s\"\n", emission) >"/dev/stderr";
@@ -207,12 +209,8 @@ emission != "" {
}
emission = "";
- next;
}
-# Most lines just get copied from the source as-is.
-{ print; }
-
#
# Helper functions.
#
@@ -288,7 +286,7 @@ function defineOpcode(line, count, parts, idx) {
# Calculate derived values.
constName[idx] = toupper(name[idx]);
- gsub("[---/]", "_", constName[idx]); # Dash and slash become underscore.
+ gsub("[/-]", "_", constName[idx]); # Dash and slash become underscore.
gsub("[+^]", "", constName[idx]); # Plus and caret are removed.
split(name[idx], parts, "/");