Age | Commit message (Collapse) | Author |
|
Now that classes fields are delegated to an object with its own
shape_id, we no longer need to mark all classes as TOO_COMPLEX.
Notes:
Merged: https://github.com/ruby/ruby/pull/13595
|
|
The implementation of Namespace#current_details shows warning about
use of snprintf directive arguments (only in gcc environments?).
This method will be useless when the current namespace management
will be updated.
Notes:
Merged: https://github.com/ruby/ruby/pull/13554
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13439
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13307
|
|
../namespace.c: In function ‘current_namespace’:
../namespace.c:221:48: warning: ‘proc_ns’ may be used uninitialized [-Wmaybe-uninitialized]
221 | if (permit_calling_builtin || (proc_ns && NAMESPACE_USER_P(proc_ns)))
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c:204:31: note: ‘proc_ns’ was declared here
204 | const rb_namespace_t *proc_ns;
| ^~~~~~~
In function ‘copy_ext_file’,
inlined from ‘rb_namespace_local_extension’ at ../namespace.c:855:18:
../namespace.c:768:21: warning: ‘written’ may be used uninitialized [-Wmaybe-uninitialized]
768 | wrote = fwrite(buffer+written, 1, read-written, dst);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c: In function ‘rb_namespace_local_extension’:
../namespace.c:748:25: note: ‘written’ was declared here
748 | size_t read, wrote, written;
| ^~~~~~~
In function ‘copy_ext_file’,
inlined from ‘rb_namespace_local_extension’ at ../namespace.c:855:18:
../namespace.c:768:21: warning: ‘read’ may be used uninitialized [-Wmaybe-uninitialized]
768 | wrote = fwrite(buffer+written, 1, read-written, dst);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c: In function ‘rb_namespace_local_extension’:
../namespace.c:748:12: note: ‘read’ was declared here
748 | size_t read, wrote, written;
| ^~~~
|
|
|
|
this object.
https://github.com/tagomoris/ruby/pull/7
RUBY_TYPED_FREE_IMMEDIATELY can be added because namespace_entry_free does no IO nor
things to block.
|
|
```
/opt/rubies/head-namespaces/bin/ruby(sigsegv+0x84) [0x104e897e8]
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x38) [0x18de56de4]
/opt/rubies/head-namespaces/bin/ruby(object_id+0x80) [0x104d7d420]
/opt/rubies/head-namespaces/bin/ruby(object_id+0x80) [0x104d7d420]
/opt/rubies/head-namespaces/bin/ruby(rb_initialize_main_namespace+0xe4) [0x104ddaa20]
/opt/rubies/head-namespaces/bin/ruby(ruby_opt_init+0x120) [0x104e7f524]
/opt/rubies/head-namespaces/bin/ruby(ruby_process_options+0x1370) [0x104e7e31c]
/opt/rubies/head-namespaces/bin/ruby(ruby_options+0xb0) [0x104d69844]
/opt/rubies/head-namespaces/bin/ruby(main+0x64) [0x104ca8d54]
```
I'm not too sure why `rb_obj_id` crashes, but I suspect it's called too
early. Either way I don't think generating an object_id for namespaces
is a good idea. If all we need is a unique number we can do that
for much cheaper.
|
|
|
|
|
|
|
|
To make RClass size smaller, move flags of prime classext readable/writable to:
readable - use ns_classext_tbl is NULL or not (if NULL, it's readable)
writable - use FL_USER2 of RBasic flags
|
|
`rb_define_private_method` performs strict type checking on the function
pointer. As a result, we cannot pass the function a generic signature.
```
/github/workspace/src/namespace.c:1097:72: note: expected 'VALUE (*)(void)' {aka 'long unsigned int (*)(void)'} but argument is of type 'VALUE (*)(int, VALUE *, VALUE)' {aka 'long unsigned int (*)(int, long unsigned int *, long unsigned int)'}
1097 | namespace_define_loader_method(VALUE module, const char *name, VALUE (*func)(ANYARGS), int argc)
| ~~~~~~~~^~~~~~~~~~~~~~
```
This commit defines the method directly to avoid the mismatch error.
|
|
```
namespace.c: In function ‘rb_namespace_available’:
namespace.c:55:1: warning: old-style function definition [-Wold-style-definition]
55 | rb_namespace_available()
| ^~~~~~~~~~~~~~~~~~~~~~
```
|
|
|