2008 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 695207be68 hash.c (mrb_obj_hash_code): expose hash function 2025-06-23 17:07:21 +09:00
Yukihiro "Matz" Matsumoto eb5fbfbb40 class.c: Remove MRB_INLINE_METHOD_CACHE support from mt_tbl
The sorted array binary search implementation no longer uses the inline
cache array, so remove all MRB_INLINE_METHOD_CACHE definitions and
related code.
2025-05-28 08:33:21 +09:00
Yukihiro "Matz" Matsumoto 9fc58852e3 mruby-compiler: removed mrb_state dependency from two functions
- mrb_ccontext_partial_hook
- mrb_ccontext_cleanup_local_variables
2025-05-19 08:00:36 +09:00
Yukihiro "Matz" Matsumoto 9ef2f551b7 mruby-compiler: use new mempool API 2025-05-13 08:13:48 +09:00
Yukihiro "Matz" Matsumoto c2d5a402ba compile.h: change struct mrb_mempool to mrb_mempool
So that compatibility layer can be used without macro definition.
2025-05-12 12:30:15 +09:00
Yukihiro "Matz" Matsumoto 6566099dbb mempool.c: remove mrb_state dependency from mempool library
mempool.h provide compatibility layer so that existing programs does not
need to update (but update recommended anyway, since compatibility layer
takes mrb_state that is not used at all).
2025-05-12 08:26:18 +09:00
Yukihiro "Matz" Matsumoto 5522c94bb3 mruby.h: remove mrb_allocf type
As a result, we removed (already obsoleted) `mrb_open_allocf()', and
made `mrb_open_core()` take no argument. [incompatible changes]
2025-05-10 08:59:18 +09:00
Yukihiro "Matz" Matsumoto 5c71681d82 allocf.c (mrb_basic_alloc_func): remove ud argument 2025-05-10 08:59:18 +09:00
Yukihiro "Matz" Matsumoto c3cc559dfc allocf.c: rename mrb_default_alloc to mrb_basic_alloc_func
Along with removing mrb_state first argument from the function. From
mruby 3.2, this function is *not* the default function, but the entry
point that can be redefined for the application. The function in
`src/allocf.c` is the default *implementation* (using malloc / realloc /
free) of the function.
2025-05-09 21:50:18 +09:00
Yukihiro "Matz" Matsumoto 0bdd529430 mruby.h: remove allocf and allocf_ud from mrb_state
This is preparation for memory allocation restructuring.
2025-05-09 18:13:28 +09:00
Yukihiro "Matz" Matsumoto dbc4768758 mruby/internal.h: rename visibility separation macros; ref #6512 2025-05-08 07:32:36 +09:00
Yukihiro "Matz" Matsumoto c9a36e5d39 mruby/value.h: rename flag check macros; ref #6512 2025-05-08 07:27:30 +09:00
Yukihiro "Matz" Matsumoto 41e91a2ca8 vm.c (mrb_exec_irep): remove recently added separate_module argument
The argument was added in #6512
2025-05-08 07:27:23 +09:00
Yukihiro "Matz" Matsumoto aec8d0c58b Merge branch 'visibility' of github.com:dearblue/mruby into dearblue-visibility 2025-05-07 15:37:08 +09:00
Yukihiro "Matz" Matsumoto 33d9ad6c44 error.c (mrb_exc_get_output): a new function for old inspect format 2025-05-07 12:19:05 +09:00
Yukihiro "Matz" Matsumoto b5ad35d8ef proc.h (MRB_SET_VISIBILITY_FLAGS): rename macro 2025-05-07 12:19:04 +09:00
Yukihiro "Matz" Matsumoto 6c72f8b378 class.c (extend_object): remove method; implement Kernel#extend in C 2025-04-28 10:30:00 +09:00
Yukihiro "Matz" Matsumoto a6ef3a45d1 vm.c (mrb_f_public_send): define #public_send method
The method itself is available when mruby-metaprog is loaded.
2025-04-25 17:39:12 +09:00
Yukihiro "Matz" Matsumoto 8f120971b5 variable.c: merge mrb_vm_const_set to mrb_const_set
Inline vm part to the VM itself.
2025-04-25 16:12:06 +09:00
mimaki 99f5668243 Merge branch 'master' into stable 2025-04-20 13:25:22 +09:00
mimaki a309524d0b Update version and release date. (mruby 3.4.0 (2025-04-20)) 2025-04-20 13:08:22 +09:00
Yukihiro "Matz" Matsumoto ddfe65763e mruby-numeric-ext (int_sqrt): support bigint 2025-04-16 23:08:23 +09:00
Yukihiro "Matz" Matsumoto 118e13d85c variable.c: a new function mrb_mod_const_at()
And mrb_mod_constants() use the new function now.
2025-04-14 22:09:34 +09:00
dearblue 3fd5e1c250 Fixed visibility at method definition
There was a problem with visibility state from proc that straddles a fiber or is independent.

Therefore, it has been changed to give priority to env objects, if any.
Also, added "separate module" flag to block traversal to a higher level env object.

Note that the "separate module" flag is now set when calling blocks with the `mrb_yield_with_class()` function.

fixed https://github.com/mruby/mruby/issues/6494
2025-04-11 21:36:26 +09:00
Yukihiro "Matz" Matsumoto 206eccb828 boxing_word.h: allow 4 byte alignment of object pointers
Only if MRB_WORDBOX_NO_FLOAT_TRUNCATE or MRB_NO_FLOAT is defined.
2025-03-30 23:23:02 +09:00
Yukihiro "Matz" Matsumoto 2ce0606f14 guides/symbol.md: 'punctuation' is uncountable; close #6488
Issue #6488 is addressed by fixing spelling.
2025-03-28 08:22:53 +09:00
dearblue 4e7399d4f4 Remove MRB_ENDIAN_LOHI() that is no longer in use 2025-03-21 21:56:42 +09:00
mimaki 2a435caf79 Update version to 3.4.0RC2. 2025-03-17 16:31:36 +09:00
mimaki 8b65a296db Merge branch 'master' into stable 2025-03-17 15:52:25 +09:00
dearblue 609a5c23b2 Fixed RSTR_SINGLE_BYTE_P() return values to boolean
Incorrectly returned void type when `MRB_UTF8_STRING` definition is not present.
2025-03-12 22:01:37 +09:00
mimaki a2841fd9a8 Update version to 3.4.0RC. 2025-03-10 14:42:59 +09:00
Yukihiro "Matz" Matsumoto 1e36d7662c object.h: rename gccolor to clearer gc_color 2025-03-10 14:23:51 +09:00
Yukihiro "Matz" Matsumoto fb56fecf51 class.h: remove macros no longer used 2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto 889f09f8b7 class.c: move visibility flags from classes/modules to callinfo 2025-03-07 17:17:50 +09:00
Yukihiro "Matz" Matsumoto 37fb59bdac class.h: rename macros for clarity
- MRB_SET_VISIBILITY -> MRB_CLASS_SET_VISIBILITY
- MRB_VISIBILITY -> MRB_CLASS_VISIBILITY
2025-03-07 17:17:49 +09:00
Yukihiro "Matz" Matsumoto 43da490a1e class.c: alias should keep the visibility of the original 2025-03-07 17:17:48 +09:00
Yukihiro "Matz" Matsumoto 6f2409adf3 Revert "proc.h: define visibility flags for RProc"
This reverts commit 7948373c7d2a019b0eed6ca6dfcb4d6e503b75d8.
2025-03-07 17:17:47 +09:00
Yukihiro "Matz" Matsumoto 29cb270ef4 proc.h: define visibility flags for RProc
Visibility status should be store in Procs (that represent scopes), not
classes. Since classes can be reopened or can be accessed recursively.
2025-03-07 17:17:46 +09:00
Yukihiro "Matz" Matsumoto ca20017ac9 class.c: implement mrb_define_private_method() 2025-03-07 17:17:36 +09:00
Yukihiro "Matz" Matsumoto fdf71d8f2d class.c: first step to private methods; #1835
Now each method entry holds visibility information in flag bits.
2025-03-07 17:17:34 +09:00
dearblue b86c220384 Avoid array object creation with “unknown keyword” error
It is sufficient to return the first element.
2025-02-02 21:02:03 +09:00
dearblue a981f5aed7 Add more const qualifier for RProc 2025-01-20 22:25:50 +09:00
Yukihiro "Matz" Matsumoto c18cd60c4b string.h: remove unused flag unset macros 2025-01-12 23:13:27 +09:00
Yukihiro "Matz" Matsumoto 0098654e1f string.h: rename MRB_STR_EMBED_LEN_BITS (use plurality for bit width) 2025-01-12 23:13:26 +09:00
Yukihiro "Matz" Matsumoto 8c184d4566 string.h: move flag definitions for readability 2025-01-12 23:13:26 +09:00
Yukihiro "Matz" Matsumoto e75654a991 string.h (RSTR_SET_TYPE): simplify macro definition 2025-01-12 23:13:26 +09:00
Yukihiro "Matz" Matsumoto 8276143f03 object.h: remove MRB_SET_FROZEN_FLAG/MRB_UNSET_FROZEN_FLAG macros
Simple `o->frozen = 1/0` now works.
2025-01-07 13:56:30 +09:00
Yukihiro "Matz" Matsumoto c11d18e426 object.h: unify MRB_FROZEN_P() and mrb_frozen_p() 2025-01-07 11:24:58 +09:00
Yukihiro "Matz" Matsumoto 21003746df object.h: separate frozen flag to the independent bit-field
So that other flag operation do not break frozen flag.
2025-01-07 07:44:10 +09:00
Yukihiro "Matz" Matsumoto 6f8bfed18e object.h: change gccolor type to unsigned int
I was uncomfortable with the combination of an integer with a size
specification (uint32_t) and a bit field.
2025-01-06 13:56:58 +09:00