fleuria
a511957ec8
refactor mrb_context_run()
2013-11-03 12:05:25 +08:00
fleuria
d75a907edf
introduce mrb_context_run()
...
currently there are two scnenario to call mrb_run(), the first is
calling a proc, in this case mrb should create a new environment,
discarding all the variables except args, reciever and block.
the second is calling the newly generated irep, like in mirb.
in this case, the variables should be kept after mrb_run().
so we introduce mrb_context_run() to handle this seperately.
2013-11-03 11:32:59 +08:00
Akito Mochizuki
b840a6a813
Fix checking return value of fread()
2013-09-10 14:50:18 +09:00
Cremno
501df71833
MSVC: compilation works again (+minor style fixes)
2013-09-03 21:15:14 +02:00
take_cheeze
3df8686259
don't use RArray in filename table generating
2013-09-02 22:46:57 +09:00
take_cheeze
8588c54452
declare variable outside for
2013-09-02 22:12:55 +09:00
take_cheeze
3d1fffbd6b
support multiple filename in irep
2013-09-02 00:48:06 +09:00
Yukihiro "Matz" Matsumoto
cf840c1d05
use mrb_malloc_simple() to allocate crc buffer; close #1302
2013-06-25 15:39:34 +09:00
kyab
e9ebd6f87a
Fix crash on load *mrb
2013-06-25 02:12:56 +09:00
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