Yukihiro "Matz" Matsumoto
8956c5abb5
mruby.h: include mruby/presym.h for all source files
...
Since presym is now mandatory, mruby.h includes presym.h so that
MRB_SYM() macros are available everywhere without explicit include.
Remove redundant #include <mruby/presym.h> from all source files.
Co-authored-by: Claude <noreply@anthropic.com >
2026-03-09 16:50:58 +09:00
Yukihiro "Matz" Matsumoto
07b803e28a
docs: replace xml-style markup with markdown in comments
...
Replace XML-style markup tags in comments with markdown equivalents:
- <code>...</code> to `...` (inline code)
- <tt>...</tt> to `...` (teletype/monospace)
- <i>...</i> to *...* (italics/emphasis)
- +...+ to `...` (parameter/variable references)
Updated 80+ files across core source, headers, mrbgems, and libraries
to use consistent markdown formatting in documentation comments.
Handled edge cases including special characters like <=> operators.
Co-authored-by: Atlassian Rovo Dev
2025-08-14 10:52:49 +09:00
dearblue
c123c49ac4
Improves ObjectSpace.count_objects
...
- Support for `MRB_TT_STRUCT`, `MRB_TT_BREAK` and `MRB_TT_BIGINT`.
- Performs symbol value embedding with `MRB_SYM()`.
2022-09-04 20:53:18 +09:00
KOBAYASHI Shuji
c0fb675526
Reorganize types for ObjectSpace.count_objects
...
#### Addition
- T_COMPLEX
- T_RATIONAL
#### Deletion
- T_FALSE
- T_FREE
- T_TRUE
- T_SYMBOL
- T_UNDEF
2021-03-22 12:24:42 +09:00
Yukihiro "Matz" Matsumoto
17ecf14511
Revert "Minimize the changes in #5277 "
...
This reverts commit dc51d89ac2 .
2021-01-26 10:57:07 +09:00
Yukihiro "Matz" Matsumoto
dc51d89ac2
Minimize the changes in #5277
...
Instead of including `mruby/presym.h` everywhere, we provided the
fallback `mruby/presym.inc` under `include/mruby` directory, and specify
`-I<build-dir>/include` before `-I<top-dir>/include` in `presym.rake`.
So even when someone drops `-I<build-dir>/include` in compiler options,
it just compiles without failure.
2021-01-22 18:38:53 +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
55163a8a0a
Rename MRB_TT_FIXNUM to MRB_TT_INTEGER.
...
We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility.
2020-10-12 16:21:47 +09:00
Yukihiro "Matz" Matsumoto
eddd324979
Add MRB_SYM() for inline symbols.
2020-10-12 16:20:41 +09:00
Yukihiro "Matz" Matsumoto
c69ca2c7f8
Merge pull request #5045 from dearblue/memsize_of
...
Improve `mruby-os-memsize`
2020-07-24 12:02:05 +09:00
Yukihiro "Matz" Matsumoto
b4f4f5968b
ObjectSpace.count_objects to support MRB_TT_ISTRUCT; #5046
2020-07-23 07:10:35 +09:00
dearblue
639703cf01
Remove unnecessory methods in mruby-objectspace; ref #5041
...
The `ObjectSpace#memsize_of` and `ObjectSpace#memsize_of_all` in `mruby-objectspace` ware
migrated to `mruby-os-memsize` mrbgem.
2020-07-21 23:32:30 +09:00
Yukihiro "Matz" Matsumoto
a6f31ad6ce
Avoid accessing obj.tt of mrb_value; #5040
...
The old code compiles only on `MRB_NO_BOXING`.
2020-07-20 06:05:06 +09:00
Yukihiro "Matz" Matsumoto
07b75d927e
Replace 0 by MRB_EACH_OBJ_OK; #5040
2020-07-20 06:04:54 +09:00
Yukihiro "Matz" Matsumoto
71254be076
Skip MRB_TT_FREE and MRB_TT_BREAK in each_object.
2020-07-19 13:11:53 +09:00
Yukihiro "Matz" Matsumoto
1d2c5c12d3
Reorder members of struct os_each_object_data to stop warnings.
...
`mrb_value` may or may not be struct according to configuration.
2020-07-19 13:10:08 +09:00
Yukihiro "Matz" Matsumoto
00337543a5
Should have updated the arg spec for memsize_of&memsize_of_all; #5040
2020-07-19 09:11:16 +09:00
Yukihiro "Matz" Matsumoto
f76defd310
Use c specifier for mrb_get_args.
2020-07-19 07:47:07 +09:00
Yukihiro "Matz" Matsumoto
5b2763821e
Fix memsize_of_all to count all objects if no argument given; #5040
2020-07-19 07:42:35 +09:00
Yukihiro "Matz" Matsumoto
6d073f8d99
Fix memsize_of_all to count memory of subclass instances; #5040
...
`ObjectSpace.memsize_of_all` takes a class and count memory size of all
instances of the class and its subclasses (if any).
2020-07-19 06:57:34 +09:00
Rory O'Connell
ffe8bf6323
Avoid singleton classes with mrb_class_real
2020-07-18 13:55:45 -07:00
Rory OConnell
a79d1ba9ff
Adding memsize_of_all doc
2020-07-17 20:21:23 -07:00
Rory OConnell
fe1ec9afdd
Add ObjectSpace.memsize_of_all
2020-07-17 20:09:44 -07:00
Yukihiro "Matz" Matsumoto
e41f1f5139
Fix indent of compiler conditions; #5032
2020-07-17 12:32:54 +09:00
Yukihiro "Matz" Matsumoto
495c1a377a
Fix memsize_of to count method table size; #5032
...
Also avoid `mrb_funcall` to minimize VM recursion.
2020-07-17 12:31:00 +09:00
Yukihiro "Matz" Matsumoto
9f52bcfca9
Fix memsize_of Fibers; #5032
...
Memory size of a Fiber is calculated by stack size only in CRuby.
2020-07-17 11:50:12 +09:00
Yukihiro "Matz" Matsumoto
a2b8c08a52
Add const to irep pointer in os_memsize_of_irep; #5032
2020-07-17 11:43:55 +09:00
Yukihiro "Matz" Matsumoto
f00657ead7
Remove recursive memsize_of; #5032
...
This is enhancement from CRuby's `memsize_of`. We need to change the
CRuby first for the enhancement.
2020-07-17 11:15:07 +09:00
Yukihiro "Matz" Matsumoto
2e56da5a78
Remove MRB_TT_DATA calculation of memsize_of; #5032
2020-07-17 10:59:43 +09:00
Yukihiro "Matz" Matsumoto
60279b2a8e
Use mrb_test instead of mrb_obj_eq; #5032
2020-07-17 10:53:24 +09:00
Yukihiro "Matz" Matsumoto
c6b8b58e0e
Fix memsize_of for fiber objects; #5032
2020-07-17 10:53:04 +09:00
Yukihiro "Matz" Matsumoto
7f66cf7d66
Fix memsize_of for string objects; #5032
2020-07-17 10:52:59 +09:00
Rory O'Connell
f74d370c15
mrb_ prefix convention
2020-07-15 19:57:22 -07:00
Rory O'Connell
38b0759108
Clarify memsize_of documentation
2020-07-14 23:43:10 -07:00
Rory O'Connell
4d32c671a7
Finishing out memsize_of recursion
2020-07-14 23:30:35 -07:00
Rory OConnell
0e5394638b
Validate ensure stack presense before calculating
2020-07-13 17:05:03 -07:00
Rory OConnell
ad44021591
C89 compiler mode fixes
2020-07-13 16:43:59 -07:00
Rory OConnell
5184263bdc
Calculating sizes of VM components for a Fiber
2020-07-13 16:00:14 -07:00
Rory OConnell
6f945a09b4
Use object iv table size in calculation
2020-07-13 15:59:24 -07:00
Rory OConnell
e7bd7d0eaf
Use size of hash's table in calculation
2020-07-13 15:58:50 -07:00
Rory OConnell
41e3220539
All values use page slot size in calculation
2020-07-13 15:56:27 -07:00
Rory OConnell
37d6628688
fix case scopes and variable names
2020-07-10 00:57:45 -07:00
Rory OConnell
338c8538c9
Initial ObjectSpace.memsize_of implementation
2020-07-09 18:52:31 -07:00
Yukihiro "Matz" Matsumoto
f93dffb5ee
Remove unused MRB_TT_FILE.
2020-06-15 07:47:22 +09:00
dearblue
099a4f3969
Entrust "no block given" error to mrb_get_args()
...
Some error messages will be changed.
2019-09-16 20:29:58 +09:00
Yukihiro "Matz" Matsumoto
8c9e712784
Keyword argument implemented.
2018-07-30 22:58:01 +09:00
Yukihiro "Matz" Matsumoto
62dae09bf6
Allow mrb_objspace_each_objects() to break iteration; ref #3359
2017-04-20 15:44:56 +09:00
Tomasz Dąbrowski
1af9e363f2
Fixes for compiling mruby as C++
2016-11-24 09:28:00 +09:00
Yukihiro "Matz" Matsumoto
5c405dea3d
include changed from by quotes ("") to by brackets (<>); close #3032
2015-11-27 17:48:23 +09:00
furunkel
3ab2f9371e
Clean up GC code
2015-10-19 22:29:43 +02:00