Yukihiro "Matz" Matsumoto
9ff1aa9d55
fp_uscale.c: replace fmt_fp.c and readfloat.c with uscale algorithm
...
Replace separate float formatting (fmt_fp.c) and parsing (readfloat.c)
implementations with a unified fp_uscale.c using 128-bit unrounded
scaling. Both mrb_format_float() and mrb_read_float() now share a
single pow10 table and uscale() primitive for decimal/binary conversion.
This fixes subnormal parsing accuracy (old code returned 0.0 for the
smallest subnormals) and corrects %.2f rounding for values like
12345.125. Table size grows from ~5KB to ~11KB in .rodata.
Co-authored-by: Claude <noreply@anthropic.com >
2026-04-23 19:25:21 +09:00
Yukihiro "Matz" Matsumoto
29e5be08e1
tools/lrama: add missing newline at end of yacc.c template
...
posix requires text files to end with a newline character.
pre-commit hook detected the missing newline and this fixes it.
Co-authored-by: Claude <noreply@anthropic.com >
2025-10-04 07:56:37 +09:00
Yukihiro "Matz" Matsumoto
3684a27209
tools/lrama: update to lrama 0.7.0; close #6384
2025-04-02 00:16:23 +09:00
John Bampton
b974b944af
docs: fix spelling
2024-09-22 12:16:23 +10:00
Yukihiro "Matz" Matsumoto
54e99197bd
Revert "tools/lrama: apply ruby/lrama#442"
...
This reverts commit fb9fbc8498 .
The fix in the upstream still causes syntax error in C++.
2024-06-22 13:34:46 +09:00
Yukihiro "Matz" Matsumoto
eab6bddffe
Merge pull request #6292 from jbampton/pre-commit-autoupdate
...
markdownlint --fix; remove prettier; pre-commit autoupdate; fix spelling
2024-06-21 14:33:44 +09:00
Yukihiro "Matz" Matsumoto
fb9fbc8498
tools/lrama: apply ruby/lrama#442
2024-06-21 08:12:27 +09:00
John Bampton
ac74c90b30
Run markdownlint --fix
2024-06-21 06:53:42 +10:00
Yukihiro "Matz" Matsumoto
933e966fab
tools/lrama: update template to stop C++ compiler error
2024-06-10 15:23:53 +09:00
Yukihiro "Matz" Matsumoto
fbe21a0321
tools/lrama: bundle Lrama 0.6.9 (copied from CRuby source)
2024-06-10 14:26:26 +09:00
take_cheeze
6460ef77bc
Compile mruby compiler as mrbgem.
...
Compiler codes is moved to "mruby-compiler".
Executable `mrbc` is moved to "mruby-bin-mrbc".
2015-06-01 21:53:55 +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
Tatsuhiko Kubo
dae42ffe54
Removed duplicated declarations.
...
* `mrb_show_version()`
* `mrb_show_copyright()`
2015-01-03 22:56:36 +09:00
take_cheeze
2f614b1a5c
Ignore outfile check when -c(check syntax only) flag is enabled.
2014-06-06 19:55:04 +09:00
Yukihiro "Matz" Matsumoto
873fae9f45
wrap function prototype by extern "C"
2014-03-02 00:59:49 +09:00
take_cheeze
78915f9601
support c++ exception
2014-03-01 20:05:29 +09:00
cremno
4507985c3e
use mrb_bool, FALSE and TRUE more
...
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-31 18:00:36 +01:00
Yukihiro "Matz" Matsumoto
f57cdc3cd7
parser_dump() is not used in mrbc; close #1561
2013-11-19 18:59:53 +09:00
Yukihiro "Matz" Matsumoto
edd6c17c1e
load_exec() no longer return fixnum value for no_exec; should close #1569
2013-11-13 15:48:13 +09:00
Yukihiro "Matz" Matsumoto
08e6bd47a0
fclose input file
2013-11-13 14:44:02 +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
takahashim
77d2322a11
mrbc: add line break for -c option
2013-11-03 12:27:37 +09:00
take_cheeze
3d1fffbd6b
support multiple filename in irep
2013-09-02 00:48:06 +09:00
Cremno
ba027d7806
don't use str{cpy,cat} in mruby and mrbc
...
The length of each string is known. It should be used.
2013-08-07 19:58:06 +02:00
murase_syuka
fb9372b948
add mrbc -h option
2013-08-02 16:30:51 +09:00
Luis Lavena
0fc9064c59
mrbc: use binary mode on outfile
...
This solves the problem of incorrect bytecode generated by mrbc
for single files on Windows platform (which is by default text-mode)
2013-05-18 12:24:54 -03:00
Yukihiro "Matz" Matsumoto
36216ac6f7
Merge branch 'master' of github.com:mruby/mruby
2013-05-16 09:24:18 +09:00
Carson McDonald
439359324d
Fix compiler warning by exiting if wfp isn't set
2013-05-15 09:02:27 -04:00
Yukihiro "Matz" Matsumoto
103ab2e53d
avoid unnecessary copy of context->filename
2013-05-15 00:08:28 +09:00
Yukihiro "Matz" Matsumoto
95fb1fd809
mrbc to take multiple files, preserving debug information if -g given; close #1243
2013-05-14 23:39:56 +09:00
Yukihiro "Matz" Matsumoto
c79172dfd5
put spaces after if/while
2013-04-20 23:11:43 +09:00
Carson McDonald
204ff73fd2
Fix typo.
2013-04-17 05:19:53 -04:00
Carson McDonald
3d0bbd9f40
Minor code format changes.
2013-04-17 05:19:13 -04:00
Masaki Muranaka
9d8143f930
Move mirb and mruby to mrbgems.
2013-04-11 15:22:07 +09:00
h2so5
f44c99cd2d
Replace malloc with mrb_malloc in mrbc
2013-04-10 06:39:52 +09:00
Yukihiro "Matz" Matsumoto
f607fd68d9
Merge pull request #1163 from h2so5/show-version-once
...
Show version only once with '-v' option in mruby/mrbc
2013-04-09 09:46:34 -07:00
Yukihiro "Matz" Matsumoto
c5c3fa1939
Merge pull request #1164 from h2so5/add-validation-for-c-symbol
...
Add validation for C language symbol name
2013-04-09 09:45:56 -07:00
Akito Mochizuki
b379f6e94f
Fix mirb to use readline
2013-04-09 16:58:39 +09:00
h2so5
337076f9ba
Add validation for C language symbol name
2013-04-09 16:21:51 +09:00
h2so5
6afe138412
Show version only once with '-v' option in mruby/mrbc
2013-04-09 14:57:46 +09:00
Yukihiro "Matz" Matsumoto
1b40c057f5
Merge pull request #1157 from monaka/pr-add-ARGV-to-mirb
...
Add ARGV constant. It is not required by ISO. Compatibility with CRuby.
2013-04-08 12:10:04 -07:00
h2so5
22f50fe32e
Fix a memory leak in mirb
2013-04-08 23:38:01 +09:00
h2so5
531daa0a9d
Fix checking for heredoc in mirb
2013-04-07 18:05:23 +09:00
Masaki Muranaka
2c0f2eb9f8
Add ARGV constant. It is not required by ISO. Compatibility with CRuby.
2013-04-07 12:51:13 +09:00
Masaki Muranaka
48aa61a5e2
Support $0 variable.
2013-04-07 11:55:02 +09:00
h2so5
a258d5752a
Improve checking for unterminated string in mirb
2013-04-06 20:32:48 +09:00
Yukihiro "Matz" Matsumoto
2ae47ddd09
parse_args should return either EXIT_SUCCESS or EXIT_FAILURE
2013-04-06 01:04:35 +09:00
Yukihiro "Matz" Matsumoto
e72ac2c61f
use EXIT_SUCCESS and EXIT_FAILURE for exit status; close #1142
2013-04-06 00:48:42 +09:00
Masaki Muranaka
2b5b161f8b
Sort include files. Some redundant includes are removed.
2013-03-29 10:22:31 +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