diff --git a/appveyor.yml b/appveyor.yml index 3a063dd78..0621a893c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,39 +4,39 @@ shallow_clone: true environment: matrix: - - job_name: Visual Studio 2022 64bit + - job_name: Visual Studio 2022 64-bit visualcpp: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat appveyor_build_worker_image: Visual Studio 2022 - - job_name: Visual Studio 2019 64bit + - job_name: Visual Studio 2019 64-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat appveyor_build_worker_image: Visual Studio 2019 - - job_name: Visual Studio 2019 32bit + - job_name: Visual Studio 2019 32-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat appveyor_build_worker_image: Visual Studio 2019 - - job_name: Visual Studio 2017 64bit + - job_name: Visual Studio 2017 64-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat appveyor_build_worker_image: Visual Studio 2017 - - job_name: Visual Studio 2017 32bit + - job_name: Visual Studio 2017 32-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat appveyor_build_worker_image: Visual Studio 2017 - - job_name: Visual Studio 2015 64bit + - job_name: Visual Studio 2015 64-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat appveyor_build_worker_image: Visual Studio 2015 machine: x86_amd64 - - job_name: Visual Studio 2015 32bit + - job_name: Visual Studio 2015 32-bit visualcpp: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat appveyor_build_worker_image: Visual Studio 2015 machine: x86 init: - call "%visualcpp%" %machine% - # For using RubyInstaller's Ruby 2.6 64bit + # For using RubyInstaller's Ruby 2.6 64-bit # 2.6 is the highest supported Ruby version across all historical # Visual Studio AppVeyor images. Ruby 2.7 is only on the 2019 image. - set PATH=C:\Ruby26-x64\bin;%PATH% diff --git a/doc/internal/boxing.md b/doc/internal/boxing.md index 0cae591e6..8945f0699 100644 --- a/doc/internal/boxing.md +++ b/doc/internal/boxing.md @@ -29,7 +29,7 @@ If you need full precision for floating-point numbers, define `MRB_WORDBOX_NO_FL ## NaN Boxing -NaN boxing packs the Ruby data in a floating-point numbers, which represent NaN (Not a Number) values. Under IEEE753 definitions every value that exponent is all set are considered as NaN. That means NaN can represent `2^51` values. NaN boxing is a teaching to pack the values in those NaN representation. In theory, 64 bit pointers are too big to fit in NaN, but practically most OS use only 48 bits at most for pointers (except for some OS e.g. Solaris). +NaN boxing packs the Ruby data in a floating-point numbers, which represent NaN (Not a Number) values. Under IEEE753 definitions every value that exponent is all set are considered as NaN. That means NaN can represent `2^51` values. NaN boxing is a teaching to pack the values in those NaN representation. In theory, 64-bit pointers are too big to fit in NaN, but practically most OS use only 48 bits at most for pointers (except for some OS e.g. Solaris). The NaN boxing packing bit patterns are like following: diff --git a/doc/mruby3.0.md b/doc/mruby3.0.md index 9d211abb5..aed22fce2 100644 --- a/doc/mruby3.0.md +++ b/doc/mruby3.0.md @@ -9,7 +9,7 @@ directory. For examples: - `default`: the default configuration - `host-gprof`: compiles with `gprof` for performance tuning -- `host-m32`: compiles in gcc 32bit mode on 64bit platforms +- `host-m32`: compiles in gcc 32-bit mode on 64-bit platforms - `boxing`: compiles all three boxing options - `clang-asan`: compiles with `clang`'s Address Sanitizer @@ -62,7 +62,7 @@ or `MRB_NO_XXX`). - `MRB_USE_FLOAT32` is changed from `MRB_USE_FLOAT` to make sure `float` here means using single-precision float, and not the opposite of `MRB_NO_FLOAT`. - `MRB_USE_METHOD_T_STRUCT` uses `struct` version of `mrb_method_t`. More - portable but consumes more memory. Turned on by default on 32bit platforms. + portable but consumes more memory. Turned on by default on 32-bit platforms. - `MRB_` prefix is added to those without. ## `MRB_NO_BOXING` diff --git a/doc/mruby3.1.md b/doc/mruby3.1.md index 3450a11e1..d64b699da 100644 --- a/doc/mruby3.1.md +++ b/doc/mruby3.1.md @@ -37,7 +37,7 @@ We have added several new build configurations in the `build_config` directory. - `nintendo_switch.rb` - `serenity.rb` - `minimal`: minimal configuration -- `host-f32`: compiles with `mrb_float` as 32 bit `float` +- `host-f32`: compiles with `mrb_float` as 32-bit `float` - `host-nofloat`: compiles with no float configuration - `android_arm64_v8a.rb`: renamed from `android_arm64-v8a.rb` diff --git a/include/mrbconf.h b/include/mrbconf.h index 68ec904f4..52bd17abf 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -18,7 +18,7 @@ #endif #if defined(MRB_32BIT) && defined(MRB_64BIT) -#error Cannot build for 32 and 64 bit architecture at the same time +#error Cannot build for 32 and 64-bit architecture at the same time #endif /* configuration options: */ @@ -73,21 +73,21 @@ /* if defined mruby allocates Float objects in the heap to keep full precision if needed */ //#define MRB_WORDBOX_NO_FLOAT_TRUNCATE -/* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT64; +/* add -DMRB_INT32 to use 32-bit integer for mrb_int; conflict with MRB_INT64; Default for 32-bit CPU mode. */ //#define MRB_INT32 -/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT32; +/* add -DMRB_INT64 to use 64-bit integer for mrb_int; conflict with MRB_INT32; Default for 64-bit CPU mode (unless using MRB_NAN_BOXING). */ //#define MRB_INT64 /* if no specific integer type is chosen */ #if !defined(MRB_INT32) && !defined(MRB_INT64) # if defined(MRB_64BIT) && !defined(MRB_NAN_BOXING) -/* Use 64bit integers on 64bit architecture (without MRB_NAN_BOXING) */ +/* Use 64-bit integers on 64-bit architecture (without MRB_NAN_BOXING) */ # define MRB_INT64 # else -/* Otherwise use 32bit integers */ +/* Otherwise use 32-bit integers */ # define MRB_INT32 # endif #endif diff --git a/include/mruby/boxing_word.h b/include/mruby/boxing_word.h index b39307e33..80736ad18 100644 --- a/include/mruby/boxing_word.h +++ b/include/mruby/boxing_word.h @@ -80,7 +80,7 @@ enum mrb_special_consts { /* * mrb_value representation: * - * 64bit word with inline float: + * 64-bit word with inline float: * nil : ...0000 0000 (all bits are 0) * false : ...0000 0100 (mrb_fixnum(v) != 0) * true : ...0000 1100 @@ -90,7 +90,7 @@ enum mrb_special_consts { * float : ...FFFF FF10 (51 bit significands; require MRB_64BIT) * object: ...PPPP P000 * - * 32bit word with inline float: + * 32-bit word with inline float: * nil : ...0000 0000 (all bits are 0) * false : ...0000 0100 (mrb_fixnum(v) != 0) * true : ...0000 1100 diff --git a/include/mruby/irep.h b/include/mruby/irep.h index 580db1d9c..20a7772b7 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -18,8 +18,8 @@ MRB_BEGIN_DECL enum irep_pool_type { IREP_TT_STR = 0, /* string (need free) */ IREP_TT_SSTR = 2, /* string (static) */ - IREP_TT_INT32 = 1, /* 32bit integer */ - IREP_TT_INT64 = 3, /* 64bit integer */ + IREP_TT_INT32 = 1, /* 32-bit integer */ + IREP_TT_INT64 = 3, /* 64-bit integer */ IREP_TT_BIGINT = 7, /* big integer (not yet supported) */ IREP_TT_FLOAT = 5, /* float (double/float) */ }; diff --git a/mrbgems/mruby-test-inline-struct/test/inline.rb b/mrbgems/mruby-test-inline-struct/test/inline.rb index f959a17c4..d8d83919f 100644 --- a/mrbgems/mruby-test-inline-struct/test/inline.rb +++ b/mrbgems/mruby-test-inline-struct/test/inline.rb @@ -98,21 +98,21 @@ end # 64-bit mode if InlineStructTest.length == 24 - assert('InlineStructTest length [64 bit]') do + assert('InlineStructTest length [64-bit]') do assert_equal InlineStructTest.length, 3 * 8 end end # 32-bit mode if InlineStructTest.length == 12 - assert('InlineStructTest length [32 bit]') do + assert('InlineStructTest length [32-bit]') do assert_equal InlineStructTest.length, 3 * 4 end end # 16-bit mode if InlineStructTest.length == 6 - assert('InlineStructTest length [16 bit]') do + assert('InlineStructTest length [16-bit]') do assert_equal InlineStructTest.length, 3 * 2 end end diff --git a/src/dump.c b/src/dump.c index 8be13829e..031046d45 100644 --- a/src/dump.c +++ b/src/dump.c @@ -119,7 +119,7 @@ get_pool_block_size(mrb_state *mrb, const mrb_irep *irep) /* fall through */ #endif case IREP_TT_INT32: - size += 4; /* 32bits = 4bytes */ + size += 4; /* 32 bits = 4 bytes */ break; case IREP_TT_BIGINT: diff --git a/src/string.c b/src/string.c index 2a44cb8be..8b8fcdfed 100644 --- a/src/string.c +++ b/src/string.c @@ -1795,7 +1795,7 @@ mrb_str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len) } /* - * 32 bit magic FNV-0 and FNV-1 prime + * 32-bit magic FNV-0 and FNV-1 prime b */ #define FNV_32_PRIME ((uint32_t)0x01000193) #define FNV1_32_INIT ((uint32_t)0x811c9dc5) @@ -1809,7 +1809,7 @@ mrb_byte_hash_step(const uint8_t *s, mrb_int len, uint32_t hval) * FNV-1 hash each octet in the buffer */ while (s < send) { - /* multiply by the 32 bit FNV magic prime mod 2^32 */ + /* multiply by the 32-bit FNV magic prime mod 2^32 */ #if defined(NO_FNV_GCC_OPTIMIZATION) hval *= FNV_32_PRIME; #else