Yukihiro "Matz" Matsumoto
|
f07281a026
|
Revert "object.h: make GC color uint8_t that fits in 3 bits"
The change made the size of mruby data types bigger on Win.
This reverts commit afcf7fc86d.
|
2023-06-03 16:55:58 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
93648fc954
|
gc.c (mrb_env_unshare): fix a write barrier bug
|
2023-06-02 11:00:13 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
9369679e36
|
vm.c: reduce local variables
|
2023-06-01 09:14:39 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
5b61407414
|
class.c (prepare_singleton_class): defer method table allocation
|
2023-06-01 09:13:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0d8545e01b
|
error.c (frozen_error): change specifier from %t to %T
- `%t` prints type (class) of the argument
- `%T` prints real class of the argument, skipping TT_ICLASS, etc.
|
2023-05-31 08:35:54 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
e6c89ef1f9
|
mruby.h: make mrb_check_frozen to a normal function from inline one
|
2023-05-31 08:33:58 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ccdf75c1c2
|
error.c: a new function mrb_check_frozen_value()
|
2023-05-31 08:31:13 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8b39a7825d
|
Reduce unnecessary mrb_obj_ptr() to mrb_check_frozen()
|
2023-05-31 08:29:12 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
afcf7fc86d
|
object.h: make GC color uint8_t that fits in 3 bits
|
2023-05-31 08:27:23 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8873229312
|
codedump.c: fix indentation of OP_SCLASS
|
2023-05-30 16:08:38 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6eedf1065d
|
numeric.c (flo_idiv): add mrb_check_num_exact
|
2023-05-30 08:54:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
795044f82c
|
internal.h: add mrb_check_num_exact prototype to the header
|
2023-05-30 08:54:05 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
e84060a900
|
string.c: rename function str_check_too_big -> str_check_length
|
2023-05-30 08:40:16 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f813b5d1d8
|
string.c (str_new): add string length check
|
2023-05-29 23:18:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
aecaaf011f
|
string.c (mrb_str_resize): refactor string length check
|
2023-05-29 23:18:19 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0a6e1c0ffe
|
class.c (copy_class): copy source flags as well (except frozen flag)
|
2023-05-29 22:59:05 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
c0c4219b25
|
class.c (copy_class): avoid copying method table in some cases
To prevent memory leaks
|
2023-05-29 22:57:59 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
bba2fd84ea
|
class.h: instance type should occupy 5 bits in flags
|
2023-05-29 09:27:08 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
e4e3740688
|
class.c (init_copy): add an assertion
|
2023-05-29 09:26:45 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
a02894afa3
|
small cosmetic changes
|
2023-05-29 09:26:45 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0ffe9b987a
|
class.c (mrb_prepend_module): c should not be MRB_TT_ICLASS
|
2023-05-29 09:26:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6ac10a01e4
|
Merge pull request #6014 from dearblue/setup_debug.1
Fixed visibility of `MRuby::Command::Compiler#setup_debug`
|
2023-05-29 09:26:32 +09:00 |
|
dearblue
|
a7bee69452
|
Fixed visibility of MRuby::Command::Compiler#setup_debug
In #5977 it was incorrectly set to `private`.
|
2023-05-26 21:37:29 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
7f887f1928
|
class.c (mrb_class_initialize): check duplicated initialization
|
2023-05-26 12:48:34 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8914c2318c
|
Merge pull request #6013 from CaptainJet/master
Fix Android toolchain
|
2023-05-26 12:47:08 +09:00 |
|
Robert Rowe
|
fb727a169f
|
Spacing fix
|
2023-05-25 19:47:32 -07:00 |
|
Robert Rowe
|
bcb5674676
|
Update Android building
New minimum SDK. NDK longer supports mips, plain armeabi, nor GCC. Fix tooling.
|
2023-05-25 19:45:14 -07:00 |
|
Yukihiro "Matz" Matsumoto
|
2ad3f0e34b
|
vm.c (mrb_yield_with_class): keep mid of the callee
Otherwise `super` from within blocks may call wrong methods.
|
2023-05-26 11:17:51 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
9040baa270
|
vm.c (mrb_yield_with_class): avoid redundant initialization of mid
|
2023-05-26 11:14:58 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
2b3ecef66c
|
mruby-data/data.c: use mrb_ary_ref instead of direct memory access
Avoid out-of-bound memory access when actual data object size is smaller
than the number of data members.
|
2023-05-25 09:05:03 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
9bc9ff771d
|
mruby-data/data.c (mrb_data_s_def): simplify the code
|
2023-05-25 09:05:03 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
05f4831751
|
mruby-data/data.c (mrb_data_s_def): add member duplication check
|
2023-05-25 09:05:03 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
eeab289f87
|
mruby-data/data.c (mrb_data_ref): avoid out-of-bound access
|
2023-05-25 09:05:02 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
de69190df5
|
mruby-struct/struct.c: need to copy the argument array
Just in case for stack reallocations.
|
2023-05-25 09:05:02 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
e05ac91217
|
mruby-struct/struct.c: update the behavior when actual size differs
Assertions may be false and terminate the whole process when actual size
for struct objects are different.
|
2023-05-25 09:05:02 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f50e40f291
|
mruby-struct/struct.c: use mrb_ary_set to simplify the code
We don't need to do `mrb_struct_modify()` and calling write barriers by
ourselves for the small performance issue.
|
2023-05-25 09:05:02 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
0295e6a688
|
mruby-struct/struct.c (struct_aref_int): update index check
Check should use the number of members, not the actual size of the
struct object, which may be smaller than the declared size.
|
2023-05-25 08:40:46 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8e579e6552
|
mruby-data/data.c (mrb_data_ref): check if reader has no argument
|
2023-05-24 22:45:35 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
ed5fbb5d63
|
mruby-struct.c (mrb_struct_s_def): check duplicate members
|
2023-05-24 22:43:09 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f80192e8ac
|
mruby-struct/struct.c (struct_s_member): avoid break
Direct `return` is more readable, IMO.
|
2023-05-24 17:59:32 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
c2f3f103bb
|
mruby-struct/struct.c (mrb_struct_ref): update the function
- use `num_members`
- ensure the function takes no argument
- avoid out-of-bound access when struct is failed to initialize
|
2023-05-24 17:53:41 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
69d33de527
|
mruby-struct/struct.c (num_members): simplify the code by new argument
|
2023-05-24 17:51:44 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
52fb2f59d8
|
mruby-struct/struct.c (struct_aref_sym): simplify the logic
|
2023-05-24 17:51:03 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
7b7ea70b84
|
mruby-struct/struct.c (mrb_struct_to_h): RSTRUCT_PTR() may be NULL
Especially when you define a member named `initialize`.
|
2023-05-24 17:48:51 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
53de96426a
|
mruby-io/io.c (io_init): File.new should not take blocks
|
2023-05-23 15:34:37 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
67187881c2
|
mruby-io/io.c (io_init_copy): copy flags before io_buf_init()
|
2023-05-23 15:17:13 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
8f745b7728
|
vm.c (OP_ENTER): fix issues by unreferenced kdict and blk
There's short a period where kdict and blk are not pointed from the stack.
|
2023-05-23 14:54:36 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
2f7f797473
|
remove extra spaces before ;
|
2023-05-22 12:05:35 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
6a6c0869dc
|
add a space between for and (
|
2023-05-22 11:58:23 +09:00 |
|
Yukihiro "Matz" Matsumoto
|
f1a3cfbd3b
|
add a space between if and (
|
2023-05-22 11:55:21 +09:00 |
|