Yukihiro "Matz" Matsumoto
b67955b8ca
Change the arguments of following implicit conversion functions:
...
- `mrb_convert_type`
- `mrb_check_convert_type`
Those function no longer take `tname` string representation of desired
type, and take method symbols instead of `const char*` names. This is
incompatible change. I hope no third-party gems use those functions.
2020-10-12 16:20:59 +09:00
Yukihiro "Matz" Matsumoto
2a366ffba8
Use functions that take symbols to reduce string litrals in C.
2020-10-12 16:20:59 +09:00
Yukihiro "Matz" Matsumoto
8864c30d16
Provide functions that take symbols instead of const char*.
...
- mrb_define_class_id
- mrb_define_module_id
- mrb_define_method_id
- mrb_define_singleton_method_id
- mrb_define_module_function_id
- mrb_define_const_id
- mrb_undef_method_id
- mrb_undef_class_method_id
- mrb_class_defined_id
- mrb_class_get_id
- mrb_class_defined_under_id
- mrb_class_get_under_id
- mrb_module_get_id
- mrb_module_get_under_id
- mrb_define_class_under_id
- mrb_define_module_under_id
- mrb_exc_get_id
2020-10-12 16:20:59 +09:00
Yukihiro "Matz" Matsumoto
3516a3c012
Use mrb->eStandardError instead of mrb_exc_get().
2020-10-12 16:20:58 +09:00
Yukihiro "Matz" Matsumoto
fa6a9f6f13
Add functions that take symbols as arguments.
...
- :
2020-10-12 16:20:58 +09:00
Yukihiro "Matz" Matsumoto
00f5ddc9ae
Use mrb_funcall_id() extensively.
...
Except for support files e.g. `mruby-test/driver.c`, which are not
target of symbol collection via `rake gensym`.
2020-10-12 16:20:58 +09:00
Yukihiro "Matz" Matsumoto
dcd3e5907c
Define a new function mrb_funcall_id().
...
`mrb_funcall_id()` takes `mrb_sym` instead of `char*` for a method name.
You can use `MRB_SYM()`/`MRB_QSYM()` to specify the method to call.
2020-10-12 16:20:57 +09:00
Yukihiro "Matz" Matsumoto
80c15ddd15
Update the build instruction.
2020-10-12 16:20:57 +09:00
Yukihiro "Matz" Matsumoto
7fde48b838
Remove unnecessary comments from host-shared target.
2020-10-12 16:20:56 +09:00
Yukihiro "Matz" Matsumoto
509f2bfd93
Add a new target clang-asan to use LLVM's address sanitizer.
2020-10-12 16:20:56 +09:00
Yukihiro "Matz" Matsumoto
b941e91866
Use more MRB_QSYM().
2020-10-12 16:20:56 +09:00
Yukihiro "Matz" Matsumoto
312f54b580
Add Rakefile to build/presym dependency.
2020-10-12 16:20:55 +09:00
Yukihiro "Matz" Matsumoto
3a162cc33f
Run rake gensym before the build.
2020-10-12 16:20:55 +09:00
Yukihiro "Matz" Matsumoto
b60809f117
Remove explicit rake gensym.
2020-10-12 16:20:55 +09:00
Yukihiro "Matz" Matsumoto
0881e34496
Add dependency from all to gensym.
...
You don't need to invoke `rake gensym` explicitly any longer.
2020-10-12 16:20:54 +09:00
Yukihiro "Matz" Matsumoto
24ad5f35b1
Removed unnecessary dependency from all.
...
`libmruby.flags.mak` is only required from `mruby-config` gem.
2020-10-12 16:20:54 +09:00
Yukihiro "Matz" Matsumoto
3c222e4e71
Add mruby-bin-config to default.gembox.
2020-10-12 16:20:54 +09:00
Yukihiro "Matz" Matsumoto
e2063fc267
Add operators to presym from Rakefile.
2020-10-12 16:20:53 +09:00
Yukihiro "Matz" Matsumoto
68f8d73308
Use MRB_QSYM() instead of MRB_OPSYM().
2020-10-12 16:20:53 +09:00
Yukihiro "Matz" Matsumoto
246c76e261
Rename MRB_OPSYM() to MRB_QSYM().
...
Where `QSYM` means quoted symbols, which cannot be represented C
symbols, so specify aliases instead.
- operators: name of the operation, e.g. add for `+`
- predicates: add `_p` suffix instead of `?`
- bang methods: add `_b` suffix instead of `!`
- instance variables: add `a_` prefix instead of `@`
- global variables: add `d_` prefix instead of `@`
- class variables: unsupported; don't use them
2020-10-12 16:20:53 +09:00
Yukihiro "Matz" Matsumoto
6128ae61a8
Simplified Rakefile.
2020-10-12 16:20:52 +09:00
Yukihiro "Matz" Matsumoto
e3e5596960
Use MRB_OPSYM() instead of mrb_intern_lit().
2020-10-12 16:20:52 +09:00
Yukihiro "Matz" Matsumoto
1bcf6d9f3c
Create MRB_OPSYM() macro to refer symbols corresponding operators.
...
For example, `MRB_OPSYM(add)` refers a symbol for `+`.
2020-10-12 16:20:51 +09:00
Yukihiro "Matz" Matsumoto
97e3c3a5a3
Undefine internal macros in presym.h.
...
- MRB_PRESYM_CSYM
- MRB_PRESYM_SYM
2020-10-12 16:20:51 +09:00
Yukihiro "Matz" Matsumoto
acd5317fb1
Create build directory first before gensym.
2020-10-12 16:20:50 +09:00
Yukihiro "Matz" Matsumoto
8d90c7c0fa
Remove unused variable from Rakefile.
2020-10-12 16:20:50 +09:00
Yukihiro "Matz" Matsumoto
5a88904fe8
Use File.open instead of File.write shortcut.
2020-10-12 16:20:49 +09:00
Yukihiro "Matz" Matsumoto
b3db34c2a8
Remove presym files before writing just to make sure.
2020-10-12 16:20:49 +09:00
Yukihiro "Matz" Matsumoto
6b7c12f523
Specify MRUBY_TARGET in CI configuration YAML.
2020-10-12 16:20:49 +09:00
Yukihiro "Matz" Matsumoto
fa18ffa90c
Add rake gensym to appveyor.yml too.
2020-10-12 16:20:48 +09:00
Yukihiro "Matz" Matsumoto
3ec61c0929
Update host* targets to use default.gembox.
...
And now `default.gembox` includes `mruby-socket` gem.
2020-10-12 16:20:48 +09:00
Yukihiro "Matz" Matsumoto
10b1a52bb8
Small updates on documents:
...
- README.md
- CONTRIBUTING.md
- doc/limitations.md
2020-10-12 16:20:48 +09:00
Yukihiro "Matz" Matsumoto
dcfc2dbf14
Add host-shared.rb to create shared mruby library.
2020-10-12 16:20:47 +09:00
Yukihiro "Matz" Matsumoto
d70536e0e8
Update host.rb build script.
2020-10-12 16:20:47 +09:00
Yukihiro "Matz" Matsumoto
fdbfeaf533
Build process updated:
...
You have to specify `TARGET` to specify a configuration, e.g.
```
rake TARGET=host-debug all test
```
When you port `mruby` to a new configuration:
1. copy an existing configuration under `target` directory
2. modify the new configuration file
3. build using the new configuration
4. send PR if you please
2020-10-12 16:20:47 +09:00
KOBAYASHI Shuji
ea31878b1f
Avoid changing directory in mruby-io test
2020-10-12 16:20:46 +09:00
KOBAYASHI Shuji
d33b9dc81f
Refine .travis.yml
...
* Disable automatic update and clean up on `brew install` (install time
160 sec -> 5 sec).
* Avoid using deprecated keys.
2020-10-12 16:20:46 +09:00
Yukihiro "Matz" Matsumoto
d612344e48
Should not use assert with expressions with side-effect; ref #4981
...
`assert()` can be completely removed when `NDEBUG` is set.
2020-10-12 16:20:45 +09:00
Yukihiro "Matz" Matsumoto
d7e183bfdf
Fixed wrong condition in #4981 .
2020-10-12 16:20:45 +09:00
Yukihiro "Matz" Matsumoto
d5c010422a
Run rake gensym before the build.
2020-10-12 16:20:45 +09:00
Yukihiro "Matz" Matsumoto
5738ed0474
Keep build/presym through rake clean.
2020-10-12 16:20:44 +09:00
Yukihiro "Matz" Matsumoto
3174061593
Prepend gensym rule to depfiles.
2020-10-12 16:20:44 +09:00
Yukihiro "Matz" Matsumoto
76d752c03b
Fix presym_find for strings without NUL terminators.
2020-10-12 16:20:44 +09:00
Yukihiro "Matz" Matsumoto
33647b904e
Avoid snprintf in mruby-io test; ref #4981
2020-10-12 16:20:43 +09:00
Yukihiro "Matz" Matsumoto
47f65a93c5
Remove the temporary file from the AF_UNIX socket test; #4981
2020-10-12 16:20:43 +09:00
Yukihiro "Matz" Matsumoto
a2fbb98fa6
Remove build/presym and build/presym.inc on rake clean.
2020-10-12 16:20:42 +09:00
Yukihiro "Matz" Matsumoto
721f934b9b
Scan .rb files as well to generate presym table.
2020-10-12 16:20:42 +09:00
Yukihiro "Matz" Matsumoto
d2cab16301
Update presym_find to use more efficient binary search.
2020-10-12 16:20:42 +09:00
Yukihiro "Matz" Matsumoto
eddd324979
Add MRB_SYM() for inline symbols.
2020-10-12 16:20:41 +09:00
Yukihiro "Matz" Matsumoto
f221f4e0fa
Update Rakefile to generate presym.
2020-10-12 16:20:41 +09:00