summaryrefslogtreecommitdiffhomepage
path: root/src/symbol.c
AgeCommit message (Collapse)Author
2017-10-11Use division expression instead of some floating point literalsYAMAMOTO Masaya
2016-11-30Prohibit instantiation of immediate objectsYukihiro "Matz" Matsumoto
2016-01-06symname_p support `!~`ksss
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-10-20Increasing docs coverageSeba Gamboa
2015-05-28remove unnecessary including of <ctype.h>cremno
Not needed anymore since 85075bef7583edd0a48cfbdfaa632cbdacf78f2c
2014-10-02Pacify MSVC warnings for numeric.c, proc.c, and symbol.cHiroshi Mimaki
2014-09-30mrbconf.h option MRB_USE_ETEXT_EDATA to reduce memory.Yukihiro "Matz" Matsumoto
on platforms with _etext and _edata, mruby can distinguish string literals so that it avoids memory allocation to copy them. for example, on my Linux box (x86 32bit), memory consumed by mrbtest decreased from 8,168,203 to 8,078,848 (reduced 88KB).
2014-09-30mrb_sym2name_len() should initialize lenp even when proper symbol does not existYukihiro "Matz" Matsumoto
2014-09-30remove unnecessary trailing comma to remove pre C99 declaration error with ↵Yukihiro "Matz" Matsumoto
-Wdeclaration-after-statement
2014-09-30O(1) mrb_sym2name_len(); close #2591Yukihiro "Matz" Matsumoto
instead of adding sym->name hash table, linear symbol table is added, and reduced name->sym hash table size.
2014-09-15change mrb_sym type from uint16_t to uint32_tYukihiro "Matz" Matsumoto
2014-09-05use uint16_t instead of short; ref #2568Yukihiro "Matz" Matsumoto
2014-08-29use RITE_LV_NULL_MARK for better readabilitycremno
The comment didn't say why the length is reserved. Using RITE_LV_NULL_MARK makes things a bit clearer.
2014-08-29add sym_validate_len() to validate symbol lengthcremno
This also fixes an off-by-one in mrb_check_intern().
2014-08-27add symbol table overflow checkcremno
Since raising an error might intern a few new strings, some symbols need to be reserved. 8 should be sufficient. If the real limit has been reached, mrb_bug() is called.
2014-08-04add MRB_API modifiers to mruby API functionsYukihiro "Matz" Matsumoto
2014-07-27Refactor sym_equal() in symbol.cJun Hiroe
2014-05-19UINT16_MAX as symbol length is reserved; ref #2294Yukihiro "Matz" Matsumoto
2014-04-29Fix MSVC warning for symbol.ckyab
2014-04-25better integer size assertion suggested by usakYukihiro "Matz" Matsumoto
2014-04-25remove -Wsign-compare warningsYukihiro "Matz" Matsumoto
2014-04-15resolve conflictYukihiro "Matz" Matsumoto
2014-04-14fixed wrong use of pointer reference found by @tsahara; ref #2059Yukihiro "Matz" Matsumoto
2014-04-14reduce RSTRING_PTR usagecremno
2014-04-12replace memcpy() with a magic number by two assignments as suggested by ↵Yukihiro "Matz" Matsumoto
@cremno; close #2048
2014-04-02Use bool macro KHASH_DEFINE and KHASH_DECLAREksss
2014-03-19change mrb_int to size_t that would take strlen()Yukihiro "Matz" Matsumoto
2014-03-15symbol length type to be mrb_intYukihiro "Matz" Matsumoto
2014-03-11fix sym_intern argument typeksss
2014-03-10Merge pull request #1840 from ksss/bit-fieldYukihiro "Matz" Matsumoto
set bit field for mrb_bool
2014-03-10set bool macroksss
2014-03-10set bit field for mrb_boolksss
2014-03-06embed small stringksss
use flags 4 for *this object is embed* use flags 8~64 for *embed string length*
2014-02-25initialize sname before interningYukihiro "Matz" Matsumoto
2014-01-31use mrb_bool, FALSE and TRUE morecremno
It doesn't matter to me if one is using FALSE/TRUE instead of 1/0 but I prefer a type (alias) which emphasizes boolean vars to int. I changed 1/0 to FALSE/TRUE anyway.
2014-01-07remove superfluous includescremno
- reduce compile time by a little bit (full-core: ~0.7s for me) - thanks to 'include-what-you-use' for some help - include Standard C header files before any other (coding style)
2013-12-25rename mrb_intern_litral -> mrb_intern_staticYukihiro "Matz" Matsumoto
2013-12-24zero copy C literal strings in symbol tableYukihiro "Matz" Matsumoto
2013-12-23Merge pull request #1615 from crimsonwoods/remove_strong_coupling_by_khashYukihiro "Matz" Matsumoto
Remove 'mrb_state' field from 'kh_xxx_t' structure.
2013-12-23Remove 'mrb_state' field from 'kh_xxx_t' structure.crimsonwoods
'kh_xxx_t' requires 'mrb_state' to allocate, free, and compute hash value. But 'mrb_state' should not be held by 'kh_xxx_t' and 'mrb_state' should be supplied from outside.
2013-12-23change behavior of mrb_sym2strh2so5
2013-11-29rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513Yukihiro "Matz" Matsumoto
2013-08-13define Class#new in ruby to call #initializeYukihiro "Matz" Matsumoto
2013-07-15Repalace int with mrb_bool because a return value is boolean.Jun Hiroe
2013-07-12Replace mrb_intern() func with mrb_intern2() func or mrb_intern_cstr() func.Jun Hiroe
2013-06-15Merge upstreamDaniel Bovensiepen
2013-06-17Add ISO Number to SymbolDaniel Bovensiepen
2013-04-28mrb_str_new_static(): zero copy string creationYukihiro "Matz" Matsumoto
2013-04-26rename mrb_interned API functionsYukihiro "Matz" Matsumoto