diff options
author | Dan Bornstein <danfuzz@android.com> | 2010-12-03 17:58:01 -0800 |
---|---|---|
committer | Dan Bornstein <danfuzz@android.com> | 2010-12-03 17:58:01 -0800 |
commit | 9dc57d3f402abcaacae2943cb374f46d48cceae7 (patch) | |
tree | b6dbb9bcb5221db9cdbf106d3c70d5a49e078198 /opcode-gen | |
parent | fbddc6e5683e31fddf9546881212e663e9c0bf6f (diff) | |
download | android_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.awk | 18 |
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, "/"); |