57 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 87576b819e Remove endian information/flags from compiled binary format.
Since `mruby 2.0`, compiled bytecode no longer depends on the
endian of the machine.
2020-05-07 08:38:46 +09:00
Yukihiro "Matz" Matsumoto 87d77c13f5 Update compiled binary format version for OP_LOADI16. 2020-05-07 08:38:46 +09:00
David Siaw b5299b1c58 fix up documentation for values 2019-08-18 20:12:44 +09:00
Yukihiro "Matz" Matsumoto 85a2dfc841 Merge pull request #4403 from dearblue/read-irep-from-buf
Read irep from buffers
2019-05-22 08:58:50 +09:00
dearblue 67fc3428cb Remove "LINE" section reader
Because it is not currently output by `mrbc`.
2019-05-19 11:09:25 +09:00
dearblue 8f6f36f654 Add mruby binary loader functions from buffer memory
Add new functions (with `MRB_API`):
- `mrb_read_irep_buf()`
- `mrb_load_irep_buf()`
- `mrb_load_irep_buf_cxt()`
2019-04-24 22:56:39 +09:00
Yukihiro "Matz" Matsumoto 81862fd689 Update compiled binary format version; ref #4219 2019-01-08 21:44:40 +09:00
Yukihiro "Matz" Matsumoto 1bc1fed534 Update RITE_BINARY_FORMAT_VER and RITE_VM_VER.
The bytecode format was updated so the header version constants must be
updated as well.
2018-08-30 22:48:05 +09:00
Yukihiro "Matz" Matsumoto ea250d5f52 Increment RITE_BINARY_FORMAT_VER.
The behavior of `OP_RAISE` has been changed.
2017-06-19 09:23:03 +09:00
Yukihiro "Matz" Matsumoto 065966dae4 common.h are supposed to be included from other header, so call it with quotes; ref #3032 2015-11-28 00:10:38 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Yukihiro "Matz" Matsumoto 4440566b95 DISABLE_STDIO/ENABLE_DEBUG macros to rename; close #3014
changes:
 * rename DISABLE_STDIO -> MRB_DISABLE_STDIO
 * rename ENABLE_DEBUG -> MRB_ENABLE_DEBUG_HOOK
 * no more opposite macro definitions (e.g. ENABLE_STDIO, DISABLE_DEBUG).
 * rewrite above macro references throughout the code.
 * update documents
2015-11-17 07:30:34 +09:00
Seba Gamboa a0fe0c40b1 Remove old doxygen tags 2015-10-08 12:29:10 -03:00
Seba Gamboa 40bf7bde78 Sorting documentation grouping 2015-09-21 01:48:42 -03:00
Seba Gamboa c127614638 Setting up doxygen groups 2015-09-20 21:14:07 -03:00
Yukihiro "Matz" Matsumoto 7b5f8b0728 remove trailing spaces from bc9c47d5 2015-09-03 01:39:17 +09:00
Yukihiro "Matz" Matsumoto bc9c47d518 allow endian specification of mrb files by mrbc -e/-E
`mruby -b` now accepts both big/little endian mrb (compiled binary) files.

`mrbc` generates mrb files in big endian for .mrb files and in native endian
for C files (with -B option specified) by default.  If you are cross compiling,
you need to specify target endian by -e/-E options if it is different from
host endian.
2015-02-02 09:34:24 +09:00
Yukihiro "Matz" Matsumoto be844f9284 Fix misaligned access when reading irep; close #2630
Add padding bytes before iseq block that may be used as mrb_code[].
Note that dumped mrb format has changed.

Based on a patch from kimu_shu <alfvegardrisc@gmail.com>
2014-11-04 02:41:42 +09:00
Yukihiro "Matz" Matsumoto 206f89e209 add MRB_API modifiers to mruby API functions 2014-08-04 00:47:08 +09:00
Yukihiro "Matz" Matsumoto 54c2dcf231 allow NULL (no variable) in lvar section of mrb format; fix #2294
This fix use UINT16_MAX for NULL symbol tag, that means maximum symbol length
is not UINT16_MAX-1.
2014-05-19 18:39:37 +09:00
Yukihiro "Matz" Matsumoto 7a5d8a40fe rename lv section header from LOCV to LVAR 2014-05-14 17:26:45 +09:00
Yukihiro "Matz" Matsumoto 10459a5eb2 Merge branch 'dump_lv' of https://github.com/take-cheeze/mruby into take-cheeze-dump_lv 2014-05-14 11:27:41 +09:00
cremno 36eef0c222 add namespace prefix to dump_irep 2014-05-02 22:29:12 +02:00
Thiago Scalone 05df94f148 Added dump_irep in header. 2014-04-30 18:32:55 -03:00
take_cheeze 4c7f9897c2 Support local variables information dumping. 2014-04-29 20:47:50 +09:00
Masaki Muranaka 270d25bf2d Make type casts safer. 2014-03-08 15:53:59 +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 e8945b8598 dump.h: parenthesize negative errnos 2014-02-13 13:39:22 +01: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 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
Thomas Schmidt 713e0019ca remove executable bit from include/mruby/dump.h file 2013-09-16 13:12:04 +02:00
take_cheeze 3d1fffbd6b support multiple filename in irep 2013-09-02 00:48:06 +09:00
crimsonwoods 1dfe52e53d fix typos. 2013-05-05 11:28:06 +09:00
arton 513bce35f6 add extern funcs declaration and casts for cimpiling C++ compiler 2013-04-28 15:31:50 +09:00
Artur K 642ea41abd Fix the calc_crc_16_ccitt signature to match the source file 2013-03-30 18:11:09 +01:00
Masaki Muranaka 1074a3c0f4 Fix a type mismatch. 2013-03-28 23:44:50 +09:00
Yukihiro "Matz" Matsumoto e265d7c7ef Merge pull request #1082 from masuidrive/add_debug_info
Added debug infomation section into .mrb file
2013-03-27 08:34:12 -07:00
kurodash 1c4820642d Fix build error on VS2012 toolchain.
A local variables define beginning of a scope block.
VS2012 unacceptable ";;" in struct definition.
2013-03-27 18:24:40 +09:00
Yuichiro MASUI f3ebb89392 Added debug infomation section into .mrb file 2013-03-27 18:21:04 +09:00
Yukihiro Matz Matsumoto e03e697549 little cosmetic change (delete word Rite); bump dump file version number 2013-03-27 11:28:05 +09:00
Yukihiro Matz Matsumoto a0f6e4d58e resolve conflict from #964 2013-03-27 00:52:24 +09:00
Masaki Muranaka 4ad08caca0 Remove stdio.h as it is included in mrbconf.h. 2013-03-16 21:39:52 +09:00
Masaki Muranaka 6ba298ed54 Remove unnecessory stdint.h. 2013-03-16 21:06:32 +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
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 e4231a0a33 Add typedef to structures that have mrb_ prefix. Use typedef-ed type instead of struct directly. 2013-03-01 14:28:22 +09:00
Masaki Muranaka 2bfb88825d Fix errors caused by stdio.h dependent code. 2013-02-23 17:05:18 +09:00
Masaki Muranaka d5b8dc54a6 Add a comment: the usage of MRB_DUMP_GENERAL_FAILURE. 2013-01-09 13:33:51 +09:00
Yukihiro Matz Matsumoto c02c264be2 prototype refactoring on mrb_load_irep(); close #647 2012-12-19 20:44:30 +09:00