lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [01/27] Remove bundled Clownfish.
Date Sat, 12 Apr 2014 06:49:36 GMT
Repository: lucy
Updated Branches:
  refs/heads/master 746f4c075 -> 6fab33e7e


http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/binding/801-pod_checker.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/binding/801-pod_checker.t b/clownfish/runtime/perl/t/binding/801-pod_checker.t
deleted file mode 100644
index 2769e77..0000000
--- a/clownfish/runtime/perl/t/binding/801-pod_checker.t
+++ /dev/null
@@ -1,54 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Test::More;
-use Pod::Checker;
-BEGIN {
-    if ( $] < 5.010 ) {
-        plan( 'skip_all', "Old Pod::Checker is buggy" );
-    }
-    else {
-        plan('no_plan');
-    }
-}
-
-use File::Find qw( find );
-
-my @filepaths;
-find(
-    {   no_chdir => 1,
-        wanted   => sub {
-            return unless $File::Find::name =~ /\.(pm|pod)$/;
-            push @filepaths, $File::Find::name;
-            }
-    },
-    'lib'
-);
-
-for my $path (@filepaths) {
-    my $pod_ok = podchecker( $path, undef, -warnings => 0 );
-    if ( $pod_ok == -1 ) {
-        # No POD.
-    }
-    elsif ( $pod_ok == 0 ) {
-        pass("POD ok for '$path'");
-    }
-    else {
-        fail("Bad POD for '$path'");
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/016-varray.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/016-varray.t b/clownfish/runtime/perl/t/core/016-varray.t
deleted file mode 100644
index 5ddb5c1..0000000
--- a/clownfish/runtime/perl/t/core/016-varray.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestVArray");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/017-hash.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/017-hash.t b/clownfish/runtime/perl/t/core/017-hash.t
deleted file mode 100644
index f8583c8..0000000
--- a/clownfish/runtime/perl/t/core/017-hash.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestHash");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/019-obj.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/019-obj.t b/clownfish/runtime/perl/t/core/019-obj.t
deleted file mode 100644
index ea51ecf..0000000
--- a/clownfish/runtime/perl/t/core/019-obj.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestObj");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/020-err.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/020-err.t b/clownfish/runtime/perl/t/core/020-err.t
deleted file mode 100644
index 0679130..0000000
--- a/clownfish/runtime/perl/t/core/020-err.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestErr");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/022-bytebuf.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/022-bytebuf.t b/clownfish/runtime/perl/t/core/022-bytebuf.t
deleted file mode 100644
index 5dd7437..0000000
--- a/clownfish/runtime/perl/t/core/022-bytebuf.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestByteBuf");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/023-string.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/023-string.t b/clownfish/runtime/perl/t/core/023-string.t
deleted file mode 100644
index d2836ff..0000000
--- a/clownfish/runtime/perl/t/core/023-string.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestString");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/029-charbuf.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/029-charbuf.t b/clownfish/runtime/perl/t/core/029-charbuf.t
deleted file mode 100644
index 39041fb..0000000
--- a/clownfish/runtime/perl/t/core/029-charbuf.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestCharBuf");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/030-number_utils.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/030-number_utils.t b/clownfish/runtime/perl/t/core/030-number_utils.t
deleted file mode 100644
index 1035f96..0000000
--- a/clownfish/runtime/perl/t/core/030-number_utils.t
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests(
-    "Clownfish::Test::Util::TestNumberUtils"
-);
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/031-num.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/031-num.t b/clownfish/runtime/perl/t/core/031-num.t
deleted file mode 100644
index e784ae6..0000000
--- a/clownfish/runtime/perl/t/core/031-num.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::TestNum");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/032-string_helper.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/032-string_helper.t b/clownfish/runtime/perl/t/core/032-string_helper.t
deleted file mode 100644
index ffa4fbe..0000000
--- a/clownfish/runtime/perl/t/core/032-string_helper.t
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests(
-    "Clownfish::Test::Util::TestStringHelper"
-);
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/037-atomic.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/037-atomic.t b/clownfish/runtime/perl/t/core/037-atomic.t
deleted file mode 100644
index 1ed26e9..0000000
--- a/clownfish/runtime/perl/t/core/037-atomic.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::Util::TestAtomic");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/038-lock_free_registry.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/038-lock_free_registry.t b/clownfish/runtime/perl/t/core/038-lock_free_registry.t
deleted file mode 100644
index f6484c6..0000000
--- a/clownfish/runtime/perl/t/core/038-lock_free_registry.t
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests(
-    "Clownfish::Test::TestLockFreeRegistry"
-);
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/t/core/039-memory.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/t/core/039-memory.t b/clownfish/runtime/perl/t/core/039-memory.t
deleted file mode 100644
index 16c1c68..0000000
--- a/clownfish/runtime/perl/t/core/039-memory.t
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-use strict;
-use warnings;
-
-use Clownfish::Test;
-my $success = Clownfish::Test::run_tests("Clownfish::Test::Util::TestMemory");
-
-exit($success ? 0 : 1);
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.c b/clownfish/runtime/perl/xs/XSBind.c
deleted file mode 100644
index 4c7a275..0000000
--- a/clownfish/runtime/perl/xs/XSBind.c
+++ /dev/null
@@ -1,928 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define C_CFISH_OBJ
-#define C_CFISH_VTABLE
-#define C_CFISH_LOCKFREEREGISTRY
-#define NEED_newRV_noinc
-#include "charmony.h"
-#include "XSBind.h"
-#include "Clownfish/LockFreeRegistry.h"
-#include "Clownfish/Util/StringHelper.h"
-#include "Clownfish/Util/NumberUtils.h"
-#include "Clownfish/Util/Memory.h"
-
-#define XSBIND_REFCOUNT_FLAG   1
-#define XSBIND_REFCOUNT_SHIFT  1
-
-// Convert a Perl hash into a Clownfish Hash.  Caller takes responsibility for
-// a refcount.
-static cfish_Hash*
-S_perl_hash_to_cfish_hash(HV *phash);
-
-// Convert a Perl array into a Clownfish VArray.  Caller takes responsibility
-// for a refcount.
-static cfish_VArray*
-S_perl_array_to_cfish_array(AV *parray);
-
-// Convert a VArray to a Perl array.  Caller takes responsibility for a
-// refcount.
-static SV*
-S_cfish_array_to_perl_array(cfish_VArray *varray);
-
-// Convert a Hash to a Perl hash.  Caller takes responsibility for a refcount.
-static SV*
-S_cfish_hash_to_perl_hash(cfish_Hash *hash);
-
-cfish_Obj*
-XSBind_new_blank_obj(SV *either_sv) {
-    cfish_VTable *vtable;
-
-    // Get a VTable.
-    if (sv_isobject(either_sv)
-        && sv_derived_from(either_sv, "Clownfish::Obj")
-       ) {
-        // Use the supplied object's VTable.
-        IV iv_ptr = SvIV(SvRV(either_sv));
-        cfish_Obj *self = INT2PTR(cfish_Obj*, iv_ptr);
-        vtable = self->vtable;
-    }
-    else {
-        // Use the supplied class name string to find a VTable.
-        STRLEN len;
-        char *ptr = SvPVutf8(either_sv, len);
-        cfish_StackString *klass = CFISH_SSTR_WRAP_UTF8(ptr, len);
-        vtable = cfish_VTable_singleton((cfish_String*)klass, NULL);
-    }
-
-    // Use the VTable to allocate a new blank object of the right size.
-    return CFISH_VTable_Make_Obj(vtable);
-}
-
-cfish_Obj*
-XSBind_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
-    cfish_Obj *retval = XSBind_maybe_sv_to_cfish_obj(sv, vtable, allocation);
-    if (!retval) {
-        THROW(CFISH_ERR, "Not a %o", CFISH_VTable_Get_Name(vtable));
-    }
-    return retval;
-}
-
-cfish_Obj*
-XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation) {
-    cfish_Obj *retval = NULL;
-    if (XSBind_sv_defined(sv)) {
-        // Assume that the class name is always NULL-terminated. Somewhat
-        // dangerous but should be safe.
-        if (sv_isobject(sv)
-            && sv_derived_from(sv, CFISH_Str_Get_Ptr8(CFISH_VTable_Get_Name(vtable)))
-           ) {
-            // Unwrap a real Clownfish object.
-            IV tmp = SvIV(SvRV(sv));
-            retval = INT2PTR(cfish_Obj*, tmp);
-        }
-        else if (allocation &&
-                 (vtable == CFISH_STACKSTRING
-                  || vtable == CFISH_STRING
-                  || vtable == CFISH_OBJ)
-                ) {
-            // Wrap the string from an ordinary Perl scalar inside a
-            // StackString.
-            STRLEN size;
-            char *ptr = SvPVutf8(sv, size);
-            retval = (cfish_Obj*)cfish_SStr_wrap_str(allocation, ptr, size);
-        }
-        else if (SvROK(sv)) {
-            // Attempt to convert Perl hashes and arrays into their Clownfish
-            // analogues.
-            SV *inner = SvRV(sv);
-            if (SvTYPE(inner) == SVt_PVAV && vtable == CFISH_VARRAY) {
-                retval = (cfish_Obj*)S_perl_array_to_cfish_array((AV*)inner);
-            }
-            else if (SvTYPE(inner) == SVt_PVHV && vtable == CFISH_HASH) {
-                retval = (cfish_Obj*)S_perl_hash_to_cfish_hash((HV*)inner);
-            }
-
-            if (retval) {
-                // Mortalize the converted object -- which is somewhat
-                // dangerous, but is the only way to avoid requiring that the
-                // caller take responsibility for a refcount.
-                SV *mortal = (SV*)CFISH_Obj_To_Host(retval);
-                CFISH_DECREF(retval);
-                sv_2mortal(mortal);
-            }
-        }
-    }
-
-    return retval;
-}
-
-SV*
-XSBind_cfish_to_perl(cfish_Obj *obj) {
-    if (obj == NULL) {
-        return newSV(0);
-    }
-    else if (CFISH_Obj_Is_A(obj, CFISH_STRING)) {
-        return XSBind_str_to_sv((cfish_String*)obj);
-    }
-    else if (CFISH_Obj_Is_A(obj, CFISH_BYTEBUF)) {
-        return XSBind_bb_to_sv((cfish_ByteBuf*)obj);
-    }
-    else if (CFISH_Obj_Is_A(obj, CFISH_VARRAY)) {
-        return S_cfish_array_to_perl_array((cfish_VArray*)obj);
-    }
-    else if (CFISH_Obj_Is_A(obj, CFISH_HASH)) {
-        return S_cfish_hash_to_perl_hash((cfish_Hash*)obj);
-    }
-    else if (CFISH_Obj_Is_A(obj, CFISH_FLOATNUM)) {
-        return newSVnv(CFISH_Obj_To_F64(obj));
-    }
-    else if (obj == (cfish_Obj*)CFISH_TRUE) {
-        return newSViv(1);
-    }
-    else if (obj == (cfish_Obj*)CFISH_FALSE) {
-        return newSViv(0);
-    }
-    else if (sizeof(IV) == 8 && CFISH_Obj_Is_A(obj, CFISH_INTNUM)) {
-        int64_t num = CFISH_Obj_To_I64(obj);
-        return newSViv((IV)num);
-    }
-    else if (sizeof(IV) == 4 && CFISH_Obj_Is_A(obj, CFISH_INTEGER32)) {
-        int32_t num = (int32_t)CFISH_Obj_To_I64(obj);
-        return newSViv((IV)num);
-    }
-    else if (sizeof(IV) == 4 && CFISH_Obj_Is_A(obj, CFISH_INTEGER64)) {
-        int64_t num = CFISH_Obj_To_I64(obj);
-        return newSVnv((double)num); // lossy
-    }
-    else {
-        return (SV*)CFISH_Obj_To_Host(obj);
-    }
-}
-
-cfish_Obj*
-XSBind_perl_to_cfish(SV *sv) {
-    cfish_Obj *retval = NULL;
-
-    if (XSBind_sv_defined(sv)) {
-        if (SvROK(sv)) {
-            // Deep conversion of references.
-            SV *inner = SvRV(sv);
-            if (SvTYPE(inner) == SVt_PVAV) {
-                retval = (cfish_Obj*)S_perl_array_to_cfish_array((AV*)inner);
-            }
-            else if (SvTYPE(inner) == SVt_PVHV) {
-                retval = (cfish_Obj*)S_perl_hash_to_cfish_hash((HV*)inner);
-            }
-            else if (sv_isobject(sv)
-                     && sv_derived_from(sv, "Clownfish::Obj")
-                    ) {
-                IV tmp = SvIV(inner);
-                retval = INT2PTR(cfish_Obj*, tmp);
-                (void)CFISH_INCREF(retval);
-            }
-        }
-
-        // It's either a plain scalar or a non-Clownfish Perl object, so
-        // stringify.
-        if (!retval) {
-            STRLEN len;
-            char *ptr = SvPVutf8(sv, len);
-            retval = (cfish_Obj*)cfish_Str_new_from_trusted_utf8(ptr, len);
-        }
-    }
-    else if (sv) {
-        // Deep conversion of raw AVs and HVs.
-        if (SvTYPE(sv) == SVt_PVAV) {
-            retval = (cfish_Obj*)S_perl_array_to_cfish_array((AV*)sv);
-        }
-        else if (SvTYPE(sv) == SVt_PVHV) {
-            retval = (cfish_Obj*)S_perl_hash_to_cfish_hash((HV*)sv);
-        }
-    }
-
-    return retval;
-}
-
-SV*
-XSBind_bb_to_sv(cfish_ByteBuf *bb) {
-    return bb
-           ? newSVpvn(CFISH_BB_Get_Buf(bb), CFISH_BB_Get_Size(bb))
-           : newSV(0);
-}
-
-SV*
-XSBind_str_to_sv(cfish_String *str) {
-    if (!str) {
-        return newSV(0);
-    }
-    else {
-        SV *sv = newSVpvn(CFISH_Str_Get_Ptr8(str), CFISH_Str_Get_Size(str));
-        SvUTF8_on(sv);
-        return sv;
-    }
-}
-
-static cfish_Hash*
-S_perl_hash_to_cfish_hash(HV *phash) {
-    uint32_t    num_keys = hv_iterinit(phash);
-    cfish_Hash *retval   = cfish_Hash_new(num_keys);
-
-    while (num_keys--) {
-        HE        *entry    = hv_iternext(phash);
-        STRLEN     key_len  = HeKLEN(entry);
-        SV        *value_sv = HeVAL(entry);
-        cfish_Obj *value    = XSBind_perl_to_cfish(value_sv); // Recurse.
-
-        // Force key to UTF-8 if necessary.
-        if (key_len == (STRLEN)HEf_SVKEY) {
-            // Key is stored as an SV.  Use its UTF-8 flag?  Not sure about
-            // this.
-            SV   *key_sv  = HeKEY_sv(entry);
-            char *key_str = SvPVutf8(key_sv, key_len);
-            CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
-        }
-        else if (HeKUTF8(entry)) {
-            CFISH_Hash_Store_Utf8(retval, HeKEY(entry), key_len, value);
-        }
-        else {
-            char *key_str = HeKEY(entry);
-            bool pure_ascii = true;
-            for (STRLEN i = 0; i < key_len; i++) {
-                if ((key_str[i] & 0x80) == 0x80) { pure_ascii = false; }
-            }
-            if (pure_ascii) {
-                CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
-            }
-            else {
-                SV *key_sv = HeSVKEY_force(entry);
-                key_str = SvPVutf8(key_sv, key_len);
-                CFISH_Hash_Store_Utf8(retval, key_str, key_len, value);
-            }
-        }
-    }
-
-    return retval;
-}
-
-static cfish_VArray*
-S_perl_array_to_cfish_array(AV *parray) {
-    const uint32_t  size   = av_len(parray) + 1;
-    cfish_VArray   *retval = cfish_VA_new(size);
-
-    // Iterate over array elems.
-    for (uint32_t i = 0; i < size; i++) {
-        SV **elem_sv = av_fetch(parray, i, false);
-        if (elem_sv) {
-            cfish_Obj *elem = XSBind_perl_to_cfish(*elem_sv);
-            if (elem) { CFISH_VA_Store(retval, i, elem); }
-        }
-    }
-    CFISH_VA_Resize(retval, size); // needed if last elem is NULL
-
-    return retval;
-}
-
-static SV*
-S_cfish_array_to_perl_array(cfish_VArray *varray) {
-    AV *perl_array = newAV();
-    uint32_t num_elems = CFISH_VA_Get_Size(varray);
-
-    // Iterate over array elems.
-    if (num_elems) {
-        av_fill(perl_array, num_elems - 1);
-        for (uint32_t i = 0; i < num_elems; i++) {
-            cfish_Obj *val = CFISH_VA_Fetch(varray, i);
-            if (val == NULL) {
-                continue;
-            }
-            else {
-                // Recurse for each value.
-                SV *const val_sv = XSBind_cfish_to_perl(val);
-                av_store(perl_array, i, val_sv);
-            }
-        }
-    }
-
-    return newRV_noinc((SV*)perl_array);
-}
-
-static SV*
-S_cfish_hash_to_perl_hash(cfish_Hash *hash) {
-    HV *perl_hash = newHV();
-    SV *key_sv    = newSV(1);
-    cfish_String *key;
-    cfish_Obj     *val;
-
-    // Prepare the SV key.
-    SvPOK_on(key_sv);
-    SvUTF8_on(key_sv);
-
-    // Iterate over key-value pairs.
-    CFISH_Hash_Iterate(hash);
-    while (CFISH_Hash_Next(hash, (cfish_Obj**)&key, &val)) {
-        // Recurse for each value.
-        SV *val_sv = XSBind_cfish_to_perl(val);
-        if (!CFISH_Obj_Is_A((cfish_Obj*)key, CFISH_STRING)) {
-            CFISH_THROW(CFISH_ERR,
-                        "Can't convert a key of class %o to a Perl hash key",
-                        CFISH_Obj_Get_Class_Name((cfish_Obj*)key));
-        }
-        else {
-            STRLEN key_size = CFISH_Str_Get_Size(key);
-            char *key_sv_ptr = SvGROW(key_sv, key_size + 1);
-            memcpy(key_sv_ptr, CFISH_Str_Get_Ptr8(key), key_size);
-            SvCUR_set(key_sv, key_size);
-            *SvEND(key_sv) = '\0';
-            (void)hv_store_ent(perl_hash, key_sv, val_sv, 0);
-        }
-    }
-    SvREFCNT_dec(key_sv);
-
-    return newRV_noinc((SV*)perl_hash);
-}
-
-struct trap_context {
-    SV *routine;
-    SV *context;
-};
-
-static void
-S_attempt_perl_call(void *context) {
-    struct trap_context *args = (struct trap_context*)context;
-    dSP;
-    ENTER;
-    SAVETMPS;
-    PUSHMARK(SP);
-    XPUSHs(sv_2mortal(newSVsv(args->context)));
-    PUTBACK;
-    call_sv(args->routine, G_DISCARD);
-    FREETMPS;
-    LEAVE;
-}
-
-cfish_Err*
-XSBind_trap(SV *routine, SV *context) {
-    struct trap_context args;
-    args.routine = routine;
-    args.context = context;
-    return cfish_Err_trap(S_attempt_perl_call, &args);
-}
-
-void
-XSBind_enable_overload(void *pobj) {
-    SV *perl_obj = (SV*)pobj;
-    HV *stash = SvSTASH(SvRV(perl_obj));
-#if (PERL_VERSION > 10)
-    Gv_AMupdate(stash, false);
-#else
-    Gv_AMupdate(stash);
-#endif
-    SvAMAGIC_on(perl_obj);
-}
-
-static bool
-S_extract_from_sv(SV *value, void *target, const char *label,
-                  bool required, int type, cfish_VTable *vtable,
-                  void *allocation) {
-    bool valid_assignment = false;
-
-    if (XSBind_sv_defined(value)) {
-        switch (type) {
-            case XSBIND_WANT_I8:
-                *((int8_t*)target) = (int8_t)SvIV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_I16:
-                *((int16_t*)target) = (int16_t)SvIV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_I32:
-                *((int32_t*)target) = (int32_t)SvIV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_I64:
-                if (sizeof(IV) == 8) {
-                    *((int64_t*)target) = (int64_t)SvIV(value);
-                }
-                else { // sizeof(IV) == 4
-                    // lossy.
-                    *((int64_t*)target) = (int64_t)SvNV(value);
-                }
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_U8:
-                *((uint8_t*)target) = (uint8_t)SvUV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_U16:
-                *((uint16_t*)target) = (uint16_t)SvUV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_U32:
-                *((uint32_t*)target) = (uint32_t)SvUV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_U64:
-                if (sizeof(UV) == 8) {
-                    *((uint64_t*)target) = (uint64_t)SvUV(value);
-                }
-                else { // sizeof(UV) == 4
-                    // lossy.
-                    *((uint64_t*)target) = (uint64_t)SvNV(value);
-                }
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_BOOL:
-                *((bool*)target) = !!SvTRUE(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_F32:
-                *((float*)target) = (float)SvNV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_F64:
-                *((double*)target) = SvNV(value);
-                valid_assignment = true;
-                break;
-            case XSBIND_WANT_OBJ: {
-                    cfish_Obj *object
-                        = XSBind_maybe_sv_to_cfish_obj(value, vtable,
-                                                       allocation);
-                    if (object) {
-                        *((cfish_Obj**)target) = object;
-                        valid_assignment = true;
-                    }
-                    else {
-                        cfish_String *mess
-                            = CFISH_MAKE_MESS(
-                                  "Invalid value for '%s' - not a %o",
-                                  label, CFISH_VTable_Get_Name(vtable));
-                        cfish_Err_set_error(cfish_Err_new(mess));
-                        return false;
-                    }
-                }
-                break;
-            case XSBIND_WANT_SV:
-                *((SV**)target) = value;
-                valid_assignment = true;
-                break;
-            default: {
-                    cfish_String *mess
-                        = CFISH_MAKE_MESS("Unrecognized type: %i32 for param '%s'",
-                                          (int32_t)type, label);
-                    cfish_Err_set_error(cfish_Err_new(mess));
-                    return false;
-                }
-        }
-    }
-
-    // Enforce that required params cannot be undef and must present valid
-    // values.
-    if (required && !valid_assignment) {
-        cfish_String *mess = CFISH_MAKE_MESS("Missing required param %s",
-                                             label);
-        cfish_Err_set_error(cfish_Err_new(mess));
-        return false;
-    }
-
-    return true;
-}
-
-bool
-XSBind_allot_params(SV** stack, int32_t start, int32_t num_stack_elems, ...) {
-    va_list args;
-    size_t size = sizeof(int64_t) + num_stack_elems / 64;
-    void *verified_labels = alloca(size);
-    memset(verified_labels, 0, size);
-
-    // Verify that our args come in pairs. Return success if there are no
-    // args.
-    if ((num_stack_elems - start) % 2 != 0) {
-        cfish_String *mess
-            = CFISH_MAKE_MESS(
-                  "Expecting hash-style params, got odd number of args");
-        cfish_Err_set_error(cfish_Err_new(mess));
-        return false;
-    }
-
-    void *target;
-    va_start(args, num_stack_elems);
-    while (NULL != (target = va_arg(args, void*))) {
-        char *label     = va_arg(args, char*);
-        int   label_len = va_arg(args, int);
-        int   required  = va_arg(args, int);
-        int   type      = va_arg(args, int);
-        cfish_VTable *vtable = va_arg(args, cfish_VTable*);
-        void *allocation = va_arg(args, void*);
-
-        // Iterate through the stack looking for labels which match this param
-        // name.  If the label appears more than once, keep track of where it
-        // appears *last*, as the last time a param appears overrides all
-        // previous appearances.
-        int32_t found_arg = -1;
-        for (int32_t tick = start; tick < num_stack_elems; tick += 2) {
-            SV *const key_sv = stack[tick];
-            if (SvCUR(key_sv) == (STRLEN)label_len) {
-                if (memcmp(SvPVX(key_sv), label, label_len) == 0) {
-                    found_arg = tick;
-                    cfish_NumUtil_u1set(verified_labels, tick);
-                }
-            }
-        }
-
-        if (found_arg == -1) {
-            // Didn't find this parameter. Throw an error if it was required.
-            if (required) {
-                cfish_String *mess
-                    = CFISH_MAKE_MESS("Missing required parameter: '%s'",
-                                      label);
-                cfish_Err_set_error(cfish_Err_new(mess));
-                return false;
-            }
-        }
-        else {
-            // Found the arg.  Extract the value.
-            SV *value = stack[found_arg + 1];
-            bool got_arg = S_extract_from_sv(value, target, label,
-                                                   required, type, vtable,
-                                                   allocation);
-            if (!got_arg) {
-                CFISH_ERR_ADD_FRAME(cfish_Err_get_error());
-                return false;
-            }
-        }
-    }
-    va_end(args);
-
-    // Ensure that all parameter labels were valid.
-    for (int32_t tick = start; tick < num_stack_elems; tick += 2) {
-        if (!cfish_NumUtil_u1get(verified_labels, tick)) {
-            SV *const key_sv = stack[tick];
-            char *key = SvPV_nolen(key_sv);
-            cfish_String *mess
-                = CFISH_MAKE_MESS("Invalid parameter: '%s'", key);
-            cfish_Err_set_error(cfish_Err_new(mess));
-            return false;
-        }
-    }
-
-    return true;
-}
-
-/***************************************************************************
- * The routines below are declared within the Clownfish core but left
- * unimplemented and must be defined for each host language.
- ***************************************************************************/
-
-/**************************** Clownfish::Obj *******************************/
-
-static void
-S_lazy_init_host_obj(cfish_Obj *self) {
-    SV *inner_obj = newSV(0);
-    SvOBJECT_on(inner_obj);
-#if (PERL_VERSION <= 16)
-    PL_sv_objcount++;
-#endif
-    (void)SvUPGRADE(inner_obj, SVt_PVMG);
-    sv_setiv(inner_obj, PTR2IV(self));
-
-    // Connect class association.
-    cfish_String *class_name = CFISH_VTable_Get_Name(self->vtable);
-    HV *stash = gv_stashpvn(CFISH_Str_Get_Ptr8(class_name),
-                            CFISH_Str_Get_Size(class_name), TRUE);
-    SvSTASH_set(inner_obj, (HV*)SvREFCNT_inc(stash));
-
-    /* Up till now we've been keeping track of the refcount in
-     * self->ref.count.  We're replacing ref.count with ref.host_obj, which
-     * will assume responsibility for maintaining the refcount.  ref.host_obj
-     * starts off with a refcount of 1, so we need to transfer any refcounts
-     * in excess of that. */
-    size_t old_refcount = self->ref.count;
-    self->ref.host_obj = inner_obj;
-    SvREFCNT(inner_obj) += (old_refcount >> XSBIND_REFCOUNT_SHIFT) - 1;
-}
-
-uint32_t
-CFISH_Obj_Get_RefCount_IMP(cfish_Obj *self) {
-    return self->ref.count & XSBIND_REFCOUNT_FLAG
-           ? self->ref.count >> XSBIND_REFCOUNT_SHIFT
-           : SvREFCNT((SV*)self->ref.host_obj);
-}
-
-cfish_Obj*
-CFISH_Obj_Inc_RefCount_IMP(cfish_Obj *self) {
-    if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
-        if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
-            CFISH_THROW(CFISH_ERR, "Illegal refcount of 0");
-        }
-        self->ref.count += 1 << XSBIND_REFCOUNT_SHIFT;
-    }
-    else {
-        SvREFCNT_inc_simple_void_NN((SV*)self->ref.host_obj);
-    }
-    return self;
-}
-
-uint32_t
-CFISH_Obj_Dec_RefCount_IMP(cfish_Obj *self) {
-    uint32_t modified_refcount = I32_MAX;
-    if (self->ref.count & XSBIND_REFCOUNT_FLAG) {
-        if (self->ref.count == XSBIND_REFCOUNT_FLAG) {
-            CFISH_THROW(CFISH_ERR, "Illegal refcount of 0");
-        }
-        if (self->ref.count
-            == ((1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG)) {
-            modified_refcount = 0;
-            CFISH_Obj_Destroy(self);
-        }
-        else {
-            self->ref.count -= 1 << XSBIND_REFCOUNT_SHIFT;
-            modified_refcount = self->ref.count >> XSBIND_REFCOUNT_SHIFT;
-        }
-    }
-    else {
-        modified_refcount = SvREFCNT((SV*)self->ref.host_obj) - 1;
-        // If the SV's refcount falls to 0, DESTROY will be invoked from
-        // Perl-space.
-        SvREFCNT_dec((SV*)self->ref.host_obj);
-    }
-    return modified_refcount;
-}
-
-void*
-CFISH_Obj_To_Host_IMP(cfish_Obj *self) {
-    if (self->ref.count & XSBIND_REFCOUNT_FLAG) { S_lazy_init_host_obj(self); }
-    return newRV_inc((SV*)self->ref.host_obj);
-}
-
-/*************************** Clownfish::VTable ******************************/
-
-cfish_Obj*
-CFISH_VTable_Make_Obj_IMP(cfish_VTable *self) {
-    cfish_Obj *obj
-        = (cfish_Obj*)cfish_Memory_wrapped_calloc(self->obj_alloc_size, 1);
-    obj->vtable = self;
-    obj->ref.count = (1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG;
-    return obj;
-}
-
-cfish_Obj*
-CFISH_VTable_Init_Obj_IMP(cfish_VTable *self, void *allocation) {
-    cfish_Obj *obj = (cfish_Obj*)allocation;
-    obj->vtable = self;
-    obj->ref.count = (1 << XSBIND_REFCOUNT_SHIFT) | XSBIND_REFCOUNT_FLAG;
-    return obj;
-}
-
-cfish_Obj*
-CFISH_VTable_Foster_Obj_IMP(cfish_VTable *self, void *host_obj) {
-    cfish_Obj *obj
-        = (cfish_Obj*)cfish_Memory_wrapped_calloc(self->obj_alloc_size, 1);
-    SV *inner_obj = SvRV((SV*)host_obj);
-    obj->vtable = self;
-    sv_setiv(inner_obj, PTR2IV(obj));
-    obj->ref.host_obj = inner_obj;
-    return obj;
-}
-
-void
-cfish_VTable_register_with_host(cfish_VTable *singleton, cfish_VTable *parent) {
-    dSP;
-    ENTER;
-    SAVETMPS;
-    EXTEND(SP, 2);
-    PUSHMARK(SP);
-    mPUSHs((SV*)CFISH_VTable_To_Host(singleton));
-    mPUSHs((SV*)CFISH_VTable_To_Host(parent));
-    PUTBACK;
-    call_pv("Clownfish::VTable::_register", G_VOID | G_DISCARD);
-    FREETMPS;
-    LEAVE;
-}
-
-cfish_VArray*
-cfish_VTable_fresh_host_methods(cfish_String *class_name) {
-    dSP;
-    ENTER;
-    SAVETMPS;
-    EXTEND(SP, 1);
-    PUSHMARK(SP);
-    mPUSHs(XSBind_str_to_sv(class_name));
-    PUTBACK;
-    call_pv("Clownfish::VTable::_fresh_host_methods", G_SCALAR);
-    SPAGAIN;
-    cfish_VArray *methods = (cfish_VArray*)XSBind_perl_to_cfish(POPs);
-    PUTBACK;
-    FREETMPS;
-    LEAVE;
-    return methods;
-}
-
-cfish_String*
-cfish_VTable_find_parent_class(cfish_String *class_name) {
-    dSP;
-    ENTER;
-    SAVETMPS;
-    EXTEND(SP, 1);
-    PUSHMARK(SP);
-    mPUSHs(XSBind_str_to_sv(class_name));
-    PUTBACK;
-    call_pv("Clownfish::VTable::_find_parent_class", G_SCALAR);
-    SPAGAIN;
-    SV *parent_class_sv = POPs;
-    PUTBACK;
-    cfish_String *parent_class
-        = (cfish_String*)XSBind_perl_to_cfish(parent_class_sv);
-    FREETMPS;
-    LEAVE;
-    return parent_class;
-}
-
-void*
-CFISH_VTable_To_Host_IMP(cfish_VTable *self) {
-    bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
-    CFISH_VTable_To_Host_t to_host
-        = CFISH_SUPER_METHOD_PTR(CFISH_VTABLE, CFISH_VTable_To_Host);
-    SV *host_obj = (SV*)to_host(self);
-    if (first_time) {
-        SvSHARE((SV*)self->ref.host_obj);
-    }
-    return host_obj;
-}
-
-
-/***************************** Clownfish::Err *******************************/
-
-// Anonymous XSUB helper for Err#trap().  It wraps the supplied C function
-// so that it can be run inside a Perl eval block.
-static SV *attempt_xsub = NULL;
-
-XS(cfish_Err_attempt_via_xs) {
-    dXSARGS;
-    CHY_UNUSED_VAR(cv);
-    SP -= items;
-    if (items != 2) {
-        CFISH_THROW(CFISH_ERR, "Usage: $sub->(routine, context)");
-    };
-    IV routine_iv = SvIV(ST(0));
-    IV context_iv = SvIV(ST(1));
-    CFISH_Err_Attempt_t routine = INT2PTR(CFISH_Err_Attempt_t, routine_iv);
-    void *context               = INT2PTR(void*, context_iv);
-    routine(context);
-    XSRETURN(0);
-}
-
-void
-cfish_Err_init_class(void) {
-    char *file = (char*)__FILE__;
-    attempt_xsub = (SV*)newXS(NULL, cfish_Err_attempt_via_xs, file);
-}
-
-cfish_Err*
-cfish_Err_get_error() {
-    dSP;
-    ENTER;
-    SAVETMPS;
-    PUSHMARK(SP);
-    PUTBACK;
-    call_pv("Clownfish::Err::get_error", G_SCALAR);
-    SPAGAIN;
-    cfish_Err *error = (cfish_Err*)XSBind_perl_to_cfish(POPs);
-    PUTBACK;
-    FREETMPS;
-    LEAVE;
-    return error;
-}
-
-void
-cfish_Err_set_error(cfish_Err *error) {
-    dSP;
-    ENTER;
-    SAVETMPS;
-    EXTEND(SP, 2);
-    PUSHMARK(SP);
-    PUSHmortal;
-    if (error) {
-        mPUSHs((SV*)CFISH_Err_To_Host(error));
-    }
-    else {
-        PUSHmortal;
-    }
-    PUTBACK;
-    call_pv("Clownfish::Err::set_error", G_VOID | G_DISCARD);
-    FREETMPS;
-    LEAVE;
-}
-
-void
-cfish_Err_do_throw(cfish_Err *err) {
-    dSP;
-    SV *error_sv = (SV*)CFISH_Err_To_Host(err);
-    CFISH_DECREF(err);
-    ENTER;
-    SAVETMPS;
-    PUSHMARK(SP);
-    XPUSHs(sv_2mortal(error_sv));
-    PUTBACK;
-    call_pv("Clownfish::Err::do_throw", G_DISCARD);
-    FREETMPS;
-    LEAVE;
-}
-
-void*
-CFISH_Err_To_Host_IMP(cfish_Err *self) {
-    CFISH_Err_To_Host_t super_to_host
-        = CFISH_SUPER_METHOD_PTR(CFISH_ERR, CFISH_Err_To_Host);
-    SV *perl_obj = (SV*)super_to_host(self);
-    XSBind_enable_overload(perl_obj);
-    return perl_obj;
-}
-
-void
-cfish_Err_throw_mess(cfish_VTable *vtable, cfish_String *message) {
-    CHY_UNUSED_VAR(vtable);
-    cfish_Err *err = cfish_Err_new(message);
-    cfish_Err_do_throw(err);
-}
-
-void
-cfish_Err_warn_mess(cfish_String *message) {
-    SV *error_sv = XSBind_str_to_sv(message);
-    CFISH_DECREF(message);
-    warn("%s", SvPV_nolen(error_sv));
-    SvREFCNT_dec(error_sv);
-}
-
-cfish_Err*
-cfish_Err_trap(CFISH_Err_Attempt_t routine, void *context) {
-    cfish_Err *error = NULL;
-    SV *routine_sv = newSViv(PTR2IV(routine));
-    SV *context_sv = newSViv(PTR2IV(context));
-    dSP;
-    ENTER;
-    SAVETMPS;
-    PUSHMARK(SP);
-    EXTEND(SP, 2);
-    PUSHs(sv_2mortal(routine_sv));
-    PUSHs(sv_2mortal(context_sv));
-    PUTBACK;
-
-    int count = call_sv(attempt_xsub, G_EVAL | G_DISCARD);
-    if (count != 0) {
-        cfish_String *mess
-            = cfish_Str_newf("'attempt' returned too many values: %i32",
-                             (int32_t)count);
-        error = cfish_Err_new(mess);
-    }
-    else {
-        SV *dollar_at = get_sv("@", FALSE);
-        if (SvTRUE(dollar_at)) {
-            if (sv_isobject(dollar_at)
-                && sv_derived_from(dollar_at,"Clownfish::Err")
-               ) {
-                IV error_iv = SvIV(SvRV(dollar_at));
-                error = INT2PTR(cfish_Err*, error_iv);
-                CFISH_INCREF(error);
-            }
-            else {
-                STRLEN len;
-                char *ptr = SvPVutf8(dollar_at, len);
-                cfish_String *mess = cfish_Str_new_from_trusted_utf8(ptr, len);
-                error = cfish_Err_new(mess);
-            }
-        }
-    }
-    FREETMPS;
-    LEAVE;
-
-    return error;
-}
-
-/*********************** Clownfish::LockFreeRegistry ************************/
-
-void*
-CFISH_LFReg_To_Host_IMP(cfish_LockFreeRegistry *self) {
-    bool first_time = self->ref.count & XSBIND_REFCOUNT_FLAG ? true : false;
-    CFISH_LFReg_To_Host_t to_host
-        = CFISH_SUPER_METHOD_PTR(CFISH_LOCKFREEREGISTRY, CFISH_LFReg_To_Host);
-    SV *host_obj = (SV*)to_host(self);
-    if (first_time) {
-        SvSHARE((SV*)self->ref.host_obj);
-    }
-    return host_obj;
-}
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/perl/xs/XSBind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/xs/XSBind.h b/clownfish/runtime/perl/xs/XSBind.h
deleted file mode 100644
index e37058c..0000000
--- a/clownfish/runtime/perl/xs/XSBind.h
+++ /dev/null
@@ -1,352 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* XSBind.h -- Functions to help bind Clownfish to Perl XS api.
- */
-
-#ifndef H_CFISH_XSBIND
-#define H_CFISH_XSBIND 1
-
-#include "Clownfish/Obj.h"
-#include "Clownfish/ByteBuf.h"
-#include "Clownfish/String.h"
-#include "Clownfish/Err.h"
-#include "Clownfish/Hash.h"
-#include "Clownfish/Num.h"
-#include "Clownfish/VArray.h"
-#include "Clownfish/VTable.h"
-
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#define NEED_newRV_noinc_GLOBAL
-#include "ppport.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Given either a class name or a perl object, manufacture a new Clownfish
- * object suitable for supplying to a cfish_Foo_init() function.
- */
-CFISH_VISIBLE cfish_Obj*
-cfish_XSBind_new_blank_obj(SV *either_sv);
-
-/** Test whether an SV is defined.  Handles "get" magic, unlike SvOK on its
- * own.
- */
-static CFISH_INLINE bool
-cfish_XSBind_sv_defined(SV *sv) {
-    if (!sv || !SvANY(sv)) { return false; }
-    if (SvGMAGICAL(sv)) { mg_get(sv); }
-    return SvOK(sv);
-}
-
-/** If the SV contains a Clownfish object which passes an "isa" test against the
- * passed-in VTable, return a pointer to it.  If not, but
- * <code>allocation</code> is non-NULL and a StackString would satisfy the
- * "isa" test, stringify the SV, create a StackString using
- * <code>allocation</code>, assign the SV's string to it, and return that
- * instead.  If all else fails, throw an exception.
- */
-CFISH_VISIBLE cfish_Obj*
-cfish_XSBind_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable, void *allocation);
-
-/** As XSBind_sv_to_cfish_obj above, but returns NULL instead of throwing an
- * exception.
- */
-CFISH_VISIBLE cfish_Obj*
-cfish_XSBind_maybe_sv_to_cfish_obj(SV *sv, cfish_VTable *vtable,
-                                   void *allocation);
-
-
-/** Derive an SV from a Clownfish object.  If the Clownfish object is NULL, the SV
- * will be undef.
- *
- * The new SV has single refcount for which the caller must take
- * responsibility.
- */
-static CFISH_INLINE SV*
-cfish_XSBind_cfish_obj_to_sv(cfish_Obj *obj) {
-    return obj ? (SV*)CFISH_Obj_To_Host(obj) : newSV(0);
-}
-
-/** XSBind_cfish_obj_to_sv, with a cast.
- */
-#define CFISH_OBJ_TO_SV(_obj) cfish_XSBind_cfish_obj_to_sv((cfish_Obj*)_obj)
-
-/** As XSBind_cfish_obj_to_sv above, except decrements the object's refcount
- * after creating the SV. This is useful when the Clownfish expression creates a new
- * refcount, e.g.  a call to a constructor.
- */
-static CFISH_INLINE SV*
-cfish_XSBind_cfish_obj_to_sv_noinc(cfish_Obj *obj) {
-    SV *retval;
-    if (obj) {
-        retval = (SV*)CFISH_Obj_To_Host(obj);
-        CFISH_Obj_Dec_RefCount(obj);
-    }
-    else {
-        retval = newSV(0);
-    }
-    return retval;
-}
-
-/** XSBind_cfish_obj_to_sv_noinc, with a cast.
- */
-#define CFISH_OBJ_TO_SV_NOINC(_obj) \
-    cfish_XSBind_cfish_obj_to_sv_noinc((cfish_Obj*)_obj)
-
-/** Deep conversion of Clownfish objects to Perl objects -- Strings to UTF-8
- * SVs, ByteBufs to SVs, VArrays to Perl array refs, Hashes to Perl hashrefs,
- * and any other object to a Perl object wrapping the Clownfish Obj.
- */
-CFISH_VISIBLE SV*
-cfish_XSBind_cfish_to_perl(cfish_Obj *obj);
-
-/** Deep conversion of Perl data structures to Clownfish objects -- Perl hash
- * to Hash, Perl array to VArray, Clownfish objects stripped of their
- * wrappers, and everything else stringified and turned to a String.
- */
-CFISH_VISIBLE cfish_Obj*
-cfish_XSBind_perl_to_cfish(SV *sv);
-
-/** Convert a ByteBuf into a new string SV.
- */
-CFISH_VISIBLE SV*
-cfish_XSBind_bb_to_sv(cfish_ByteBuf *bb);
-
-/** Convert a String into a new UTF-8 string SV.
- */
-CFISH_VISIBLE SV*
-cfish_XSBind_str_to_sv(cfish_String *str);
-
-/** Perl-specific wrapper for Err#trap.  The "routine" must be either a
- * subroutine reference or the name of a subroutine.
- */
-cfish_Err*
-cfish_XSBind_trap(SV *routine, SV *context);
-
-/** Turn on overloading for the supplied Perl object and its class.
- */
-CFISH_VISIBLE void
-cfish_XSBind_enable_overload(void *pobj);
-
-/** Process hash-style params passed to an XS subroutine.  The varargs must be
- * a NULL-terminated series of ALLOT_ macros.
- *
- *     cfish_XSBind_allot_params(stack, start, num_stack_elems,
- *          ALLOT_OBJ(&field, "field", 5, CFISH_STRING, true, alloca(cfish_SStr_size()),
- *          ALLOT_OBJ(&term, "term", 4, CFISH_STRING, true, alloca(cfish_SStr_size()),
- *          NULL);
- *
- * The following ALLOT_ macros are available for primitive types:
- *
- *     ALLOT_I8(ptr, key, keylen, required)
- *     ALLOT_I16(ptr, key, keylen, required)
- *     ALLOT_I32(ptr, key, keylen, required)
- *     ALLOT_I64(ptr, key, keylen, required)
- *     ALLOT_U8(ptr, key, keylen, required)
- *     ALLOT_U16(ptr, key, keylen, required)
- *     ALLOT_U32(ptr, key, keylen, required)
- *     ALLOT_U64(ptr, key, keylen, required)
- *     ALLOT_BOOL(ptr, key, keylen, required)
- *     ALLOT_CHAR(ptr, key, keylen, required)
- *     ALLOT_SHORT(ptr, key, keylen, required)
- *     ALLOT_INT(ptr, key, keylen, required)
- *     ALLOT_LONG(ptr, key, keylen, required)
- *     ALLOT_SIZE_T(ptr, key, keylen, required)
- *     ALLOT_F32(ptr, key, keylen, required)
- *     ALLOT_F64(ptr, key, keylen, required)
- *
- * The four arguments to these ALLOT_ macros have the following meanings:
- *
- *     ptr -- A pointer to the variable to be extracted.
- *     key -- The name of the parameter as a C string.
- *     keylen -- The length of the parameter name in bytes.
- *     required -- A boolean indicating whether the parameter is required.
- *
- * If a required parameter is not present, allot_params() will set Err_error
- * and return false.
- *
- * Use the following macro if a Clownfish object is desired:
- *
- *     ALLOT_OBJ(ptr, key, keylen, required, vtable, allocation)
- *
- * The "vtable" argument must be the VTable corresponding to the class of the
- * desired object.  The "allocation" argument must be a blob of memory
- * allocated on the stack sufficient to hold a StackString.  (Use
- * cfish_SStr_size() to find the allocation size.)
- *
- * To extract a Perl scalar, use the following ALLOT_ macro:
- *
- *     ALLOT_SV(ptr, key, keylen, required)
- *
- * All possible valid param names must be passed via the ALLOT_ macros; if a
- * user-supplied param cannot be matched up with an ALLOT_ macro,
- * allot_params() will set Err_error and return false.
- *
- * @param stack The Perl stack.
- * @param start Where on the Perl stack to start looking for params.  For
- * methods, this would typically be 1; for functions, most likely 0.
- * @param num_stack_elems The number of arguments passed to the Perl function
- * (generally, the XS variable "items").
- * @return true on success, false on failure (sets Err_error).
- */
-CFISH_VISIBLE bool
-cfish_XSBind_allot_params(SV** stack, int32_t start,
-                          int32_t num_stack_elems, ...);
-
-#define XSBIND_WANT_I8       0x1
-#define XSBIND_WANT_I16      0x2
-#define XSBIND_WANT_I32      0x3
-#define XSBIND_WANT_I64      0x4
-#define XSBIND_WANT_U8       0x5
-#define XSBIND_WANT_U16      0x6
-#define XSBIND_WANT_U32      0x7
-#define XSBIND_WANT_U64      0x8
-#define XSBIND_WANT_BOOL     0x9
-#define XSBIND_WANT_F32      0xA
-#define XSBIND_WANT_F64      0xB
-#define XSBIND_WANT_OBJ      0xC
-#define XSBIND_WANT_SV       0xD
-
-#if (CFISH_SIZEOF_CHAR == 1)
-  #define XSBIND_WANT_CHAR XSBIND_WANT_I8
-#else
-  #error "Can't build unless sizeof(char) == 1"
-#endif
-
-#if (CFISH_SIZEOF_SHORT == 2)
-  #define XSBIND_WANT_SHORT XSBIND_WANT_I16
-#else
-  #error "Can't build unless sizeof(short) == 2"
-#endif
-
-#if (CFISH_SIZEOF_INT == 4)
-  #define XSBIND_WANT_INT XSBIND_WANT_I32
-#elif (CFISH_SIZEOF_INT == 8)
-  #define XSBIND_WANT_INT XSBIND_WANT_I64
-#else
-  #error "Can't build unless sizeof(int) == 4 or sizeof(int) == 8"
-#endif
-
-#if (CFISH_SIZEOF_LONG == 4)
-  #define XSBIND_WANT_LONG XSBIND_WANT_I32
-#elif (CFISH_SIZEOF_LONG == 8)
-  #define XSBIND_WANT_LONG XSBIND_WANT_I64
-#else
-  #error "Can't build unless sizeof(long) == 4 or sizeof(long) == 8"
-#endif
-
-#if (CFISH_SIZEOF_SIZE_T == 4)
-  #define XSBIND_WANT_SIZE_T XSBIND_WANT_U32
-#elif (CFISH_SIZEOF_SIZE_T == 8)
-  #define XSBIND_WANT_SIZE_T XSBIND_WANT_U64
-#else
-  #error "Can't build unless sizeof(size_t) == 4 or sizeof(size_t) == 8"
-#endif
-
-#define XSBIND_ALLOT_I8(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_I8, NULL, NULL
-#define XSBIND_ALLOT_I16(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_I16, NULL, NULL
-#define XSBIND_ALLOT_I32(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_I32, NULL, NULL
-#define XSBIND_ALLOT_I64(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_I64, NULL, NULL
-#define XSBIND_ALLOT_U8(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_U8, NULL, NULL
-#define XSBIND_ALLOT_U16(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_U16, NULL, NULL
-#define XSBIND_ALLOT_U32(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_U32, NULL, NULL
-#define XSBIND_ALLOT_U64(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_U64, NULL, NULL
-#define XSBIND_ALLOT_BOOL(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_BOOL, NULL, NULL
-#define XSBIND_ALLOT_CHAR(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_CHAR, NULL, NULL
-#define XSBIND_ALLOT_SHORT(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_SHORT, NULL, NULL
-#define XSBIND_ALLOT_INT(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_INT, NULL, NULL
-#define XSBIND_ALLOT_LONG(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_LONG, NULL, NULL
-#define XSBIND_ALLOT_SIZE_T(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_SIZE_T, NULL, NULL
-#define XSBIND_ALLOT_F32(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_F32, NULL, NULL
-#define XSBIND_ALLOT_F64(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_F64, NULL, NULL
-#define XSBIND_ALLOT_OBJ(ptr, key, keylen, required, vtable, allocation) \
-    ptr, key, keylen, required, XSBIND_WANT_OBJ, vtable, allocation
-#define XSBIND_ALLOT_SV(ptr, key, keylen, required) \
-    ptr, key, keylen, required, XSBIND_WANT_SV, NULL, NULL
-
-/* Define short names for most of the symbols in this file.  Note that these
- * short names are ALWAYS in effect, since they are only used for Perl and we
- * can be confident they don't conflict with anything.  (It's prudent to use
- * full symbols nevertheless in case someone else defines e.g. a function
- * named "XSBind_sv_defined".)
- */
-#define XSBind_new_blank_obj           cfish_XSBind_new_blank_obj
-#define XSBind_sv_defined              cfish_XSBind_sv_defined
-#define XSBind_sv_to_cfish_obj         cfish_XSBind_sv_to_cfish_obj
-#define XSBind_maybe_sv_to_cfish_obj   cfish_XSBind_maybe_sv_to_cfish_obj
-#define XSBind_cfish_obj_to_sv         cfish_XSBind_cfish_obj_to_sv
-#define XSBind_cfish_obj_to_sv_noinc   cfish_XSBind_cfish_obj_to_sv_noinc
-#define XSBind_cfish_to_perl           cfish_XSBind_cfish_to_perl
-#define XSBind_perl_to_cfish           cfish_XSBind_perl_to_cfish
-#define XSBind_bb_to_sv                cfish_XSBind_bb_to_sv
-#define XSBind_str_to_sv               cfish_XSBind_str_to_sv
-#define XSBind_trap                    cfish_XSBind_trap
-#define XSBind_enable_overload         cfish_XSBind_enable_overload
-#define XSBind_allot_params            cfish_XSBind_allot_params
-#define ALLOT_I8                       XSBIND_ALLOT_I8
-#define ALLOT_I16                      XSBIND_ALLOT_I16
-#define ALLOT_I32                      XSBIND_ALLOT_I32
-#define ALLOT_I64                      XSBIND_ALLOT_I64
-#define ALLOT_U8                       XSBIND_ALLOT_U8
-#define ALLOT_U16                      XSBIND_ALLOT_U16
-#define ALLOT_U32                      XSBIND_ALLOT_U32
-#define ALLOT_U64                      XSBIND_ALLOT_U64
-#define ALLOT_BOOL                     XSBIND_ALLOT_BOOL
-#define ALLOT_CHAR                     XSBIND_ALLOT_CHAR
-#define ALLOT_SHORT                    XSBIND_ALLOT_SHORT
-#define ALLOT_INT                      XSBIND_ALLOT_INT
-#define ALLOT_LONG                     XSBIND_ALLOT_LONG
-#define ALLOT_SIZE_T                   XSBIND_ALLOT_SIZE_T
-#define ALLOT_F32                      XSBIND_ALLOT_F32
-#define ALLOT_F64                      XSBIND_ALLOT_F64
-#define ALLOT_OBJ                      XSBIND_ALLOT_OBJ
-#define ALLOT_SV                       XSBIND_ALLOT_SV
-
-/* Strip the prefix from some common ClownFish symbols where we know there's
- * no conflict with Perl.  It's a little inconsistent to do this rather than
- * leave all symbols at full size, but the succinctness is worth it.
- */
-#define THROW            CFISH_THROW
-#define WARN             CFISH_WARN
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // H_CFISH_XSBIND
-
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/Rakefile
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/Rakefile b/clownfish/runtime/ruby/Rakefile
deleted file mode 100644
index f9a821a..0000000
--- a/clownfish/runtime/ruby/Rakefile
+++ /dev/null
@@ -1,148 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'rake/clean' 
-require 'rake/extensiontask'
-import '../../runtime/ruby/Rakefile.common'
-
-def exe_path(*args)
-  File.join(args).ext(RbConfig::CONFIG["EXEEXT"])
-end
-
-BASE_PATH            = '..'
-CFC_DIR              = File.join( BASE_PATH, '..', 'compiler', 'ruby' );
-CFC_BUILD            = File.join( CFC_DIR, 'Build' );
-COMMON_SOURCE_DIR    = File.join(BASE_PATH, "common")
-CHARMONIZER_C        = File.join(COMMON_SOURCE_DIR, 'charmonizer.c')
-CHARMONIZER_EXE_PATH = File.absolute_path(exe_path('charmonizer'))
-CHARMONIZER_ORIG_DIR = File.absolute_path( File.join( BASE_PATH, '..', '..', 'charmonizer' ) )
-CHARMONY_H_PATH      = 'charmony.h'
-CHARMONY_RB_PATH     = 'Charmony.rb'
-CORE_SOURCE_DIR      = File.absolute_path( BASE_PATH, 'core' );
-LIB_DIR              = 'lib';
-
-Rake::ExtensionTask.new do |ext|
-  ext.name = 'Bind' 
-  ext.ext_dir = './ext'
-  ext.lib_dir = './lib'
-  ext.tmp_dir = './tmp'
-  ext.source_pattern = "*.c"
-  ext.config_options << '-std=gnu99 -D_GNU_SOURCE -fvsibility=hidden'
-end
-
-desc "Build Clownfish"
-task :build_clownfish => [:build_charmonizer_tests] do
-  puts "Building Clownfish"
-  old_dir = Dir.pwd
-  chdir(CFC_DIR);
-  if ( File.exists?('Rakefile') ) 
-    puts "\nBuilding Clownfish compiler... "
-    if system("rake").nil?
-      abort "Couldn't build rake"
-    end
-    puts "\nFinished building Clownfish compiler.\n"
-  end
-  chdir(old_dir);
-  require_relative '../../compiler/ruby/ext/Clownfish/CFC'
-  hierarchy = Clownfish::CFC::Model::Hierarchy.new(:dest => "autogen")
-
-  hierarchy.add_source_dir('../core')
-  hierarchy.add_source_dir('ext')
-  hierarchy.add_source_dir('autogen/source')
-  hierarchy.build
-  
-  core_binding = Clownfish::CFC::Binding::Core.new(:hierarchy => hierarchy, :header => autogen_header, :footer => '')
-  modified = core_binding.write_all_modified
-
-  ruby_binding = Clownfish::CFC::Binding::Ruby.new(
-    :parcel     => "Clownfish",
-    :hierarchy  => hierarchy,
-    :lib_dir    => LIB_DIR,
-    :boot_class => "Clownfish",
-    :header     => autogen_header,
-    :footer     => ''
-  )
-
-  if (modified)
-    puts "Building Binding Code"
-    ruby_binding.write_boot
-    ruby_binding.write_hostdefs
-  end
-  Rake::Task['compile'].invoke
-
-end
-
-desc "Building Charmonizer Tests"
-task :build_charmonizer_tests => [:charmony] do
-  puts "Building Charmonizer Tests"
-  flags = [
-    '-fno-common',
-    '-DFCRUBY',
-    '-fno-strict-aliasing',
-    '-pipe',
-    '-fstack-protector',
-    '-std=gnu99',
-    '-D_GNU_SOURCE',
-    '-I' + Dir.pwd
-  ].join(" ").gsub(/"/,'\"')
-
-  run_make( CHARMONIZER_ORIG_DIR, [ "DEFS=#{flags}", "tests"])
-end
-
-desc "Build and run charmonizer, creating charmony.h and charmony.rb"
-task :charmony do
-  # Compile charmonizer executable.
-  if !uptodate? CHARMONIZER_EXE_PATH, [CHARMONIZER_C]
-    outflag = cc_command.match(/cl\b/) ? "/Fe" : "-o "
-    command = "#{cc_command} #{outflag}#{CHARMONIZER_EXE_PATH} #{CHARMONIZER_C}"
-    puts command
-    if !system(command)
-      raise "Failed to compile #{CHARMONIZER_EXE_PATH}"
-    end
-  end
-
-  # Return if charmonizer output is current.
-  if uptodate? CHARMONY_RB_PATH, [CHARMONIZER_EXE_PATH]
-    next
-  end
-  puts "Running #{CHARMONIZER_EXE_PATH}...\n"
-
-  # Prepare arguments to charmonizer.
-  command = [
-    CHARMONIZER_EXE_PATH,
-    '--cc=' + quotify(cc_command),
-    '--enable-c',
-    '--enable-ruby',
-    '--',
-    all_ccflags,
-  ]
-  if (ENV['CHARM_VALGRIND'])
-    command.unshift("valgrind", "--leak-check=yes")
-  end
-
-  # Run charmonizer.
-  puts command.join(" ")
-  if !system(*command)
-    raise "Failed to run #{CHARMONIZER_EXE_PATH}: " + $?
-  end
-end
-
-CLEAN.include(CHARMONIZER_EXE_PATH)
-CLEAN.include(CHARMONY_H_PATH)
-CLEAN.include(CHARMONY_RB_PATH)
-# Clean up after charmonizer if it doesn't succeed on its own.
-CLEAN.include("_charm*")
-
-task :default => [:build_clownfish]

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/Rakefile.common
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/Rakefile.common b/clownfish/runtime/ruby/Rakefile.common
deleted file mode 100644
index 28051eb..0000000
--- a/clownfish/runtime/ruby/Rakefile.common
+++ /dev/null
@@ -1,140 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-require 'rbconfig'
-
-def rbconfig
-  RbConfig::CONFIG
-end
-
-def all_ccflags
-  ccflags = '-DCFCRUBY '
-  
-  if defined?(rbconfig["CFLAGS"])
-    ccflags += rbconfig['CFLAGS'] + ' '
-  end
-
-  if ENV.has_key?('CFLAGS')
-    ccflags += ENV['CFLAGS']
-  end
-  
-  if ENV.has_key?('LUCY_VALGRIND')
-    ccflags += "-fno-inline-functions "
-  end
-  
-  # Compile as C++ under MSVC.  Turn off stupid warnings, too.
-  if cc_command =~ /^cl\b/ 
-    ccflags += '/TP -D_CRT_SECURE_NO_WARNINGS '
-  end
-  
-  # Blindly include GCC-specific flags even though we don't know that the
-  # compiler is GCC.
-  if ccflags !~ /-std=/
-    ccflags += "-std=gnu99 "
-  end
-  if ccflags !~ /-D_GNU_SOURCE/ 
-    ccflags += "-D_GNU_SOURCE "
-  end
-  
-  return ccflags
-end
-
-def cc_command
-  rbconfig["CC"]
-end
-
-def extra_ccflags 
-  ccflags = '-DCFCRUBY '
-  
-  if defined?(rbconfig["CFLAGS"])
-    ccflags += rbconfig['CFLAGS'] + ' '
-  end
-  
-  if ENV.has_key?('CFLAGS')
-    ccflags += ENV['CFLAGS']
-  end
-  
-  if ENV.has_key?('LUCY_VALGRIND')
-    ccflags += "-fno-inline-functions "
-  end
-  
-  # Compile as C++ under MSVC.  Turn off stupid warnings, too.
-  if cc_command =~ /^cl\b/ 
-    ccflags += '/TP -D_CRT_SECURE_NO_WARNINGS '
-  end
-  
-  # Blindly include GCC-specific flags even though we don't know that the
-  # compiler is GCC.
-  if ccflags !~ /-std=/
-    ccflags += "-std=gnu99 "
-  end
-  if ccflags !~ /-D_GNU_SOURCE/ 
-    ccflags += "-D_GNU_SOURCE "
-  end
-  
-  return ccflags
-end
-
-def make_command
-  command = rbconfig["make-prog"]
-  if !command
-    if RUBY_PLATFORM =~ /mswin/i
-      if cc_command =~ /^cl\b/
-        command = "nmake"
-      end
-    end
-  end
-  if !command
-    command = 'make'
-  end
-  return command
-end
-
-def run_make(dir, params)
-  current_dir = Dir.pwd
-  chdir(dir) if dir
-  command = params.clone
-  command.unshift("CC=#{cc_command}")
-  if RUBY_PLATFORM =~ /(mswin|mingw)/i
-    if cc_command =~ /^cl\b/ 
-      command.unshift("-f", "Makefile.MSVC")
-    else
-      command.unshift("-f", "Makefile.MinGW")
-    end
-  end
-  command.unshift(make_command)
-  success = system(*command)
-  if !success
-    raise "Make failed"
-  end
-  chdir(current_dir) if dir
-end
-
-def quotify(string)
-  return '"' + string.gsub(/([\\\"])/,'\\\\\\1') + '"'
-end
-
-def autogen_header
-  "
-/***********************************************
-
- !!!! DO NOT EDIT !!!!
-
- This file was auto-generated by Rakefile.
-
- ***********************************************/
- "
-
-end

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/ext/Bind.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Bind.c b/clownfish/runtime/ruby/ext/Bind.c
deleted file mode 100644
index e44737b..0000000
--- a/clownfish/runtime/ruby/ext/Bind.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ruby.h"
-#include "Bind.h"
-#include "Clownfish/Util/StringHelper.h"
-#include "Clownfish/Util/NumberUtils.h"
-
-VALUE
-Bind_cfish_to_ruby(cfish_Obj *obj) {
-  if (CFISH_Obj_Is_A(obj, CFISH_STRING)) {
-      return Bind_str_to_ruby((cfish_String*)obj);
-  }
-  else if (CFISH_Obj_Is_A(obj, CFISH_VARRAY)) {
-      return S_cfish_array_to_ruby_array((cfish_VArray*)obj);
-  }
-}
-
-VALUE
-Bind_str_to_ruby(cfish_String *str) {
-    if (!str) {
-        return rb_str_new2("");
-    }
-    else {
-        return rb_str_new(CFISH_Str_Get_Ptr8(str), CFISH_Str_Get_Size(str));
-    }
-}
-
-static VALUE
-S_cfish_array_to_ruby_array(cfish_VArray *varray) {
-    uint32_t num_elems = CFISH_VA_Get_Size(varray);
-
-    VALUE ruby_array = rb_ary_new2(num_elems - 1);
-
-    if (num_elems) {
-        //TODO Need to determine why c99 mode is not being honored
-        uint32_t i;
-        for (uint32_t i = 0; i < num_elems; i++) {
-            cfish_Obj *val = CFISH_VA_Fetch(varray, i);
-            if (val == NULL) {
-                continue;
-            }
-            else {
-                // Recurse for each value.
-                VALUE const val_ruby = Bind_cfish_to_ruby(val);
-                rb_ary_store(ruby_array, i, val_ruby);
-            }
-        }
-    }
-    return ruby_array;
-}

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/ext/Bind.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Bind.h b/clownfish/runtime/ruby/ext/Bind.h
deleted file mode 100644
index 805afae..0000000
--- a/clownfish/runtime/ruby/ext/Bind.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* XSBind.h -- Functions to help bind Clownfish to Perl XS api.
- */
-
-#ifndef H_CFISH_XSBIND
-#define H_CFISH_XSBIND 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ruby.h"
-#include "Clownfish/Obj.h"
-#include "Clownfish/ByteBuf.h"
-#include "Clownfish/String.h"
-#include "Clownfish/Err.h"
-#include "Clownfish/Hash.h"
-#include "Clownfish/Num.h"
-#include "Clownfish/VArray.h"
-#include "Clownfish/VTable.h"
-
-VALUE Bind_cfish_to_ruby(cfish_Obj *obj);
-VALUE Bind_str_to_ruby(cfish_String *str);
-static VALUE S_cfish_array_to_ruby_array(cfish_VArray *varray);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // H_CFISH_XSBIND

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/ext/Clownfish.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Clownfish.c b/clownfish/runtime/ruby/ext/Clownfish.c
deleted file mode 100644
index 72a703b..0000000
--- a/clownfish/runtime/ruby/ext/Clownfish.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ruby.h"
-
-#include "Clownfish/Host.h"
-#include "Clownfish/Util/Memory.h"
-#include "Clownfish/Util/StringHelper.h"
-#include "Clownfish/String.h"
-#include "Clownfish/Test/TestCharBuf.h"
-#include "Clownfish/Test.h"
-
-static VALUE mClownfish;
-static VALUE cTest;
-
-static VALUE
-S_CFC_Test_Run_Tests(VALUE self_rb, VALUE package) {
-
-  /*if (strEQ(StringValuePtr(package), "TestCharBuf")) {
-    lucy_TestCB_run_tests();
-  }*/
-
-  return Qnil;
-}
-
-static void
-S_init_Test(void) {
-    cTest = rb_define_class_under(mClownfish, "Test", rb_cObject);
-//    rb_define_singleton_method(cTest, "run_tests", S_CFC_Hierarchy_Build, 0);
-}
-
-void
-Init_Clownfish() { 
-    mClownfish  = rb_define_module("Clownfish");
-    S_init_Test();
-}
-

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/ext/Clownfish.h
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/Clownfish.h b/clownfish/runtime/ruby/ext/Clownfish.h
deleted file mode 100644
index 67987ab..0000000
--- a/clownfish/runtime/ruby/ext/Clownfish.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "ruby.h"
-
-static VALUE S_CFC_Test_Run_Tests(VALUE self_rb, VALUE package);
-static void S_init_Test(void);
-void Init_Clownfish();

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/ext/extconf.rb
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/ext/extconf.rb b/clownfish/runtime/ruby/ext/extconf.rb
deleted file mode 100644
index ae52bb0..0000000
--- a/clownfish/runtime/ruby/ext/extconf.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require 'mkmf'
-require 'rbconfig'
-
-CORE    = File.join('..','..','..','..','..','..','runtime','core')
-RUBY    = File.join('..','..','..','..','..','..','runtime','ruby')
-AUTOGEN = File.join('..','..','..','..','..','..','runtime','ruby','autogen','include')
-$CFLAGS = "-I#{CORE} -I#{RUBY} -I#{AUTOGEN}"
-
-create_makefile 'Bind'

http://git-wip-us.apache.org/repos/asf/lucy/blob/1704c275/clownfish/runtime/ruby/tests/029-charbuf.t
----------------------------------------------------------------------
diff --git a/clownfish/runtime/ruby/tests/029-charbuf.t b/clownfish/runtime/ruby/tests/029-charbuf.t
deleted file mode 100644
index 605d9e4..0000000
--- a/clownfish/runtime/ruby/tests/029-charbuf.t
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-require Clownfish::Test
-Clownfish::Test::run_tests("TestCharBuf")


Mime
View raw message