Commit Graph

126 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 72c274473b remove size_t cast in mrb_assert() since ((size_t)n <= SIZE_MAX) is always true 2014-03-19 09:07:59 +09:00
Yukihiro "Matz" Matsumoto 3e24e06b29 add a space after C reserved words 2014-03-18 23:57:29 +09:00
Yukihiro "Matz" Matsumoto c476c1b528 symbol length type to be mrb_int 2014-03-15 15:43:40 +09:00
take_cheeze bbb7ba46b2 don't use of anonymous unions 2014-03-11 22:01:00 +09:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +09:00
cubicdaiya 019d15c3ee Use mrb_exc_new_str_lit widely 2014-03-04 02:45:53 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
cremno 18433731ed remove various preprocessor conditionals
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
Yukihiro "Matz" Matsumoto b72f3f92f7 use static symbols for debug filename info 2013-12-25 14:52:13 +09:00
Yukihiro "Matz" Matsumoto 48ad07eb41 zero copy str_new from static allocate irep 2013-12-25 09:48:57 +09:00
Yukihiro "Matz" Matsumoto bd76b2dea8 zero copy intern from static allocate irep 2013-12-25 08:49:18 +09:00
Yukihiro "Matz" Matsumoto 9c6398a444 rename mrb_intern2() to mrb_intern(); huge API incompatibility; close #1513 2013-11-29 08:47:28 +09:00
Yukihiro "Matz" Matsumoto 9ac386923d float objects in pool are objects when MRB_WORD_BOXING is set 2013-11-27 17:29:28 +09:00
kyab 1a6244d99d Fix build error for MRB_WORD_BOXING 2013-11-26 20:28:24 +09:00
Yukihiro "Matz" Matsumoto fb386011df rename API mrb_str_dup_static() -> mrb_str_pool() 2013-11-20 08:37:16 +09:00
Yukihiro "Matz" Matsumoto 16e1fbc1e8 mrb format should be portable among configurations (e.g. MRB_NAN_BOXING) 2013-11-20 07:34:57 +09:00
Yukihiro "Matz" Matsumoto d73dfa8708 resolve conflict 2013-11-20 07:29:55 +09:00
Miura Hideki 54c5b12fb7 irep->pool struct pool -> mrb_value 2013-11-19 20:38:02 +09:00
Per Lundberg d073129d9d Fixed so that it builds with VS2013. VLA:s are not supported, because of its strict C89 world view. 2013-11-19 09:29:20 +02:00
takahashim 305b5d691b fix warning: "implicit conversion from enumeration type 'enum mrb_vtype' to different enumeration type 'enum irep_pool_type' [-Wenum-conversion]" 2013-11-17 14:18:16 +09:00
Yukihiro "Matz" Matsumoto 3286e63202 wrong size of filenames buffer 2013-11-15 11:46:30 +09:00
Yukihiro "Matz" Matsumoto 04a2c58e94 add new function mrb_load_irep_file_cxt() and simplifies mruby.c 2013-11-15 10:49:40 +09:00
Yukihiro "Matz" Matsumoto 71354b91cb enum mrb_vtype varies on compile time configuration, namely MRB_NAN_BOXING 2013-11-15 02:45:52 +09:00
fleuria 87fa03ebce fix length check in read_section_debug(); fix #1572 2013-11-14 20:16:46 +08:00
Yukihiro "Matz" Matsumoto c6cc92ac87 remove possible free-after-realloc problem; close #1570 2013-11-14 14:59:26 +09:00
Yukihiro "Matz" Matsumoto fc83acfcff remove unnecessary jump 2013-11-14 09:46:41 +09:00
Yukihiro "Matz" Matsumoto ca704e5438 pacify some warnings on OpenBSD 2013-11-13 10:33:10 +09:00
Yukihiro "Matz" Matsumoto 7078fcd9e4 fixnum in irep->pool may overflow 2013-11-13 10:15:57 +09:00
Yukihiro "Matz" Matsumoto 7e64d7e531 check for corrupted mrb file data 2013-11-10 03:08:01 +09:00
Yukihiro "Matz" Matsumoto 7aabc657f1 protect returning irep (in proc) from GC 2013-11-09 04:08:24 +09:00
Yukihiro "Matz" Matsumoto c8936754e8 wrong return value from read_lineno_record() 2013-11-07 08:20:03 +09:00
Yukihiro "Matz" Matsumoto 677a2ac226 irep->pool not to be GCed 2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto e92d4e2680 modified to use irep->reps to reference child ireps. preparation for
removing irep array from mrb_state.  note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
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