diff options
| -rw-r--r-- | .github/workflows/build.yml | 16 | ||||
| -rw-r--r-- | .github/workflows/codeql-analysis.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/lint.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/super-linter.yml | 2 | ||||
| -rw-r--r-- | include/mruby/boxing_nan.h | 2 | ||||
| -rw-r--r-- | src/class.c | 10 | ||||
| -rw-r--r-- | src/object.c | 7 |
7 files changed, 25 insertions, 18 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00141695a..07a24d994 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: gcc steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -25,7 +25,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: clang steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -40,7 +40,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: gcc steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -55,7 +55,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: clang steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -70,7 +70,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: clang steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -85,7 +85,7 @@ jobs: MRUBY_CONFIG: ci/gcc-clang CC: gcc steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Compiler version @@ -105,7 +105,7 @@ jobs: package-dir: C:\cygwin-package cache-version: v1 steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - uses: actions/[email protected] with: path: ${{ env.package-dir }} @@ -145,7 +145,7 @@ jobs: env: MRUBY_CONFIG: ci/msvc steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Ruby version run: ruby -v - name: Build and test diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 28bcb3ae5..184ca54c3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout repository - uses: actions/[email protected] + uses: actions/[email protected] with: # We must fetch at least the immediate parents so that if this is # a pull request then we can checkout the head. diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6c08915c4..51c50faf9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check Out - uses: actions/[email protected] + uses: actions/[email protected] - name: Install run: wget -O - -q https://git.io/misspell | sh -s -- -b . - name: Misspell @@ -17,7 +17,7 @@ jobs: name: Run pre-commit runs-on: ubuntu-latest steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - name: Check merge conflict run: | python -m pip install --upgrade pip diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 043cac9de..df453bdce 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -12,7 +12,7 @@ jobs: name: Lint Code Base runs-on: ubuntu-latest steps: - - uses: actions/[email protected] + - uses: actions/[email protected] - uses: github/[email protected] env: ERROR_ON_MISSING_EXEC_BIT: true diff --git a/include/mruby/boxing_nan.h b/include/mruby/boxing_nan.h index 7f7478420..a28a3e56d 100644 --- a/include/mruby/boxing_nan.h +++ b/include/mruby/boxing_nan.h @@ -92,7 +92,7 @@ mrb_type(mrb_value o) case MRB_NANBOX_TT_SYMBOL: return MRB_TT_SYMBOL; case MRB_NANBOX_TT_MISC: - return (enum mrb_vtype)(o.u >> 8) & 0x1f; + return (enum mrb_vtype)((o.u >> 8) & 0x1f); default: /* never happen */ return MRB_TT_FLOAT; diff --git a/src/class.c b/src/class.c index 1403ed48e..97a37c54a 100644 --- a/src/class.c +++ b/src/class.c @@ -2840,17 +2840,17 @@ static const mrb_code new_iseq[] = { OP_LOADSELF, 4, // OP_LOADSELF R4 OP_SEND, 4, 0, 0, // OP_SEND R4 :allocate n=0 OP_MOVE, 0, 4, // OP_MOVE R0 R4 - OP_MOVE, 5, 1, // OP_MOVE R5 R1 (*) - OP_MOVE, 6, 2, // OP_MOVE R6 R2 (**) - OP_MOVE, 7, 3, // OP_MOVE R7 R3 - OP_SENDB, 4, 1, 255, // OP_SENDB R4 :initialize n=*|nk=* + OP_MOVE, 4, 3, // OP_MOVE R4 R3 (&) + OP_MOVE, 3, 2, // OP_MOVE R3 R2 (**) + OP_MOVE, 2, 1, // OP_MOVE R2 R1 (*) + OP_SSENDB, 1, 1, 255, // OP_SSENDB R1 :initialize n=*|nk=* OP_RETURN, 0 // OP_RETURN R0 }; MRB_PRESYM_DEFINE_VAR_AND_INITER(new_syms, 2, MRB_SYM(allocate), MRB_SYM(initialize)) static const mrb_irep new_irep = { - 3, 6, 0, MRB_IREP_STATIC, + 4, 5, 0, MRB_IREP_STATIC, new_iseq, NULL, new_syms, NULL, NULL, NULL, sizeof(new_iseq), 0, 2, 0, 0, }; diff --git a/src/object.c b/src/object.c index b3c9973bf..8eb6b6b5e 100644 --- a/src/object.c +++ b/src/object.c @@ -14,12 +14,18 @@ MRB_API mrb_bool mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) { +#if defined(MRB_NAN_BOXING) + return v1.u == v2.u; +#elif defined(MRB_NAN_BOXING) + return v1.w == v2.w; +#else /* MRB_NO_BOXING */ if (mrb_type(v1) != mrb_type(v2)) return FALSE; switch (mrb_type(v1)) { case MRB_TT_TRUE: return TRUE; case MRB_TT_FALSE: + return (mrb_fixnum(v1) == mrb_fixnum(v2)); case MRB_TT_INTEGER: return (mrb_integer(v1) == mrb_integer(v2)); case MRB_TT_SYMBOL: @@ -33,6 +39,7 @@ mrb_obj_eq(mrb_state *mrb, mrb_value v1, mrb_value v2) default: return (mrb_ptr(v1) == mrb_ptr(v2)); } +#endif } MRB_API mrb_bool |
