diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /JavaScriptCore/create_rvct_stubs | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'JavaScriptCore/create_rvct_stubs')
-rw-r--r-- | JavaScriptCore/create_rvct_stubs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/JavaScriptCore/create_rvct_stubs b/JavaScriptCore/create_rvct_stubs new file mode 100644 index 0000000..0c49c4f --- /dev/null +++ b/JavaScriptCore/create_rvct_stubs @@ -0,0 +1,52 @@ +#! /usr/bin/perl -w +# +# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; see the file COPYING.LIB. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +use strict; + +my $file = $ARGV[0]; +shift; + +my $stub_template = ""; +my $stub = ""; + +my $rtype = ""; +my $op = ""; + +my $rtype_template = quotemeta("#rtype#"); +my $op_template = quotemeta("#op#"); + +print STDERR "Creating RVCT stubs for $file \n"; +open(IN, $file) or die "No such file $file"; + +while ( $_ = <IN> ) { + if ( /^RVCT\((.*)\)/ ) { + $stub_template .= $1 . "\n"; + } + if ( /^DEFINE_STUB_FUNCTION\((.*), (.*)\)/ ) { + $stub = $stub_template; + $rtype = quotemeta($1); + $op = quotemeta($2); + $stub =~ s/$rtype_template/$rtype/g; + $stub =~ s/$op_template/$op/g; + $stub =~ s/\\\*/\*/g; + print $stub; + } +} + +close(IN); |