summaryrefslogtreecommitdiff
path: root/include/ruby/backward/classext.h
AgeCommit message (Collapse)Author
2020-08-27git rm include/ruby/backward/classext.h卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3340
2020-04-13add #include guard hack卜部昌平
According to MSVC manual (*1), cl.exe can skip including a header file when that: - contains #pragma once, or - starts with #ifndef, or - starts with #if ! defined. GCC has a similar trick (*2), but it acts more stricter (e. g. there must be _no tokens_ outside of #ifndef...#endif). Sun C lacked #pragma once for a looong time. Oracle Developer Studio 12.5 finally implemented it, but we cannot assume such recent version. This changeset modifies header files so that each of them include strictly one #ifndef...#endif. I believe this is the most portable way to trigger compiler optimizations. [Bug #16770] *1: https://docs.microsoft.com/en-us/cpp/preprocessor/once *2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html Notes: Merged: https://github.com/ruby/ruby/pull/3023
2015-10-18* numeric.c: Good-by Borland-C.kosaki
* include/ruby/backward/rubyio.h: ditto. * include/ruby/backward/st.h: ditto. * include/ruby/backward/util.h: ditto. * include/ruby/backward/rubysig.h: ditto. * include/ruby/backward/classext.h: ditto. * dln.c: ditto. * gc.c: ditto. * win32/resource.rb: ditto. * win32/dir.h: ditto. * ext/tk/tcltklib.c: ditto. * NEWS: announce that Borland-C is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-20ruby.h: swap iv_index_tbl and super for struct RClasstmm1
* include/ruby/ruby.h (struct RClass): add super, remove iv_index_tbl. since RCLASS_SUPER() is commonly used inside while loops, we move it back inside struct RClass to improve cache hits. this provides a small improvement (1%) in hotspots like rb_obj_is_kind_of() * internal.h (struct rb_classext_struct): remove super, add iv_index_table * internal.h (RCLASS_SUPER): update for new location * internal.h (RCLASS_SET_SUPER): ditto * internal.h (RCLASS_IV_INDEX_TBL): ditto * object.c (rb_class_get_superclass): ditto * include/ruby/backward/classext.h (RCLASS_SUPER): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18* include/ruby/backward/classext.h: for evil gems. fixed #4803nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e