Yukihiro "Matz" Matsumoto
0290f06681
Merge pull request #5279 from shuujii/remove-unneeded-mruby-test-gem-in-build_config-no-float.rb
...
Remove unneeded `mruby-test` gem in `build_config/no-float.rb` [ci skip]
2021-01-11 12:53:17 +09:00
KOBAYASHI Shuji
2ddd66cc4b
Remove unneeded mruby-test gem in build_config/no-float.rb [ci skip]
...
Use `enable_test` to enable the test.
2021-01-11 12:07:08 +09:00
Yukihiro "Matz" Matsumoto
ffea200075
Merge pull request #5278 from dearblue/annotation
...
Fix annotations [ci skip]
2021-01-11 11:57:09 +09:00
dearblue
a0662a16a3
Fix annotations [ci skip]
2021-01-11 11:33:39 +09:00
KOBAYASHI Shuji
90b53f4c29
Avoid including presym.inc in existing header files
...
Addressed an issue where existing programs linking `libmruby.a` could only
be built by adding `<build-dir>/include` to compiler's include path.
2021-01-11 09:21:07 +09:00
Yukihiro "Matz" Matsumoto
3deb3a7aac
Fix CI failure on Windows environment.
...
`1L` on Windows means `32 bit int`.
2021-01-10 22:52:41 +09:00
Yukihiro "Matz" Matsumoto
e66c6edaba
Fix mixture of inline int declaration in for statement.
2021-01-10 22:52:40 +09:00
Yukihiro "Matz" Matsumoto
80a7655b10
Merge pull request #5271 from shuujii/fix-build-error-in-cross-build-with-presym
...
Fix build error in cross-build with presym
2021-01-10 22:15:52 +09:00
Yukihiro "Matz" Matsumoto
dc5ade3729
Merge pull request #5275 from dearblue/read_irep
...
Replace `tempirep` with `RProc`
2021-01-10 22:13:51 +09:00
Yukihiro "Matz" Matsumoto
596b542720
Merge pull request #5274 from shuujii/fix-the-condition-to-remove-mrbtest-when-rake-clean
...
Fix the condition to remove `mrbtest` when `rake clean`
2021-01-10 22:07:22 +09:00
dearblue
3fc848b545
Replace tempirep with RProc
...
Previously I used the `RData` object to avoid a memory leak in `mrb_irep` if `src/load.c` failed.
ref: https://github.com/mruby/mruby/pull/4250
commit: f1523d2404
Considering that the `RProc` object will be created in the subsequent process, it is preferable to create the `RProc` object from the beginning.
Along with this, the inside of `read_irep()` is replaced with the processing centered on the `RProc` object.
The global function that returns the `mrb_irep` pointer is still provided for compatibility.
2021-01-10 21:41:51 +09:00
Yukihiro "Matz" Matsumoto
e8e28eacc7
Revert "Revert "Simplify full-core.gembox""
...
This reverts commit 37d795dec7 .
This reapplies e20d652 (#4202 ), which is reverted, but its issue was solved
by 1d8456f .
2021-01-10 20:29:49 +09:00
KOBAYASHI Shuji
fe28e8617e
Fix the condition to remove mrbtest when rake clean
2021-01-10 16:28:14 +09:00
dearblue
9877f4ca3c
Revert "Save&restore execution point (pc) in c->cibase->pc; fix #5261 "
...
This reverts commit a0c1e075e3 .
This is because the `mrb_callinfo::pc` has been reorganized, resulting in over-correction.
2021-01-10 13:33:17 +09:00
dearblue
ced89c25ff
Unified pc and err of mrb_callinfo
...
This enhances self-containment.
- Changed the `mrb_callinfo::pc` field to point to itself.
Previously it indicated the return destination of the previous call level.
`mrb_callinfo::pc` will now hold the address to its own `proc->body.irep->iseq`.
- Removed `mrb_callinfo::err` field.
This is because `mrb_callinfo::pc - 1` is semantically the same as the previous `err`.
- The `pc0` and `pc_save` variables in `mrb_vm_exec()` are no longer needed and have been deleted.
- It removes the argument because `cipush()` doesn't need to save the previous `pc`.
2021-01-10 13:23:43 +09:00
dearblue
16baea0677
Changes stackent to stack of mrb_callinfo
...
This enhances self-containment.
Previously `mrb_context::stack` had the current call level stack, but now it owns it.
The `mrb_context::stack` field, which is no longer needed, will be removed.
2021-01-10 13:23:35 +09:00
dearblue
58e9442737
Unified target_class and env of mrb_callinfo
...
If there is `env`, `env->c` means `target_class`.
2021-01-10 13:23:28 +09:00
dearblue
b210cfa34e
Use uint16_t for argc and acc of mrb_callinfo
...
This is because it is enough to express the range up to (-1..255) or (-3..255).
2021-01-10 13:22:28 +09:00
KOBAYASHI Shuji
f80d5ece27
Fix build error in cross-build with presym
...
Fix the following issues.
* https://github.com/mruby/mruby/pull/5220#issuecomment-757204258
* https://github.com/mruby/mruby/pull/5220#issuecomment-757205572
2021-01-10 10:21:45 +09:00
Yukihiro "Matz" Matsumoto
6f6eabf05a
Fix wrong float to rational conversion in 32 bit mode.
2021-01-09 23:39:36 +09:00
Yukihiro "Matz" Matsumoto
f81591ceb6
Detect invalid first byte of UTF-8 char; fix #5269
...
The first byte of UTF-8 character should not be `80..c1`.
2021-01-09 19:09:57 +09:00
Yukihiro "Matz" Matsumoto
62e5247300
Convert float number to rational by decoding mantissa.
2021-01-09 19:09:57 +09:00
Yukihiro "Matz" Matsumoto
92cc6b4996
Introduce mrb_uint which is unsigned integer with size of mrb_int.
2021-01-09 19:09:56 +09:00
Yukihiro "Matz" Matsumoto
12cc959998
Remove khash.h leftovers.
2021-01-09 19:09:56 +09:00
Yukihiro "Matz" Matsumoto
fb4767a3b7
Merge pull request #5270 from shuujii/remove-unnecessary--include-in-generated-files
...
Remove unnecessary `#include` in generated files
2021-01-09 16:34:11 +09:00
KOBAYASHI Shuji
892bf15cd7
Remove unnecessary #include in generated files
2021-01-09 14:50:23 +09:00
Yukihiro "Matz" Matsumoto
69482dbc8e
Merge pull request #5265 from shuujii/reapply-116e128b-because-it-is-back-at-456878ba
...
Reapply 116e128b because it is back at 456878ba
2021-01-08 23:10:49 +09:00
Yukihiro "Matz" Matsumoto
6587269af8
Merge pull request #5267 from shuujii/delay-test-code-build-until-rake-test
...
Delay test code build until `rake test`
2021-01-08 21:14:19 +09:00
Yukihiro "Matz" Matsumoto
a0c1e075e3
Save&restore execution point (pc) in c->cibase->pc; fix #5261
...
`mrb_fiber_resume()` can be called from C; ref #3056
2021-01-08 21:03:41 +09:00
KOBAYASHI Shuji
3a8d7bdf82
Delay test code build until rake test
...
With this change, the test code will not be built unless `rake test` is
run, so there will be almost no side effects even if `enable_test` is
always set (but, gems specified by `add_test_dependency` are included
in `libmruby.a`).
Also added are `test: build` task, which only builds the test code
(including the main code), and `test: run` task, which only runs tests
independent of build. Therefore, the idiom for building in parallel and
not running tests in parallel is `rake -m test:build && rake test:run`.
2021-01-08 20:36:54 +09:00
Yukihiro "Matz" Matsumoto
04561cd999
Merge pull request #5266 from shuujii/stop-immediate-flush-to-stdout-stderr-when-running-in-parallel-on-CI
...
Stop immediate flush to stdout/stderr when running in parallel on CI
2021-01-08 16:37:50 +09:00
KOBAYASHI Shuji
dbe387a9d8
Stop immediate flush to stdout/stderr when running in parallel on CI
...
During parallel execution (build), it is sometimes flushed before line
breaks, and lines are concatenated.
2021-01-08 15:59:08 +09:00
KOBAYASHI Shuji
f7ff4810f0
Reapply 116e128b because it is back at 456878ba
2021-01-08 15:23:50 +09:00
Yukihiro "Matz" Matsumoto
1cc1ade610
Merge pull request #5263 from shuujii/use-namespaces-according-to-Rake-conventions
...
Use namespaces according to Rake conventions
2021-01-07 20:22:35 +09:00
Yukihiro "Matz" Matsumoto
76241a9630
Merge pull request #5264 from shuujii/immediately-flush-output-to-stdout-stderr-so-that-logs-are-not-mixed-on-CI
...
Immediately flush output to stdout/stderr so that logs are not mixed on CI
2021-01-07 20:21:13 +09:00
KOBAYASHI Shuji
35c85cb21f
Immediately flush output to stdout/stderr so that logs are not mixed on CI
...
Set in build configuration to enable on all CI platforms.
2021-01-07 19:46:03 +09:00
KOBAYASHI Shuji
0dfcaaed63
Use namespaces according to Rake conventions
...
Change the Rake task to one that uses namespaces as follows (previous task
names can also be used for compatibility).
| Previous Task | New Task |
|----------------|----------------|
| api_doc | doc:api |
| capi_doc | doc:capi |
| clean_doc | doc:clean |
| clean_api_doc | doc:clean:api |
| clean_capi_doc | doc:clean:capi |
| view_api | doc:view:api |
| view_capi | doc:view:capi |
| gitlab_config | gitlab:config |
| gitlab_dockers | gitlab:dockers |
2021-01-07 17:31:05 +09:00
Yukihiro "Matz" Matsumoto
a435cc94ec
Merge pull request #5262 from shuujii/add-scan-target-functions-for-presym
...
Add scan target functions for presym
2021-01-07 17:12:06 +09:00
KOBAYASHI Shuji
d35cd42dc8
Add scan target functions for presym
...
Add the following functions:
- mrb_intern_cstr
- mrb_define_singleton_method
- mrb_define_class_under
- mrb_define_module_under
2021-01-07 16:38:46 +09:00
Yukihiro "Matz" Matsumoto
ec6f46c05d
Use nint() for implicit cast; ref #5260
2021-01-07 11:49:50 +09:00
Yukihiro "Matz" Matsumoto
7e116b5e8b
Merge pull request #5260 from SeekingMeaning/squiggly-fix-5
...
Fix line continuations with mixed indentation in squiggly heredocs
2021-01-07 11:45:24 +09:00
Yukihiro "Matz" Matsumoto
5e752caf67
Merge pull request #5259 from shuujii/consider-the-case-a-local-variable-name-does-not-become-a-named-presym
...
Consider the case a local variable name does not become a named presym
2021-01-07 10:22:10 +09:00
Seeker
d52c82d648
Add heredoc_push_indented helper function
2021-01-06 16:46:44 -08:00
Seeker
e279528ff3
Fix line continuations with mixed indentation in squiggly heredocs
2021-01-06 16:35:46 -08:00
KOBAYASHI Shuji
b8486d73e2
Consider the case a local variable name does not become a named presym
...
Non-ASCII characters are allowed to local variable names, so they are not
always named presym.
2021-01-06 23:29:45 +09:00
Yukihiro "Matz" Matsumoto
676054c8df
Merge pull request #5258 from shuujii/fix-build-with-enable_cxx_exception
...
Fix build with `enable_cxx_exception`
2021-01-06 19:50:03 +09:00
KOBAYASHI Shuji
90283432a4
Fix build with enable_cxx_exception
2021-01-06 19:03:10 +09:00
Yukihiro "Matz" Matsumoto
01aa2a990f
Specify receivers for gembox methods; ref #5241
2021-01-06 18:10:21 +09:00
Yukihiro "Matz" Matsumoto
aecb3a33e6
Merge pull request #5241 from dearblue/gembox
...
Take advantage of gembox
2021-01-06 18:06:18 +09:00
Yukihiro "Matz" Matsumoto
0d76b90758
Use ~0U instead of ~0 to avoid sign comparison warnings.
2021-01-06 17:15:21 +09:00