Use consistent style [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2022-12-02 23:43:53 +09:00
parent bb0ec7df32
commit f28e79caaa
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
5 changed files with 12 additions and 6 deletions

View File

@ -1565,7 +1565,8 @@ IO_BUFFER_DECLARE_TYPE(F64, double, RB_IO_BUFFER_BIG_ENDIAN, DBL2NUM, NUM2DBL, r
#undef IO_BUFFER_DECLARE_TYPE #undef IO_BUFFER_DECLARE_TYPE
static inline size_t static inline size_t
io_buffer_data_type_size(ID data_type) { io_buffer_data_type_size(ID data_type)
{
#define IO_BUFFER_DATA_TYPE_SIZE(name) if (data_type == RB_IO_BUFFER_DATA_TYPE_##name) return RB_IO_BUFFER_DATA_TYPE_##name##_SIZE; #define IO_BUFFER_DATA_TYPE_SIZE(name) if (data_type == RB_IO_BUFFER_DATA_TYPE_##name) return RB_IO_BUFFER_DATA_TYPE_##name##_SIZE;
IO_BUFFER_DATA_TYPE_SIZE(U8) IO_BUFFER_DATA_TYPE_SIZE(U8)
IO_BUFFER_DATA_TYPE_SIZE(S8) IO_BUFFER_DATA_TYPE_SIZE(S8)

3
iseq.c
View File

@ -103,7 +103,8 @@ compile_data_free(struct iseq_compile_data *compile_data)
} }
static void static void
remove_from_constant_cache(ID id, IC ic) { remove_from_constant_cache(ID id, IC ic)
{
rb_vm_t *vm = GET_VM(); rb_vm_t *vm = GET_VM();
VALUE lookup_result; VALUE lookup_result;
st_data_t ic_data = (st_data_t)ic; st_data_t ic_data = (st_data_t)ic;

View File

@ -114,7 +114,8 @@ MJIT_SYMBOL_EXPORT_BEGIN
shape_id_t rb_rclass_shape_id(VALUE obj); shape_id_t rb_rclass_shape_id(VALUE obj);
MJIT_SYMBOL_EXPORT_END MJIT_SYMBOL_EXPORT_END
static inline shape_id_t RCLASS_SHAPE_ID(VALUE obj) { static inline shape_id_t RCLASS_SHAPE_ID(VALUE obj)
{
return rb_rclass_shape_id(obj); return rb_rclass_shape_id(obj);
} }

View File

@ -3924,7 +3924,8 @@ rb_class_ivar_set(VALUE obj, ID key, VALUE value)
} }
static int static int
tbl_copy_i(st_data_t key, st_data_t val, st_data_t dest) { tbl_copy_i(st_data_t key, st_data_t val, st_data_t dest)
{
rb_class_ivar_set(dest, key, val); rb_class_ivar_set(dest, key, val);
return ST_CONTINUE; return ST_CONTINUE;

View File

@ -1385,12 +1385,14 @@ callable_method_entry_or_negative(VALUE klass, ID mid, VALUE *defined_class_ptr)
// This is exposed for YJIT so that we can make assumptions that methods are // This is exposed for YJIT so that we can make assumptions that methods are
// not defined. // not defined.
const rb_callable_method_entry_t * const rb_callable_method_entry_t *
rb_callable_method_entry_or_negative(VALUE klass, ID mid) { rb_callable_method_entry_or_negative(VALUE klass, ID mid)
{
return callable_method_entry_or_negative(klass, mid, NULL); return callable_method_entry_or_negative(klass, mid, NULL);
} }
static const rb_callable_method_entry_t * static const rb_callable_method_entry_t *
callable_method_entry(VALUE klass, ID mid, VALUE *defined_class_ptr) { callable_method_entry(VALUE klass, ID mid, VALUE *defined_class_ptr)
{
const rb_callable_method_entry_t *cme; const rb_callable_method_entry_t *cme;
cme = callable_method_entry_or_negative(klass, mid, defined_class_ptr); cme = callable_method_entry_or_negative(klass, mid, defined_class_ptr);
return !UNDEFINED_METHOD_ENTRY_P(cme) ? cme : NULL; return !UNDEFINED_METHOD_ENTRY_P(cme) ? cme : NULL;