2010-06-25 Patrick Gansterer <paroga@paroga.com>
Reviewed by Darin Adler.
Add the possibility for a head and footer section to create_jit_stubs.
https://bugs.webkit.org/show_bug.cgi?id=36050
* create_jit_stubs:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@61838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/create_jit_stubs b/JavaScriptCore/create_jit_stubs
index 4d510ea..9bb9ee508 100644
--- a/JavaScriptCore/create_jit_stubs
+++ b/JavaScriptCore/create_jit_stubs
@@ -42,6 +42,7 @@
die "$usage\n" unless ($prefix and $file);
my $stub_template = "";
+my $output_end = "";
my $stub = "";
my $rtype = "";
@@ -51,9 +52,17 @@
open(IN, $file) or die "No such file $file";
while ( $_ = <IN> ) {
+ if ( /^$prefix\_BEGIN\((.*)\)/ ) {
+ $stub = $1;
+ $stub =~ s/$offset_template/$offset/g;
+ print $stub . "\n";
+ }
if ( /^$prefix\((.*)\)/ ) {
$stub_template .= $1 . "\n";
}
+ if ( /^$prefix\_END\((.*)\)/ ) {
+ $output_end .= $1 . "\n";
+ }
if ( /^DEFINE_STUB_FUNCTION\((.*), (.*)\)/ ) {
$stub = $stub_template;
$rtype = quotemeta($1);
@@ -66,4 +75,6 @@
}
}
+print $output_end;
+
close(IN);