diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 19:30:52 -0800 |
commit | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (patch) | |
tree | 11425ea0b299d6fb89c6d3618a22d97d5bf68d0f /JavaScriptCore/docs | |
parent | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (diff) | |
download | external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.zip external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.gz external_webkit-8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'JavaScriptCore/docs')
-rwxr-xr-x | JavaScriptCore/docs/make-bytecode-docs.pl | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/JavaScriptCore/docs/make-bytecode-docs.pl b/JavaScriptCore/docs/make-bytecode-docs.pl new file mode 100755 index 0000000..0be22eb --- /dev/null +++ b/JavaScriptCore/docs/make-bytecode-docs.pl @@ -0,0 +1,42 @@ +#!/usr/bin/perl -w + +use strict; + +open MACHINE, "<" . $ARGV[0]; +open OUTPUT, ">" . $ARGV[1]; + +my @undocumented = (); + +print OUTPUT "<style>p code \{ font-size: 14px; \}</style>\n"; + +while (<MACHINE>) { + if (/^ *BEGIN_OPCODE/) { + chomp; + s/^ *BEGIN_OPCODE\(op_//; + s/\).*$//; + my $opcode = $_; + $_ = <MACHINE>; + chomp; + if (m|/\* |) { + my $format = $_; + $format =~ s|.* /\* ||; + my $doc = ""; + while (<MACHINE>) { + if (m|\*/|) { + last; + } + $doc .= $_ . " "; + } + + print OUTPUT "<h2><code>${opcode}</code></h2>\n<p><b>Format: </b><code>\n${format}\n</code></p>\n<p>\n${doc}\n</p>\n"; + } else { + push @undocumented, $opcode; + } + } +} + +close OUTPUT; + +for my $undoc (@undocumented) { + print "UNDOCUMENTED: ${undoc}\n"; +} |