Commit Graph

105 Commits

Author SHA1 Message Date
yui-knk cf80e7fe21 Fix comment of exc_inspect (and adjust spaces) 2014-05-04 10:22:27 +09:00
kyab 1fdc072032 Fix MSVC warnings for error.c 2014-04-26 00:00:40 +09:00
cremno 36d3909e63 get classname and concatenate ": " only once 2014-04-16 20:48:39 +02:00
cremno b4bb2a700a convert exception message to string
fixes: mruby -e "p ArgumentError.new(1)"
2014-04-16 20:44:07 +02:00
Yukihiro "Matz" Matsumoto 3e00684faa resolve conflict 2014-04-16 15:18:52 +09:00
cremno 7a8ed0fa3a exc_inspect: dup file and check mesg only once 2014-04-14 03:52:17 +02:00
Takeshi Watanabe 824d3450c5 Qualify argv argument of API const. 2014-04-11 20:38:23 +09:00
take_cheeze 86831d5465 move jmpbuf_id to generated file 2014-03-01 20:05:30 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
cubicdaiya bd0244d067 use mrb_str_cat_lit() intead of mrb_str_cat 2014-02-27 22:42:25 +09:00
Yukihiro "Matz" Matsumoto 5b8229715d revert 38e9ce21 and API changed; mrb_get_backtrace() -> renamed to mrb_exc_backtrace since this is a backtrace method implementation of Exception; mrb_get_backtrace_at() -> removed; mrb_get_backtrace() -> added to get backtrace in array (like caller) 2014-02-27 04:34:30 +09:00
take_cheeze 08ea324593 move src/error.h to include/mruby/error.h 2014-02-20 22:41: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
cremno f2a62a74ed clean up external symbols
remove unused and unneeded:
- sysexit_status
- type (a global variable)

add mrb_ prefix to:
- codedump_all
- class_instance_method_list
- parser_dump

make various functions static, incl.:
- yyparse
- make_exception
2014-01-31 01:30:18 +01:00
cremno aa655b9ee1 remove superfluous includes
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
take_cheeze df780ae5e9 add mrb_intern_lit for creating symbol from string literal 2013-12-01 10:38:59 +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
cremno aacadb2365 renamed mrb_exc_new3 to mrb_exc_new_str
- more descriptive name (there's no mrb_exc_new2)
- no wrapper (macro/static inline function) for
backwards compatibility because nothing besides
mruby itself seems to be calling this function:
<http://mruby-code-search.ongaeshi.me/home?query=mrb_exc_new3>
2013-11-18 21:01:03 +01:00
Yukihiro "Matz" Matsumoto a7c9a71684 better error position display 2013-10-15 12:49:41 +09:00
Yukihiro "Matz" Matsumoto 2fe64f24f8 remove Exception#verbose_backtrace; #1495 2013-09-03 15:52:35 +09:00
take_cheeze bd5afe9eef rename debug function name 2013-09-02 00:48:07 +09:00
take_cheeze 3d1fffbd6b support multiple filename in irep 2013-09-02 00:48:06 +09:00
take_cheeze d12b6ab218 add verbose_backtrace 2013-09-02 00:48:06 +09:00
wanabe 7007ce7ce0 add Exception#backtrace 2013-08-25 01:18:01 +09:00
Yukihiro "Matz" Matsumoto 6b015ec775 define Class#new in ruby to call #initialize 2013-08-13 16:55:06 +09:00
Yukihiro "Matz" Matsumoto 63e5a3cfb1 refactor out longjmp() to a function 2013-07-25 14:54:17 +09:00
Yukihiro "Matz" Matsumoto 2daf39ddc8 change else formatting 2013-07-22 09:52:06 +09:00
Yukihiro "Matz" Matsumoto 5c0b9b703c primary mruby fiber implementation 2013-05-20 17:54:07 +09:00
Yukihiro "Matz" Matsumoto b7a24de377 change mrb_bug to get mrb_state and %S formatter 2013-05-10 22:11:28 +09:00
Yukihiro "Matz" Matsumoto fad8b1cefa change mrb_warn to get mrb_state and %S formatter 2013-05-10 22:09:02 +09:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
Masaki Muranaka edd0a62106 Add NameError#name. Fix NameError.new and NameError.initialize. Enable 2nd argument for NameError.new in C API. 2013-04-04 16:24:43 +09:00
Masaki Muranaka 05ad6902fd Remove API mrb_string_value(). There have mrb_str_to_str() in the core. And mrb_string_value() is no merit to keep using. 2013-03-29 18:01:25 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yukihiro "Matz" Matsumoto a6cca7c2c4 Merge branch 'pr-fix-mrb_format' of https://github.com/monaka/mruby into monaka-pr-fix-mrb_format 2013-03-28 22:46:51 +09:00
Masaki Muranaka c0b5220418 Modify mrb_name_error() to use mrb_format(). 2013-03-28 17:35:04 +09:00
Masaki Muranaka d329d1f421 Fix. In some cases, %S substitutions were failed. 2013-03-28 15:08:29 +09:00
Masaki Muranaka 9c831c9a9c Remove the escape backslash from the result string. 2013-03-28 15:07:34 +09:00
Yukihiro Matz Matsumoto 18b2683b97 use new mrb_format API from mrb_raisef; its only format specifier is "%S" (stringify) and takes mrb_value; close #1062 2013-03-27 23:41:23 +09:00
Yukihiro Matz Matsumoto 8ce842a5d9 implement mrb_format and mrb_vformat 2013-03-27 23:03:48 +09:00
crimsonwoods c2c95f09e5 remove unused functions 'mrb_strerrno' and 'mrb_bug_errno'. 2013-03-25 23:41:20 +09:00
mattn aec5ac493e Remove unused mrb_sprintf 2013-03-24 00:52:25 +09:00
Masaki Muranaka 0cedf8fa02 Rename API mrb_str_cat2() to mrb_str_cat_cstr(). This is for naming orthogonality. mrb_str_cat2() is also left for backward compatibility. 2013-03-23 16:29:30 +09:00
Masaki Muranaka 92821cf2ef Use mrb_str_cat() instead of mrb_str_cat2() as possible. 2013-03-23 15:55:55 +09:00
Masaki Muranaka f8fa56d8c3 Use mrb_intern2() instead of mrb_intern(). This is for avoiding overhead by strlen(). 2013-03-22 14:22:45 +09:00
Yukihiro Matz Matsumoto d0d920e909 rename mrb_true_or_false_value() to mrb_bool_value() 2013-03-19 12:03:54 +09:00
Masaki Muranaka 2930bc50a9 Use mrb_true_or_false_value() / in exc_equal(). 2013-03-19 11:04:20 +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
Tomoyuki Sahara c0b844033f mrb_str_new2 -> mrb_str_new_cstr 2013-03-13 10:29:17 +09:00