summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-20 08:57:24 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-20 08:57:24 +0000
commitf11b54213ad169975f98bbf0a39e1b303bc2795f (patch)
tree2abb0979dd67326cab2fdbcb19c54bc81e4fb8cf
parentc702005a7bbb807cab666537b5ef1877c14c40ba (diff)
* vm_method.c: check definition of
GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--vm_method.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ae7b259..d346ba0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 20 17:52:50 2013 Koichi Sasada <ko1@atdot.net>
+
+ * vm_method.c: check definition of
+ GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.
+
Fri Dec 20 17:03:10 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
diff --git a/vm_method.c b/vm_method.c
index 737cd26..fce8add 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -2,8 +2,13 @@
* This file is included by vm.c
*/
+#ifndef GLOBAL_METHOD_CACHE_SIZE
#define GLOBAL_METHOD_CACHE_SIZE 0x800
+#endif
+#ifndef GLOBAL_METHOD_CACHE_MASK
#define GLOBAL_METHOD_CACHE_MASK 0x7ff
+#endif
+
#define GLOBAL_METHOD_CACHE_KEY(c,m) ((((c)>>3)^(m))&GLOBAL_METHOD_CACHE_MASK)
#define GLOBAL_METHOD_CACHE(c,m) (global_method_cache + GLOBAL_METHOD_CACHE_KEY(c,m))
#include "method.h"