Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 6391cd8e3 -> 946d25a6a


Don't call _IMP functions of final classes directly

The recent optimizations to final method calls make this unnecessary.
Only keep the _IMP calls in Class_bootstrap. In this case, it's crucial
to call the implementing functions directly and the code shouldn't rely
on the optimization.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/946d25a6
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/946d25a6
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/946d25a6

Branch: refs/heads/master
Commit: 946d25a6aebc7b7eaf4d6ec5e3e44746e24b02b9
Parents: 6391cd8
Author: Nick Wellnhofer <[email protected]>
Authored: Fri May 13 15:11:50 2016 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Fri May 13 15:26:59 2016 +0200

----------------------------------------------------------------------
 runtime/core/Clownfish/Hash.c                    |  4 ++--
 runtime/core/Clownfish/String.c                  | 10 +++++-----
 runtime/core/Clownfish/Vector.c                  |  6 +++---
 runtime/go/clownfish/clownfish.go                |  2 +-
 runtime/perl/buildlib/Clownfish/Build/Binding.pm |  6 +++---
 5 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/946d25a6/runtime/core/Clownfish/Hash.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Hash.c b/runtime/core/Clownfish/Hash.c
index 174cc11..d481e45 100644
--- a/runtime/core/Clownfish/Hash.c
+++ b/runtime/core/Clownfish/Hash.c
@@ -169,7 +169,7 @@ Hash_Store_Utf8_IMP(Hash *self, const char *key, size_t 
key_len, Obj *value) {
 Obj*
 Hash_Fetch_Utf8_IMP(Hash *self, const char *key, size_t key_len) {
     String *key_buf = SSTR_WRAP_UTF8(key, key_len);
-    return Hash_Fetch_IMP(self, key_buf);
+    return Hash_Fetch(self, key_buf);
 }
 
 static CFISH_INLINE HashEntry*
@@ -222,7 +222,7 @@ Hash_Delete_IMP(Hash *self, String *key) {
 Obj*
 Hash_Delete_Utf8_IMP(Hash *self, const char *key, size_t key_len) {
     String *key_buf = SSTR_WRAP_UTF8(key, key_len);
-    return Hash_Delete_IMP(self, key_buf);
+    return Hash_Delete(self, key_buf);
 }
 
 bool

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/946d25a6/runtime/core/Clownfish/String.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/String.c b/runtime/core/Clownfish/String.c
index 633aa80..d30a04a 100644
--- a/runtime/core/Clownfish/String.c
+++ b/runtime/core/Clownfish/String.c
@@ -316,7 +316,7 @@ Str_Cat_Trusted_Utf8_IMP(String *self, const char* ptr, 
size_t size) {
 
 bool
 Str_Starts_With_IMP(String *self, String *prefix) {
-    return Str_Starts_With_Utf8_IMP(self, prefix->ptr, prefix->size);
+    return Str_Starts_With_Utf8(self, prefix->ptr, prefix->size);
 }
 
 bool
@@ -336,7 +336,7 @@ Str_Equals_IMP(String *self, Obj *other) {
     String *const twin = (String*)other;
     if (twin == self)              { return true; }
     if (!Obj_is_a(other, STRING)) { return false; }
-    return Str_Equals_Utf8_IMP(self, twin->ptr, twin->size);
+    return Str_Equals_Utf8(self, twin->ptr, twin->size);
 }
 
 int32_t
@@ -371,7 +371,7 @@ Str_Equals_Utf8_IMP(String *self, const char *ptr, size_t 
size) {
 
 bool
 Str_Ends_With_IMP(String *self, String *suffix) {
-    return Str_Ends_With_Utf8_IMP(self, suffix->ptr, suffix->size);
+    return Str_Ends_With_Utf8(self, suffix->ptr, suffix->size);
 }
 
 bool
@@ -793,7 +793,7 @@ StrIter_Skip_Whitespace_Back_IMP(StringIterator *self) {
 
 bool
 StrIter_Starts_With_IMP(StringIterator *self, String *prefix) {
-    return StrIter_Starts_With_Utf8_IMP(self, prefix->ptr, prefix->size);
+    return StrIter_Starts_With_Utf8(self, prefix->ptr, prefix->size);
 }
 
 bool
@@ -809,7 +809,7 @@ StrIter_Starts_With_Utf8_IMP(StringIterator *self, const 
char *prefix,
 
 bool
 StrIter_Ends_With_IMP(StringIterator *self, String *suffix) {
-    return StrIter_Ends_With_Utf8_IMP(self, suffix->ptr, suffix->size);
+    return StrIter_Ends_With_Utf8(self, suffix->ptr, suffix->size);
 }
 
 bool

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/946d25a6/runtime/core/Clownfish/Vector.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/Vector.c b/runtime/core/Clownfish/Vector.c
index 18c09d2..a37bc15 100644
--- a/runtime/core/Clownfish/Vector.c
+++ b/runtime/core/Clownfish/Vector.c
@@ -205,16 +205,16 @@ Vec_Excise_IMP(Vector *self, size_t offset, size_t 
length) {
 
 void
 Vec_Clear_IMP(Vector *self) {
-    Vec_Excise_IMP(self, 0, self->size);
+    Vec_Excise(self, 0, self->size);
 }
 
 void
 Vec_Resize_IMP(Vector *self, size_t size) {
     if (size < self->size) {
-        Vec_Excise_IMP(self, size, self->size - size);
+        Vec_Excise(self, size, self->size - size);
     }
     else if (size > self->size) {
-        Vec_Grow_IMP(self, size);
+        Vec_Grow(self, size);
         memset(self->elems + self->size, 0,
                (size - self->size) * sizeof(Obj*));
     }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/946d25a6/runtime/go/clownfish/clownfish.go
----------------------------------------------------------------------
diff --git a/runtime/go/clownfish/clownfish.go 
b/runtime/go/clownfish/clownfish.go
index b24405a..0376073 100644
--- a/runtime/go/clownfish/clownfish.go
+++ b/runtime/go/clownfish/clownfish.go
@@ -155,7 +155,7 @@ func (c *ClassIMP) GetMethods() []Method {
 
 func (c *ClassIMP) MakeObj() Obj {
        self := (*C.cfish_Class)(Unwrap(c, "c"))
-       retvalCF := C.CFISH_Class_Make_Obj_IMP(self)
+       retvalCF := C.CFISH_Class_Make_Obj(self)
        return WRAPAny(unsafe.Pointer(retvalCF))
 }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/946d25a6/runtime/perl/buildlib/Clownfish/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/buildlib/Clownfish/Build/Binding.pm 
b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
index d7f0ec0..618b43e 100644
--- a/runtime/perl/buildlib/Clownfish/Build/Binding.pm
+++ b/runtime/perl/buildlib/Clownfish/Build/Binding.pm
@@ -507,7 +507,7 @@ fetch_raw(self, key)
     cfish_Hash *self;
     cfish_String *key;
 CODE:
-    RETVAL = CFISH_OBJ_TO_SV_INC(CFISH_Hash_Fetch_IMP(self, key));
+    RETVAL = CFISH_OBJ_TO_SV_INC(CFISH_Hash_Fetch(self, key));
 OUTPUT: RETVAL
 
 void
@@ -519,7 +519,7 @@ PPCODE:
 {
     cfish_Obj *value
         = (cfish_Obj*)XSBind_perl_to_cfish_nullable(aTHX_ value_sv, CFISH_OBJ);
-    CFISH_Hash_Store_IMP(self, key, value);
+    CFISH_Hash_Store(self, key, value);
 }
 END_XS_CODE
 
@@ -871,7 +871,7 @@ store(self, tick, value);
 PPCODE:
 {
     if (value) { CFISH_INCREF(value); }
-    CFISH_Vec_Store_IMP(self, tick, value);
+    CFISH_Vec_Store(self, tick, value);
 }
 
 SV*

Reply via email to