Commit Graph

83 Commits

Author SHA1 Message Date
kyab 31fbfb51db Add fallback for allocate CRC buffer 2013-06-22 04:02:55 +09:00
kimu_shu e720782f81 Add MRB_WORD_BOXING mode (represent mrb_value as a word) 2013-05-26 10:09:17 +09:00
Carson McDonald 546d1626e3 Fix early free of irep->filename 2013-05-13 10:15:37 -04:00
crimsonwoods 1dfe52e53d fix typos. 2013-05-05 11:28:06 +09:00
Masaki Muranaka 2109a99e5b Add void to function parameters. This is for compatibility with C++ 2013-04-26 11:33:06 +09:00
Masaki Muranaka 4a6da05808 Remove redundant whitespaces. Just cosmetic. 2013-04-25 16:57:52 +09:00
Masaki Muranaka e3a9e9b7d6 Add comments why there is no need to put the SIZE_ERROR check. It is for reviews in the future. 2013-04-25 16:57:19 +09:00
Masaki Muranaka 682d52b786 Add error checks for small environments which pointer is less than 32bit. These code will be removed by optimizer if the target runs on 32bit or above. 2013-04-25 16:56:12 +09:00
Masaki Muranaka 1e5f151c46 More strict NULL checks. 2013-04-25 16:41:15 +09:00
Masaki Muranaka 9479e4e287 Fix underlying memory leaks. When realloc is failed, memories are leaked. 2013-04-25 16:38:31 +09:00
masahino a283003d1c fix unnecessary irep_free 2013-04-23 23:22:58 +09:00
Masaki Muranaka 5801773f64 Simplify load.c. Remove code clones. Suppress return paths. 2013-04-22 17:36:49 +09:00
Yukihiro "Matz" Matsumoto c79172dfd5 put spaces after if/while 2013-04-20 23:11:43 +09:00
Masaki Muranaka a9f2473377 Add null char terminate to each symbol name. 2013-03-30 13:17:29 +09:00
Masaki Muranaka 24eb120148 Add CHAR_BIT check. There are uint8_t to char conversions. 2013-03-29 16:32:15 +09:00
Masaki Muranaka 9074983b22 Reduce temporary memory allocations. They are redundant. 2013-03-29 16:28:13 +09:00
Masaki Muranaka 2b6e9ee556 Modify the type of line-number to uint16_t. Type short is not portable. And it cannot be more than UINT16_MAX because of the mrbc binary format. 2013-03-29 16:26:00 +09:00
Masaki Muranaka 8742313079 Remove RiteFile as no used. 2013-03-29 16:21:12 +09:00
Yukihiro "Matz" Matsumoto b29b421817 Merge pull request #1101 from monaka/pr-cleanup-includes
Cleanup includes
2013-03-28 19:34:15 -07:00
Masaki Muranaka 74f04849c4 Rearrange SIZE_MAX. It is supported also VC++ since its version10. And there seems SIZE_MAX is defined in stdint.h. And it possibly (depends on the version of VC++) conflicts with SIZE_MAX in limits.h. This patch is no need if I did not support VC++. 2013-03-29 11:02:35 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yuichiro MASUI 1e58b9c2bf Fixed wrong section size calculation 2013-03-29 01:35:30 +09:00
Yukihiro "Matz" Matsumoto e8d98a3854 return value from fread(3) just cannot be ignored 2013-03-28 22:42:06 +09:00
Daniel Bovensiepen e952d55ba0 Catch return values to silent compiler 2013-03-28 07:09:05 +00:00
Yuichiro MASUI f3ebb89392 Added debug infomation section into .mrb file 2013-03-27 18:21:04 +09:00
mattn 38789c4282 Remove unused variable 2013-03-27 11:58:48 +09:00
Yukihiro Matz Matsumoto 638c5a96d7 bug in fread(3) error check 2013-03-27 11:53:14 +09:00
Yukihiro Matz Matsumoto a0f6e4d58e resolve conflict from #964 2013-03-27 00:52:24 +09:00
Masaki Muranaka 3aa3b4af90 Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
Yukihiro Matz Matsumoto 243669308d obsolete mrb_object; opposite of bc870ce 2013-03-15 23:16:20 +09:00
Masaki Muranaka 5bed51e584 Don't use int. It decreases portability. Use size_t as array index and length. It avoids overflow in the extreme situations. 2013-03-09 00:35:58 +09:00
Masaki Muranaka 8a7f5360cf Sanity check. As there are implicaton SIZE_MAX >= UINT32_MAX in this code. This assumption may break on some targets which have 16bit memory space. 2013-03-09 00:30:06 +09:00
Masaki Muranaka 51de2ba1d9 Clean up code. 2013-03-09 00:24:17 +09:00
Masaki Muranaka 6ff50568e1 Store to *bin_size if bin_size != NULL. 2013-03-09 00:23:08 +09:00
Masaki Muranaka 07017a4188 Use type cast not void* but char*. Don't substiture void pointers. 2013-03-09 00:12:19 +09:00
Masaki Muranaka faa1e5670a Remove unused substitutions and calculations. 2013-03-08 23:03:40 +09:00
Masaki Muranaka 9324c2168a Don't initialize variables that store result as MRB_DUMP_OK. It possibly causes bugs on modifications in the future. 2013-03-08 22:48:32 +09:00
Yuichiro MASUI 814094230c Change unsigned char to uint8_t 2013-03-08 18:55:15 +09:00
Yuichiro MASUI 2842583678 New mrb format. The detail is in https://github.com/mruby/mruby/issues/944 2013-03-08 03:14:21 +09:00
Masaki Muranaka 6cd7017ec1 Remove trailing whitespaces. This is just a cosmetic change. 2013-03-03 10:54:00 +09:00
Masaki Muranaka 2bfb88825d Fix errors caused by stdio.h dependent code. 2013-02-23 17:05:18 +09:00
mattn b1a5146ea8 Pluggable Regexp 2013-02-15 04:38:27 +09:00
Yukihiro Matz Matsumoto 323d8501d6 zero initialize hex buffers; close 768 2013-01-22 00:40:04 +09:00
Masaki Muranaka 86b3200746 Fix error handlings. 2013-01-09 13:33:00 +09:00
Masaki Muranaka 81b6895885 Merge branch 'master' of github.com:mruby/mruby into pr-strict-error-checking 2013-01-09 13:29:59 +09:00
Masaki Muranaka 0b337accad Extract each expresion in "if" statements. It is for maintainability. 2013-01-09 12:19:39 +09:00
Masaki Muranaka 94fb04a51e Remove redundant null checks. 2013-01-09 11:22:39 +09:00
Yukihiro Matz Matsumoto f1ed143624 mange arena_idx smarter for smaller ARENA_SIZE; now default to 100 from 1024 2012-12-07 16:58:50 +09:00
Yukihiro Matz Matsumoto f486774352 refactor and move irep malloc away to mrb_add_irep() 2012-12-07 15:57:40 +09:00
Yukihiro Matz Matsumoto b8e5a57047 rename mrb_load_irep etc. for naming consistency 2012-12-05 02:48:29 +09:00