diff options
50 files changed, 4259 insertions, 432 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..8f4179232 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,3214 @@ +--- +stages: +- pretest +- test +pretest: + stage: pretest + image: registry.gitlab.com/dabroz/mruby:gcc47_0.1 + tags: + - linux + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + script: "./minirake all test" +Test gcc-4.7 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.7 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc47_0.7 + variables: + CC: gcc-4.7 + CXX: g++-4.7 + LD: gcc-4.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.8 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc48_0.7 + variables: + CC: gcc-4.8 + CXX: g++-4.8 + LD: gcc-4.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-4.9 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc49_0.7 + variables: + CC: gcc-4.9 + CXX: g++-4.9 + LD: gcc-4.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-5 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-5 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc5_0.7 + variables: + CC: gcc-5 + CXX: g++-5 + LD: gcc-5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test gcc-6 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test gcc-6 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:gcc6_0.7 + variables: + CC: gcc-6 + CXX: g++-6 + LD: gcc-6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.5 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.5 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang35_0.7 + variables: + CC: clang-3.5 + CXX: clang++-3.5 + LD: clang-3.5 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.6 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.6 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang36_0.7 + variables: + CC: clang-3.6 + CXX: clang++-3.6 + LD: clang-3.6 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.7 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.7 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang37_0.7 + variables: + CC: clang-3.7 + CXX: clang++-3.7 + LD: clang-3.7 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.8 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.8 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang38_0.7 + variables: + CC: clang-3.8 + CXX: clang++-3.8 + LD: clang-3.8 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 32bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 32bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-m32 -DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_UTF8_STRING=1" + LDFLAGS: "-m32" + script: env; ./minirake --verbose all test +Test clang-3.9 64bit: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int16_nan: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int16_nan_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT16=1 -DMRB_NAN_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float_int16: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float_int16_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT16=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float_int64: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test +Test clang-3.9 64bit_float_int64_utf8: + stage: test + image: registry.gitlab.com/dabroz/mruby:clang39_0.7 + variables: + CC: clang-3.9 + CXX: clang++-3.9 + LD: clang-3.9 + CFLAGS: "-DMRB_USE_FLOAT=1 -DMRB_INT64=1 -DMRB_WORD_BOXING=1 -DMRB_UTF8_STRING=1" + LDFLAGS: '' + script: env; ./minirake --verbose all test @@ -28,6 +28,8 @@ load "#{MRUBY_ROOT}/tasks/libmruby.rake" load "#{MRUBY_ROOT}/tasks/benchmark.rake" +load "#{MRUBY_ROOT}/tasks/gitlab.rake" + ############################## # generic build targets, rules task :default => :all diff --git a/doc/guides/compile.md b/doc/guides/compile.md index d07b4f65f..2aaf6f1fe 100644 --- a/doc/guides/compile.md +++ b/doc/guides/compile.md @@ -241,25 +241,32 @@ conf.enable_bintest ### C++ ABI -mruby can use C++ exception to raise exception internally. -It is called C++ ABI mode. -By using C++ exception it can release C++ stack object correctly. -Whenever you mix C++ code C++ ABI mode would be enabled automatically. -If you need to enable C++ ABI mode explicitly add the following: +By default, mruby uses setjmp/longjmp to implement its +exceptions. But it doesn't release C++ stack object +correctly. To support mrbgems written in C++, mruby can be +configured to use C++ exception. + +There are two levels of C++ exception handling. The one is +```enable_cxx_exception``` that enables C++ exception, but +uses C ABI. The other is ```enable_cxx_abi``` where all +files are compiled by C++ compiler. + +When you mix C++ code, C++ exception would be enabled automatically. +If you need to enable C++ exception explicitly add the following: ```ruby -conf.enable_cxx_abi +conf.enable_cxx_exception ``` #### C++ exception disabling. -If you need to force C++ exception disable -(For example using a compiler option to disable C++ exception) -add following: +If your compiler does not support C++ and you want to ensure +you don't use mrbgem written in C++, you can explicitly disable +C++ exception, add following: ```ruby conf.disable_cxx_exception ``` - -Note that it must be called before ```enable_cxx_abi``` or ```gem``` method. +and you will get an error when you try to use C++ gem. +Note that it must be called before ```enable_cxx_exception``` or ```gem``` method. ### Debugging mode diff --git a/examples/targets/build_config_android_arm64-v8a.rb b/examples/targets/build_config_android_arm64-v8a.rb new file mode 100644 index 000000000..6188c13ec --- /dev/null +++ b/examples/targets/build_config_android_arm64-v8a.rb @@ -0,0 +1,26 @@ +MRuby::Build.new do |conf| + + # Gets set by the VS command prompts. + if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] + toolchain :visualcpp + else + toolchain :gcc + end + + enable_debug + + # include the default GEMs + conf.gembox 'default' +end + +# Requires Android NDK r13 or later. +MRuby::CrossBuild.new('android-arm64-v8a') do |conf| + params = { + :arch => 'arm64-v8a', + :platform => 'android-24', + :toolchain => :clang, + } + toolchain :android, params + + conf.gembox 'default' +end diff --git a/examples/targets/build_config_android_armeabi.rb b/examples/targets/build_config_android_armeabi.rb new file mode 100644 index 000000000..b7eb33a92 --- /dev/null +++ b/examples/targets/build_config_android_armeabi.rb @@ -0,0 +1,26 @@ +MRuby::Build.new do |conf| + + # Gets set by the VS command prompts. + if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] + toolchain :visualcpp + else + toolchain :gcc + end + + enable_debug + + # include the default GEMs + conf.gembox 'default' +end + +# Requires Android NDK r13 or later. +MRuby::CrossBuild.new('android-armeabi') do |conf| + params = { + :arch => 'armeabi', + :platform => 'android-24', + :toolchain => :clang, + } + toolchain :android, params + + conf.gembox 'default' +end diff --git a/examples/targets/build_config_android_armeabi_v7a_neon_hard.rb b/examples/targets/build_config_android_armeabi_v7a_neon_hard.rb new file mode 100644 index 000000000..3788bba7f --- /dev/null +++ b/examples/targets/build_config_android_armeabi_v7a_neon_hard.rb @@ -0,0 +1,28 @@ +MRuby::Build.new do |conf| + + # Gets set by the VS command prompts. + if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] + toolchain :visualcpp + else + toolchain :gcc + end + + enable_debug + + # include the default GEMs + conf.gembox 'default' +end + +# Requires Android NDK r13 or later. +MRuby::CrossBuild.new('android-armeabi-v7a-neon-hard') do |conf| + params = { + :arch => 'armeabi-v7a', + :mfpu => 'neon', + :mfloat_abi => 'hard', + :platform => 'android-24', + :toolchain => :clang, + } + toolchain :android, params + + conf.gembox 'default' +end diff --git a/include/mruby.h b/include/mruby.h index 99d06146f..8adce289b 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -221,6 +221,7 @@ typedef struct mrb_state { struct RClass *eException_class; struct RClass *eStandardError_class; struct RObject *nomem_err; /* pre-allocated NoMemoryError */ + struct RObject *stack_err; /* pre-allocated SysStackError */ #ifdef MRB_GC_FIXED_ARENA struct RObject *arena_err; /* pre-allocated arena overfow error */ #endif @@ -1110,7 +1111,6 @@ MRB_API void mrb_print_error(mrb_state *mrb); #define E_SYNTAX_ERROR (mrb_exc_get(mrb, "SyntaxError")) #define E_LOCALJUMP_ERROR (mrb_exc_get(mrb, "LocalJumpError")) #define E_REGEXP_ERROR (mrb_exc_get(mrb, "RegexpError")) -#define E_SYSSTACK_ERROR (mrb_exc_get(mrb, "SystemStackError")) #define E_NOTIMP_ERROR (mrb_exc_get(mrb, "NotImplementedError")) #define E_FLOATDOMAIN_ERROR (mrb_exc_get(mrb, "FloatDomainError")) @@ -1147,6 +1147,7 @@ MRB_API mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id); MRB_API mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid); MRB_API mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c); +MRB_API mrb_bool mrb_func_basic_p(mrb_state *mrb, mrb_value obj, mrb_sym mid, mrb_func_t func); /* diff --git a/include/mruby/common.h b/include/mruby/common.h index 338044c2f..160639922 100644 --- a/include/mruby/common.h +++ b/include/mruby/common.h @@ -9,7 +9,7 @@ #ifdef __cplusplus -#ifdef MRB_ENABLE_CXX_EXCEPTION +#ifdef MRB_ENABLE_CXX_ABI #define MRB_BEGIN_DECL #define MRB_END_DECL #else diff --git a/include/mruby/numeric.h b/include/mruby/numeric.h index e4086487e..36489b1ce 100644 --- a/include/mruby/numeric.h +++ b/include/mruby/numeric.h @@ -42,6 +42,16 @@ mrb_value mrb_num_div(mrb_state *mrb, mrb_value x, mrb_value y); # define MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS #endif +// Clang 3.8 and 3.9 have problem compiling mruby in 32-bit mode, when MRB_INT64 is set +// because of missing __mulodi4 and similar functions in its runtime. We need to use custom +// implementation for them. +#ifdef MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS +#if defined(__clang__) && (__clang_major__ == 3) && (__clang_minor__ >= 8) && \ + defined(MRB_32BIT) && defined(MRB_INT64) +#undef MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS +#endif +#endif + #ifdef MRB_HAVE_TYPE_GENERIC_CHECKED_ARITHMETIC_BUILTINS #ifndef MRB_WORD_BOXING diff --git a/include/mruby/opcode.h b/include/mruby/opcode.h index 9dfa7f75d..9a5116275 100644 --- a/include/mruby/opcode.h +++ b/include/mruby/opcode.h @@ -82,7 +82,8 @@ enum { OP_JMPIF,/* A sBx if R(A) pc+=sBx */ OP_JMPNOT,/* A sBx if !R(A) pc+=sBx */ OP_ONERR,/* sBx rescue_push(pc+sBx) */ - OP_RESCUE,/* A clear(exc); R(A) := exception (ignore when A=0) */ + OP_RESCUE,/* A B C if A (if C exc=R(A) else R(A) := exc); + if B R(B) := exc.isa?(R(B)); clear(exc) */ OP_POPERR,/* A A.times{rescue_pop()} */ OP_RAISE,/* A raise(R(A)) */ OP_EPUSH,/* Bx ensure_push(SEQ[Bx]) */ diff --git a/include/mruby/throw.h b/include/mruby/throw.h index 010793027..5d3d214e7 100644 --- a/include/mruby/throw.h +++ b/include/mruby/throw.h @@ -7,8 +7,10 @@ #ifndef MRB_THROW_H #define MRB_THROW_H -#if defined(MRB_ENABLE_CXX_EXCEPTION) && !defined(__cplusplus) -#error Trying to use C++ exception handling in C code +#if defined(MRB_ENABLE_CXX_ABI) +# if !defined(__cplusplus) +# error Trying to use C++ exception handling in C code +# endif #endif #if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus) diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c index 218aeda90..27f27a05a 100644 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c @@ -43,7 +43,7 @@ check_lineno( mrb_irep_debug_info_file *info_file, uint16_t lineno ) } static int32_t -get_break_index( mrb_debug_context *dbg, int32_t bpno ) +get_break_index( mrb_debug_context *dbg, uint32_t bpno ) { uint32_t i; int32_t index; @@ -296,7 +296,7 @@ mrb_debug_get_break_all( mrb_state *mrb, mrb_debug_context *dbg, uint32_t size, int32_t mrb_debug_get_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno, mrb_debug_breakpoint *bp ) { - uint32_t index; + int32_t index; if((mrb == NULL) || (dbg == NULL) || (bp == NULL)) { return MRB_DEBUG_INVALID_ARGUMENT; diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c index 1c77d1ef8..33e9575bf 100644 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c @@ -71,7 +71,7 @@ dirname(mrb_state *mrb, const char *path) } p = strrchr(path, '/'); - len = p != NULL ? p - path : strlen(path); + len = p != NULL ? (size_t)(p - path) : strlen(path); dir = mrb_malloc(mrb, len + 1); strncpy(dir, path, len); diff --git a/mrbgems/mruby-bin-mruby/bintest/mruby.rb b/mrbgems/mruby-bin-mruby/bintest/mruby.rb index 72ac6586d..b6b090185 100644 --- a/mrbgems/mruby-bin-mruby/bintest/mruby.rb +++ b/mrbgems/mruby-bin-mruby/bintest/mruby.rb @@ -2,9 +2,9 @@ require 'tempfile' assert('regression for #1564') do o = `#{cmd('mruby')} -e #{shellquote('<<')} 2>&1` - assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n" + assert_include o, "-e:1:2: syntax error" o = `#{cmd('mruby')} -e #{shellquote('<<-')} 2>&1` - assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n" + assert_include o, "-e:1:3: syntax error" end assert('regression for #1572') do diff --git a/mrbgems/mruby-bin-mruby/mrbgem.rake b/mrbgems/mruby-bin-mruby/mrbgem.rake index ba7fad1fa..243b413eb 100644 --- a/mrbgems/mruby-bin-mruby/mrbgem.rake +++ b/mrbgems/mruby-bin-mruby/mrbgem.rake @@ -4,4 +4,10 @@ MRuby::Gem::Specification.new('mruby-bin-mruby') do |spec| spec.summary = 'mruby command' spec.bins = %w(mruby) spec.add_dependency('mruby-compiler', :core => 'mruby-compiler') + spec.add_dependency('mruby-error', :core => 'mruby-error') + + if build.cxx_exception_enabled? + @objs << build.compile_as_cxx("#{spec.dir}/tools/mruby/mruby.c", "#{spec.build_dir}/tools/mruby/mruby.cxx") + @objs.delete_if { |v| v == objfile("#{spec.build_dir}/tools/mruby/mruby") } + end end diff --git a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c index d10535140..d0e5dc8dc 100644 --- a/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +++ b/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c @@ -6,7 +6,6 @@ #include <mruby/compile.h> #include <mruby/dump.h> #include <mruby/variable.h> -#include <mruby/throw.h> #ifdef MRB_DISABLE_STDIO static void @@ -177,8 +176,6 @@ main(int argc, char **argv) mrbc_context *c; mrb_value v; mrb_sym zero_sym; - struct mrb_jmpbuf c_jmp; - int ai; if (mrb == NULL) { fputs("Invalid mrb_state, exiting mruby\n", stderr); @@ -191,10 +188,8 @@ main(int argc, char **argv) usage(argv[0]); return n; } - - ai = mrb_gc_arena_save(mrb); - MRB_TRY(&c_jmp) { - mrb->jmp = &c_jmp; + else { + int ai = mrb_gc_arena_save(mrb); ARGV = mrb_ary_new_capa(mrb, args.argc); for (i = 0; i < args.argc; i++) { char* utf8 = mrb_utf8_from_locale(args.argv[i], -1); @@ -250,9 +245,6 @@ main(int argc, char **argv) printf("Syntax OK\n"); } } - MRB_CATCH(&c_jmp) { /* error */ - } - MRB_END_EXC(&c_jmp); cleanup(mrb, &args); return n == 0 ? EXIT_SUCCESS : EXIT_FAILURE; diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 778b6fe0f..dbf9dcd39 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -863,6 +863,7 @@ gen_call(codegen_scope *s, node *tree, mrb_sym name, int sp, int val, int safe) genop(s, MKOP_A(OP_LOADNIL, cursp())); push(); genop(s, MKOP_AB(OP_MOVE, cursp(), recv)); + push(); pop(); /* space for a block */ pop(); idx = new_msym(s, mrb_intern_lit(s->mrb, "==")); genop(s, MKOP_ABC(OP_EQ, cursp(), idx, 1)); @@ -1221,6 +1222,22 @@ readint_mrb_int(codegen_scope *s, const char *p, int base, mrb_bool neg, mrb_boo } static void +gen_retval(codegen_scope *s, node *tree) +{ + if ((intptr_t)tree->car == NODE_SPLAT) { + genop(s, MKOP_ABC(OP_ARRAY, cursp(), cursp(), 0)); + push(); + codegen(s, tree, VAL); + pop(); pop(); + genop(s, MKOP_AB(OP_ARYCAT, cursp(), cursp()+1)); + } + else { + codegen(s, tree, VAL); + pop(); + } +} + +static void codegen(codegen_scope *s, node *tree, int val) { int nt; @@ -1276,8 +1293,8 @@ codegen(codegen_scope *s, node *tree, int val) if (tree->car) { node *n2 = tree->car; int exc = cursp(); + int cnt = 0; - genop(s, MKOP_A(OP_RESCUE, exc)); push(); while (n2) { node *n3 = n2->car; @@ -1286,20 +1303,26 @@ codegen(codegen_scope *s, node *tree, int val) if (pos1) dispatch(s, pos1); pos2 = 0; do { - if (n4) { - codegen(s, n4->car, VAL); - } - else { - genop(s, MKOP_ABx(OP_GETCONST, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "StandardError")))); - push(); - } - genop(s, MKOP_AB(OP_MOVE, cursp(), exc)); - pop(); if (n4 && n4->car && (intptr_t)n4->car->car == NODE_SPLAT) { + if (cnt == 0) { + genop(s, MKOP_ABC(OP_RESCUE, exc, 0, cnt)); cnt = 1; + } + genop(s, MKOP_AB(OP_MOVE, cursp(), exc)); + push(); + codegen(s, n4->car, VAL); + pop_n(2); genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "__case_eqq")), 1)); } else { - genop(s, MKOP_ABC(OP_SEND, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "===")), 1)); + if (n4) { + codegen(s, n4->car, VAL); + } + else { + genop(s, MKOP_ABx(OP_GETCONST, cursp(), new_msym(s, mrb_intern_lit(s->mrb, "StandardError")))); + push(); + } + pop(); + genop(s, MKOP_ABC(OP_RESCUE, exc, cursp(), cnt)); cnt = 1; } tmp = genop(s, MKOP_AsBx(OP_JMPIF, cursp(), pos2)); pos2 = tmp; @@ -1344,7 +1367,9 @@ codegen(codegen_scope *s, node *tree, int val) break; case NODE_ENSURE: - { + if (!tree->cdr || !tree->cdr->cdr || + ((intptr_t)tree->cdr->cdr->car == NODE_BEGIN && + tree->cdr->cdr->cdr)) { int idx; int epush = s->pc; @@ -1356,6 +1381,9 @@ codegen(codegen_scope *s, node *tree, int val) s->ensure_level--; genop_peep(s, MKOP_A(OP_EPOP, 1), NOVAL); } + else { /* empty ensure ignored */ + codegen(s, tree->car, val); + } break; case NODE_LAMBDA: @@ -1766,7 +1794,7 @@ codegen(codegen_scope *s, node *tree, int val) genop(s, MKOP_A(OP_POPERR, 1)); noexc = genop(s, MKOP_Bx(OP_JMP, 0)); dispatch(s, onerr); - genop(s, MKOP_A(OP_RESCUE, exc)); + genop(s, MKOP_ABC(OP_RESCUE, exc, 0, 0)); genop(s, MKOP_A(OP_LOADF, exc)); dispatch(s, noexc); loop_pop(s, NOVAL); @@ -1792,6 +1820,8 @@ codegen(codegen_scope *s, node *tree, int val) for (i=0; i<nargs; i++) { genop(s, MKOP_AB(OP_MOVE, cursp()+i+1, base+i+1)); } + push_n(nargs+1); + pop_n(nargs+1); callargs = nargs; } else { @@ -1965,8 +1995,7 @@ codegen(codegen_scope *s, node *tree, int val) case NODE_RETURN: if (tree) { - codegen(s, tree, VAL); - pop(); + gen_retval(s, tree); } else { genop(s, MKOP_A(OP_LOADNIL, cursp())); @@ -2038,7 +2067,7 @@ codegen(codegen_scope *s, node *tree, int val) break; case NODE_REDO: - if (!s->loop) { + if (!s->loop || s->loop->type == LOOP_BEGIN || s->loop->type == LOOP_RESCUE) { raise_error(s, "unexpected redo"); } else { @@ -2473,16 +2502,23 @@ codegen(codegen_scope *s, node *tree, int val) pop(); genop_peep(s, MKOP_AB(OP_STRCAT, cursp(), cursp()+1), VAL); } - if (n->cdr) { - char *p2 = (char*)n->cdr; + if (n->cdr->car) { + char *p2 = (char*)n->cdr->car; push(); off = new_lit(s, mrb_str_new_cstr(s->mrb, p2)); genop(s, MKOP_ABx(OP_STRING, cursp(), off)); argc++; - pop(); } - pop(); + if (n->cdr->cdr) { + char *p2 = (char*)n->cdr->cdr; + + push(); + off = new_lit(s, mrb_str_new_cstr(s->mrb, p2)); + genop(s, MKOP_ABx(OP_STRING, cursp(), off)); + argc++; + } + pop_n(argc); sym = new_sym(s, mrb_intern_lit(s->mrb, "compile")); genop(s, MKOP_ABC(OP_SEND, cursp(), sym, argc)); mrb_gc_arena_restore(s->mrb, ai); @@ -2886,8 +2922,7 @@ loop_break(codegen_scope *s, node *tree) struct loopinfo *loop; if (tree) { - codegen(s, tree, VAL); - pop(); + gen_retval(s, tree); } loop = s->loop; diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index f8e4eb72f..306036275 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -768,14 +768,14 @@ new_dsym(parser_state *p, node *a) return cons((node*)NODE_DSYM, new_dstr(p, a)); } -/* (:str . (a . a)) */ +/* (:regx . (s . (opt . enc))) */ static node* new_regx(parser_state *p, const char *p1, const char* p2, const char* p3) { return cons((node*)NODE_REGX, cons((node*)p1, cons((node*)p2, (node*)p3))); } -/* (:dregx . a) */ +/* (:dregx . (a . b)) */ static node* new_dregx(parser_state *p, node *a, node *b) { @@ -2936,10 +2936,11 @@ var_ref : variable } | keyword__FILE__ { - if (!p->filename) { - p->filename = "(null)"; + const char *fn = p->filename; + if (!fn) { + fn = "(null)"; } - $$ = new_str(p, p->filename, strlen(p->filename)); + $$ = new_str(p, fn, strlen(fn)); } | keyword__LINE__ { @@ -3327,7 +3328,7 @@ none : /* none */ } ; %% -#define yylval (*((YYSTYPE*)(p->ylval))) +#define pylval (*((YYSTYPE*)(p->ylval))) static void yyerror(parser_state *p, const char *s) @@ -3962,7 +3963,7 @@ parse_string(parser_state *p) yyerror(p, buf); return 0; } - yylval.nd = new_str(p, tok(p), toklen(p)); + pylval.nd = new_str(p, tok(p), toklen(p)); return tHD_STRING_MID; } if (c < 0) { @@ -4035,7 +4036,7 @@ parse_string(parser_state *p) tokfix(p); p->lstate = EXPR_BEG; p->cmd_start = TRUE; - yylval.nd = new_str(p, tok(p), toklen(p)); + pylval.nd = new_str(p, tok(p), toklen(p)); if (hinf) { hinf->line_head = FALSE; return tHD_STRING_PART; @@ -4065,10 +4066,14 @@ parse_string(parser_state *p) else { pushback(p, c); tokfix(p); - yylval.nd = new_str(p, tok(p), toklen(p)); + pylval.nd = new_str(p, tok(p), toklen(p)); return tSTRING_MID; } } + if (c == '\n') { + p->lineno++; + p->column = 0; + } tokadd(p, c); } @@ -4077,7 +4082,7 @@ parse_string(parser_state *p) end_strterm(p); if (type & STR_FUNC_XQUOTE) { - yylval.nd = new_xstr(p, tok(p), toklen(p)); + pylval.nd = new_xstr(p, tok(p), toklen(p)); return tXSTRING; } @@ -4127,11 +4132,11 @@ parse_string(parser_state *p) } else { encp = NULL; } - yylval.nd = new_regx(p, s, dup, encp); + pylval.nd = new_regx(p, s, dup, encp); return tREGEXP; } - yylval.nd = new_str(p, tok(p), toklen(p)); + pylval.nd = new_str(p, tok(p), toklen(p)); if (IS_LABEL_POSSIBLE()) { if (IS_LABEL_SUFFIX(0)) { p->lstate = EXPR_BEG; @@ -4209,7 +4214,7 @@ heredoc_identifier(parser_state *p) p->heredocs_from_nextline = push(p->heredocs_from_nextline, newnode); p->lstate = EXPR_END; - yylval.nd = newnode; + pylval.nd = newnode; return tHEREDOC_BEG; } @@ -4313,7 +4318,7 @@ parser_yylex(parser_state *p) case '*': if ((c = nextc(p)) == '*') { if ((c = nextc(p)) == '=') { - yylval.id = intern("**",2); + pylval.id = intern("**",2); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4322,7 +4327,7 @@ parser_yylex(parser_state *p) } else { if (c == '=') { - yylval.id = intern_c('*'); + pylval.id = intern_c('*'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4438,7 +4443,7 @@ parser_yylex(parser_state *p) } if (c == '<') { if ((c = nextc(p)) == '=') { - yylval.id = intern("<<",2); + pylval.id = intern("<<",2); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4460,7 +4465,7 @@ parser_yylex(parser_state *p) } if (c == '>') { if ((c = nextc(p)) == '=') { - yylval.id = intern(">>",2); + pylval.id = intern(">>",2); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4557,7 +4562,7 @@ parser_yylex(parser_state *p) tokadd(p, c); } tokfix(p); - yylval.nd = new_str(p, tok(p), toklen(p)); + pylval.nd = new_str(p, tok(p), toklen(p)); p->lstate = EXPR_END; return tCHAR; @@ -4565,7 +4570,7 @@ parser_yylex(parser_state *p) if ((c = nextc(p)) == '&') { p->lstate = EXPR_BEG; if ((c = nextc(p)) == '=') { - yylval.id = intern("&&",2); + pylval.id = intern("&&",2); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4577,7 +4582,7 @@ parser_yylex(parser_state *p) return tANDDOT; } else if (c == '=') { - yylval.id = intern_c('&'); + pylval.id = intern_c('&'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4604,7 +4609,7 @@ parser_yylex(parser_state *p) if ((c = nextc(p)) == '|') { p->lstate = EXPR_BEG; if ((c = nextc(p)) == '=') { - yylval.id = intern("||",2); + pylval.id = intern("||",2); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4612,7 +4617,7 @@ parser_yylex(parser_state *p) return tOROP; } if (c == '=') { - yylval.id = intern_c('|'); + pylval.id = intern_c('|'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4636,7 +4641,7 @@ parser_yylex(parser_state *p) return '+'; } if (c == '=') { - yylval.id = intern_c('+'); + pylval.id = intern_c('+'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4664,7 +4669,7 @@ parser_yylex(parser_state *p) return '-'; } if (c == '=') { - yylval.id = intern_c('-'); + pylval.id = intern_c('-'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4738,7 +4743,7 @@ parser_yylex(parser_state *p) no_digits(); } else if (nondigit) goto trailing_uc; - yylval.nd = new_int(p, tok(p), 16); + pylval.nd = new_int(p, tok(p), 16); return tINTEGER; } if (c == 'b' || c == 'B') { @@ -4762,7 +4767,7 @@ parser_yylex(parser_state *p) no_digits(); } else if (nondigit) goto trailing_uc; - yylval.nd = new_int(p, tok(p), 2); + pylval.nd = new_int(p, tok(p), 2); return tINTEGER; } if (c == 'd' || c == 'D') { @@ -4786,7 +4791,7 @@ parser_yylex(parser_state *p) no_digits(); } else if (nondigit) goto trailing_uc; - yylval.nd = new_int(p, tok(p), 10); + pylval.nd = new_int(p, tok(p), 10); return tINTEGER; } if (c == '_') { @@ -4819,7 +4824,7 @@ parser_yylex(parser_state *p) pushback(p, c); tokfix(p); if (nondigit) goto trailing_uc; - yylval.nd = new_int(p, tok(p), 8); + pylval.nd = new_int(p, tok(p), 8); return tINTEGER; } if (nondigit) { @@ -4836,7 +4841,7 @@ parser_yylex(parser_state *p) } else { pushback(p, c); - yylval.nd = new_int(p, "0", 10); + pylval.nd = new_int(p, "0", 10); return tINTEGER; } } @@ -4920,10 +4925,10 @@ parser_yylex(parser_state *p) yywarning_s(p, "float %s out of range", tok(p)); errno = 0; } - yylval.nd = new_float(p, tok(p)); + pylval.nd = new_float(p, tok(p)); return tFLOAT; } - yylval.nd = new_int(p, tok(p), 10); + pylval.nd = new_int(p, tok(p), 10); return tINTEGER; } @@ -4965,7 +4970,7 @@ parser_yylex(parser_state *p) return tREGEXP_BEG; } if ((c = nextc(p)) == '=') { - yylval.id = intern_c('/'); + pylval.id = intern_c('/'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -4984,7 +4989,7 @@ parser_yylex(parser_state *p) case '^': if ((c = nextc(p)) == '=') { - yylval.id = intern_c('^'); + pylval.id = intern_c('^'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -5158,7 +5163,7 @@ parser_yylex(parser_state *p) } } if ((c = nextc(p)) == '=') { - yylval.id = intern_c('%'); + pylval.id = intern_c('%'); p->lstate = EXPR_BEG; return tOP_ASGN; } @@ -5212,7 +5217,7 @@ parser_yylex(parser_state *p) tokadd(p, '$'); tokadd(p, c); tokfix(p); - yylval.id = intern_cstr(tok(p)); + pylval.id = intern_cstr(tok(p)); return tGVAR; case '-': @@ -5222,7 +5227,7 @@ parser_yylex(parser_state *p) pushback(p, c); gvar: tokfix(p); - yylval.id = intern_cstr(tok(p)); + pylval.id = intern_cstr(tok(p)); return tGVAR; case '&': /* $&: last match */ @@ -5234,7 +5239,7 @@ parser_yylex(parser_state *p) tokadd(p, c); goto gvar; } - yylval.nd = new_back_ref(p, c); + pylval.nd = new_back_ref(p, c); return tBACK_REF; case '1': case '2': case '3': @@ -5253,7 +5258,7 @@ parser_yylex(parser_state *p) yyerror_i(p, "capture group index must be <= %d", INT_MAX); return 0; } - yylval.nd = new_nth_ref(p, (int)n); + pylval.nd = new_nth_ref(p, (int)n); } return tNTH_REF; @@ -5381,7 +5386,7 @@ parser_yylex(parser_state *p) p->lstate = EXPR_BEG; nextc(p); tokfix(p); - yylval.id = intern_cstr(tok(p)); + pylval.id = intern_cstr(tok(p)); return tLABEL; } } @@ -5392,10 +5397,10 @@ parser_yylex(parser_state *p) kw = mrb_reserved_word(tok(p), toklen(p)); if (kw) { enum mrb_lex_state_enum state = p->lstate; - yylval.num = p->lineno; + pylval.num = p->lineno; p->lstate = kw->state; if (state == EXPR_FNAME) { - yylval.id = intern_cstr(kw->name); + pylval.id = intern_cstr(kw->name); return kw->id[0]; } if (p->lstate == EXPR_BEG) { @@ -5442,7 +5447,7 @@ parser_yylex(parser_state *p) { mrb_sym ident = intern_cstr(tok(p)); - yylval.id = ident; + pylval.id = ident; #if 0 if (last_state != EXPR_DOT && islower(tok(p)[0]) && lvar_defined(ident)) { p->lstate = EXPR_END; @@ -6338,8 +6343,14 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset) dump_recur(mrb, tree->car, offset+1); dump_prefix(tree, offset); printf("tail: %s\n", (char*)tree->cdr->cdr->car); - dump_prefix(tree, offset); - printf("opt: %s\n", (char*)tree->cdr->cdr->cdr); + if (tree->cdr->cdr->cdr->car) { + dump_prefix(tree, offset); + printf("opt: %s\n", (char*)tree->cdr->cdr->cdr->car); + } + if (tree->cdr->cdr->cdr->cdr) { + dump_prefix(tree, offset); + printf("enc: %s\n", (char*)tree->cdr->cdr->cdr->cdr); + } break; case NODE_SYM: diff --git a/mrbgems/mruby-compiler/mrbgem.rake b/mrbgems/mruby-compiler/mrbgem.rake index 3a22762fa..3bf6d6ae3 100644 --- a/mrbgems/mruby-compiler/mrbgem.rake +++ b/mrbgems/mruby-compiler/mrbgem.rake @@ -8,11 +8,11 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec| lex_def = "#{current_dir}/core/lex.def" core_objs = Dir.glob("#{current_dir}/core/*.c").map { |f| - next nil if build.cxx_abi_enabled? and f =~ /(codegen).c$/ + next nil if build.cxx_exception_enabled? and f =~ /(codegen).c$/ objfile(f.pathmap("#{current_build_dir}/core/%n")) }.compact - if build.cxx_abi_enabled? + if build.cxx_exception_enabled? core_objs << build.compile_as_cxx("#{current_build_dir}/core/y.tab.c", "#{current_build_dir}/core/y.tab.cxx", objfile("#{current_build_dir}/y.tab"), ["#{current_dir}/core"]) << diff --git a/mrbgems/mruby-error/mrbgem.rake b/mrbgems/mruby-error/mrbgem.rake index b8281b17e..30a4259a8 100644 --- a/mrbgems/mruby-error/mrbgem.rake +++ b/mrbgems/mruby-error/mrbgem.rake @@ -3,7 +3,7 @@ MRuby::Gem::Specification.new('mruby-error') do |spec| spec.author = 'mruby developers' spec.summary = 'extensional error handling' - if build.cxx_abi_enabled? + if build.cxx_exception_enabled? @objs << build.compile_as_cxx("#{spec.dir}/src/exception.c", "#{spec.build_dir}/src/exception.cxx") @objs.delete_if { |v| v == objfile("#{spec.build_dir}/src/exception") } end diff --git a/mrbgems/mruby-eval/src/eval.c b/mrbgems/mruby-eval/src/eval.c index 81bc80280..5e8952f0d 100644 --- a/mrbgems/mruby-eval/src/eval.c +++ b/mrbgems/mruby-eval/src/eval.c @@ -131,6 +131,12 @@ patch_irep(mrb_state *mrb, mrb_irep *irep, int bnest) } } break; + + case OP_STOP: + if (mrb->c->ci->acc >= 0) { + irep->iseq[i] = MKOP_AB(OP_RETURN, irep->nlocals, OP_R_NORMAL); + } + break; } } } @@ -194,7 +200,8 @@ create_proc_from_string(mrb_state *mrb, char *s, int len, mrb_value binding, con e->cioff = c->ci - c->cibase - 1; e->stack = c->ci->stackent; MRB_SET_ENV_STACK_LEN(e, c->ci[-1].proc->body.irep->nlocals); - c->ci->env = e; + c->ci->target_class = proc->target_class; + c->ci->env = 0; proc->env = e; patch_irep(mrb, proc->body.irep, 0); @@ -205,6 +212,19 @@ create_proc_from_string(mrb_state *mrb, char *s, int len, mrb_value binding, con } static mrb_value +exec_irep(mrb_state *mrb, mrb_value self, struct RProc *proc) +{ + if (mrb->c->ci->acc < 0) { + mrb_value ret = mrb_top_run(mrb, proc, mrb->c->stack[0], 0); + if (mrb->exc) { + mrb_exc_raise(mrb, mrb_obj_value(mrb->exc)); + } + return ret; + } + return mrb_exec_irep(mrb, self, proc); +} + +static mrb_value f_eval(mrb_state *mrb, mrb_value self) { char *s; @@ -218,15 +238,12 @@ f_eval(mrb_state *mrb, mrb_value self) proc = create_proc_from_string(mrb, s, len, binding, file, line); mrb_assert(!MRB_PROC_CFUNC_P(proc)); - return mrb_exec_irep(mrb, self, proc); + return exec_irep(mrb, self, proc); } -#define CI_ACC_SKIP -1 - static mrb_value f_instance_eval(mrb_state *mrb, mrb_value self) { - struct mrb_context *c = mrb->c; mrb_value b; mrb_int argc; mrb_value *argv; @@ -241,13 +258,12 @@ f_instance_eval(mrb_state *mrb, mrb_value self) struct RProc *proc; mrb_get_args(mrb, "s|zi", &s, &len, &file, &line); - c->ci->acc = CI_ACC_SKIP; cv = mrb_singleton_class(mrb, self); - c->ci->target_class = mrb_class_ptr(cv); proc = create_proc_from_string(mrb, s, len, mrb_nil_value(), file, line); + proc->target_class = mrb_class_ptr(cv); mrb->c->ci->env = NULL; mrb_assert(!MRB_PROC_CFUNC_P(proc)); - return mrb_exec_irep(mrb, self, proc); + return exec_irep(mrb, self, proc); } else { mrb_get_args(mrb, "&", &b); diff --git a/mrbgems/mruby-kernel-ext/src/kernel.c b/mrbgems/mruby-kernel-ext/src/kernel.c index 7bb4dea68..7e6fa28bd 100644 --- a/mrbgems/mruby-kernel-ext/src/kernel.c +++ b/mrbgems/mruby-kernel-ext/src/kernel.c @@ -228,7 +228,7 @@ mrb_mruby_kernel_ext_gem_init(mrb_state *mrb) struct RClass *krn = mrb->kernel_module; mrb_define_module_function(mrb, krn, "fail", mrb_f_raise, MRB_ARGS_OPT(2)); - mrb_define_module_function(mrb, krn, "caller", mrb_f_caller, MRB_ARGS_NONE()); + mrb_define_module_function(mrb, krn, "caller", mrb_f_caller, MRB_ARGS_OPT(2)); mrb_define_method(mrb, krn, "__method__", mrb_f_method, MRB_ARGS_NONE()); mrb_define_module_function(mrb, krn, "Integer", mrb_f_integer, MRB_ARGS_ANY()); mrb_define_module_function(mrb, krn, "Float", mrb_f_float, MRB_ARGS_REQ(1)); diff --git a/mrbgems/mruby-object-ext/src/object.c b/mrbgems/mruby-object-ext/src/object.c index 3eba95633..8a2325ef9 100644 --- a/mrbgems/mruby-object-ext/src/object.c +++ b/mrbgems/mruby-object-ext/src/object.c @@ -62,10 +62,11 @@ nil_to_i(mrb_state *mrb, mrb_value obj) static mrb_value mrb_obj_instance_exec(mrb_state *mrb, mrb_value self) { - mrb_value *argv; + const mrb_value *argv; mrb_int argc; mrb_value blk; struct RClass *c; + mrb_value args; mrb_get_args(mrb, "*&", &argv, &argc, &blk); @@ -83,7 +84,8 @@ mrb_obj_instance_exec(mrb_state *mrb, mrb_value self) c = mrb_class_ptr(mrb_singleton_class(mrb, self)); break; } - + args = mrb_ary_new_from_values(mrb, argc, argv); + argv = RARRAY_PTR(args); return mrb_yield_with_class(mrb, blk, argc, argv, self, c); } @@ -96,7 +98,7 @@ mrb_mruby_object_ext_gem_init(mrb_state* mrb) mrb_define_method(mrb, n, "to_f", nil_to_f, MRB_ARGS_NONE()); mrb_define_method(mrb, n, "to_i", nil_to_i, MRB_ARGS_NONE()); - mrb_define_method(mrb, mrb->object_class, "instance_exec", mrb_obj_instance_exec, MRB_ARGS_ANY() | MRB_ARGS_BLOCK()); + mrb_define_method(mrb, mrb->kernel_module, "instance_exec", mrb_obj_instance_exec, MRB_ARGS_ANY() | MRB_ARGS_BLOCK()); } void diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index 616277f5e..09a26f827 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -116,8 +116,10 @@ mrb_fix2binstr(mrb_state *mrb, mrb_value x, int base) #define CHECK(l) do {\ /* int cr = ENC_CODERANGE(result);*/\ - while (blen + (l) >= bsiz) {\ + if ((l) < 0) mrb_raise(mrb, E_ARGUMENT_ERROR, "illegal specifier"); \ + while ((l) >= bsiz - blen) {\ bsiz*=2;\ + if (bsiz < 0) mrb_raise(mrb, E_ARGUMENT_ERROR, "too big specifier"); \ }\ mrb_str_resize(mrb, result, bsiz);\ /* ENC_CODERANGE_SET(result, cr);*/\ @@ -565,6 +567,7 @@ mrb_str_format(mrb_state *mrb, int argc, const mrb_value *argv, mrb_value fmt) mrb_sym id = 0; for (t = p; t < end && *t != '%'; t++) ; + if (t + 1 == end) ++t; PUSH(p, t - p); if (t >= end) goto sprint_exit; /* end of fmt string */ @@ -765,7 +768,7 @@ retry: width -= (int)slen; if (!(flags&FMINUS)) { CHECK(width); - while (width--) { + while (width-- > 0) { buf[blen++] = ' '; } } @@ -774,7 +777,7 @@ retry: blen += len; if (flags&FMINUS) { CHECK(width); - while (width--) { + while (width-- > 0) { buf[blen++] = ' '; } } @@ -981,7 +984,7 @@ retry: width -= prec; } - if (!(flags&FMINUS)) { + if (!(flags&FMINUS) && width > 0) { CHECK(width); while (width-- > 0) { buf[blen++] = ' '; @@ -1011,9 +1014,11 @@ retry: } PUSH(s, len); - CHECK(width); - while (width-- > 0) { - buf[blen++] = ' '; + if (width > 0) { + CHECK(width); + while (width-- > 0) { + buf[blen++] = ' '; + } } } break; @@ -1048,7 +1053,10 @@ retry: need = width; CHECK(need + 1); - snprintf(&buf[blen], need + 1, "%*s", need, ""); + n = snprintf(&buf[blen], need + 1, "%*s", need, ""); + if (n < 0) { + mrb_raise(mrb, E_RUNTIME_ERROR, "formatting error"); + } if (flags & FMINUS) { if (!isnan(fval) && fval < 0.0) buf[blen++] = '-'; @@ -1086,6 +1094,9 @@ retry: CHECK(need); n = snprintf(&buf[blen], need, fbuf, fval); + if (n < 0) { + mrb_raise(mrb, E_RUNTIME_ERROR, "formatting error"); + } blen += n; } break; diff --git a/mrbgems/mruby-sprintf/test/sprintf.rb b/mrbgems/mruby-sprintf/test/sprintf.rb index ccbd95d51..178904d60 100644 --- a/mrbgems/mruby-sprintf/test/sprintf.rb +++ b/mrbgems/mruby-sprintf/test/sprintf.rb @@ -30,3 +30,14 @@ assert("String#% with invalid chr") do end end end + +assert("String#% invalid format") do + assert_raise ArgumentError do + "%?" % "" + end +end + +assert("String#% invalid format shared substring") do + fmt = ("x"*30+"%!")[0...-1] + assert_equal fmt, sprintf(fmt, "") +end diff --git a/mrbgems/mruby-string-ext/mrblib/string.rb b/mrbgems/mruby-string-ext/mrblib/string.rb index 6e5f3c73d..15f0549f3 100644 --- a/mrbgems/mruby-string-ext/mrblib/string.rb +++ b/mrbgems/mruby-string-ext/mrblib/string.rb @@ -95,6 +95,7 @@ class String # "hello".lstrip! #=> nil # def lstrip! + raise RuntimeError, "can't modify frozen String" if frozen? s = self.lstrip (s == self) ? nil : self.replace(s) end @@ -111,6 +112,7 @@ class String # "hello".rstrip! #=> nil # def rstrip! + raise RuntimeError, "can't modify frozen String" if frozen? s = self.rstrip (s == self) ? nil : self.replace(s) end @@ -123,6 +125,7 @@ class String # <code>nil</code> if <i>str</i> was not altered. # def strip! + raise RuntimeError, "can't modify frozen String" if frozen? s = self.strip (s == self) ? nil : self.replace(s) end @@ -183,6 +186,7 @@ class String # string #=> "thsa sting" # def slice!(arg1, arg2=nil) + raise RuntimeError, "can't modify frozen String" if frozen? raise "wrong number of arguments (for 1..2)" if arg1.nil? && arg2.nil? if !arg1.nil? && !arg2.nil? @@ -275,15 +279,11 @@ class String # "hello".ljust(20) #=> "hello " # "hello".ljust(20, '1234') #=> "hello123412341234123" def ljust(idx, padstr = ' ') - if idx <= self.size - return self - end - newstr = self.dup - newstr << padstr - while newstr.size <= idx - newstr << padstr - end - return newstr.slice(0,idx) + raise ArgumentError, 'zero width padding' if padstr == '' + return self if idx <= self.size + pad_repetitions = (idx / padstr.length).ceil + padding = (padstr * pad_repetitions)[0...(idx - self.length)] + self + padding end ## @@ -298,15 +298,11 @@ class String # "hello".rjust(20) #=> " hello" # "hello".rjust(20, '1234') #=> "123412341234123hello" def rjust(idx, padstr = ' ') - if idx <= self.size - return self - end - padsize = idx - self.size - newstr = padstr.dup - while newstr.size <= padsize - newstr << padstr - end - return newstr.slice(0,padsize) + self + raise ArgumentError, 'zero width padding' if padstr == '' + return self if idx <= self.size + pad_repetitions = (idx / padstr.length).ceil + padding = (padstr * pad_repetitions)[0...(idx - self.length)] + padding + self end # str.upto(other_str, exclusive=false) {|s| block } -> str @@ -349,6 +345,7 @@ class String return self if !excl && str == other_str str = str.succ return self if excl && str == other_str + return self if str.size > other_str.size end end diff --git a/mrbgems/mruby-string-ext/test/string.rb b/mrbgems/mruby-string-ext/test/string.rb index 228a236af..24bc859d8 100644 --- a/mrbgems/mruby-string-ext/test/string.rb +++ b/mrbgems/mruby-string-ext/test/string.rb @@ -433,6 +433,7 @@ end assert('String#ljust') do assert_equal "hello", "hello".ljust(4) assert_equal "hello ", "hello".ljust(20) + assert_equal 20, "hello".ljust(20).length assert_equal "hello123412341234123", "hello".ljust(20, '1234') assert_equal "hello", "hello".ljust(-3) end @@ -440,10 +441,55 @@ end assert('String#rjust') do assert_equal "hello", "hello".rjust(4) assert_equal " hello", "hello".rjust(20) + assert_equal 20, "hello".rjust(20).length assert_equal "123412341234123hello", "hello".rjust(20, '1234') assert_equal "hello", "hello".rjust(-3) end +if UTF8STRING + assert('String#ljust with UTF8') do + assert_equal "helloん ", "helloん".ljust(20) + assert_equal "helloó ", "helloó".ljust(34) + assert_equal 34, "helloó".ljust(34).length + assert_equal "helloんんんんんんんんんんんんんん", "hello".ljust(19, 'ん') + assert_equal "helloんんんんんんんんんんんんんんん", "hello".ljust(20, 'ん') + end + + assert('String#rjust with UTF8') do + assert_equal " helloん", "helloん".rjust(20) + assert_equal " helloó", "helloó".rjust(34) + # assert_equal 34, "helloó".rjust(34).length + assert_equal "んんんんんんんんんんんんんんhello", "hello".rjust(19, 'ん') + assert_equal "んんんんんんんんんんんんんんんhello", "hello".rjust(20, 'ん') + end + + assert('UTF8 byte counting') do + ret = ' ' + ret[-6..-1] = "helloó" + assert_equal 34, ret.length + end +end + +assert('String#ljust should not change string') do + a = "hello" + a.ljust(20) + assert_equal "hello", a +end + +assert('String#rjust should not change string') do + a = "hello" + a.rjust(20) + assert_equal "hello", a +end + +assert('String#ljust should raise on zero width padding') do + assert_raise(ArgumentError) { "foo".ljust(10, '') } +end + +assert('String#rjust should raise on zero width padding') do + assert_raise(ArgumentError) { "foo".rjust(10, '') } +end + assert('String#upto') do a = "aa" start = "aa" diff --git a/mrblib/range.rb b/mrblib/range.rb index 5e5fd9bdc..3322af5f1 100644 --- a/mrblib/range.rb +++ b/mrblib/range.rb @@ -26,6 +26,14 @@ class Range return self end + if val.kind_of?(String) && last.kind_of?(String) # fixnums are special + if val.respond_to? :upto + return val.upto(last, exclude_end?, &block) + else + str_each = true + end + end + raise TypeError, "can't iterate" unless val.respond_to? :succ return self if (val <=> last) > 0 @@ -33,6 +41,9 @@ class Range while (val <=> last) < 0 block.call(val) val = val.succ + if str_each + break if val.size > last.size + end end block.call(val) if !exclude_end? && (val <=> last) == 0 diff --git a/mrblib/string.rb b/mrblib/string.rb index aa2ca9973..6e55ee341 100644 --- a/mrblib/string.rb +++ b/mrblib/string.rb @@ -9,13 +9,18 @@ class String # and pass the respective line. # # ISO 15.2.10.5.15 - def each_line(&block) + def each_line(rs = "\n", &block) + return to_enum(:each_line, rs, &block) unless block + return block.call(self) if rs.nil? + rs = rs.to_str offset = 0 - while pos = self.index("\n", offset) - block.call(self[offset, pos + 1 - offset]) - offset = pos + 1 + rs_len = rs.length + this = dup + while pos = this.index(rs, offset) + block.call(this[offset, pos + rs_len - offset]) + offset = pos + rs_len end - block.call(self[offset, self.size - offset]) if self.size > offset + block.call(this[offset, this.size - offset]) if this.size > offset self end @@ -34,6 +39,8 @@ class String m when "'" post + when "1", "2", "3", "4", "5", "6", "7", "8", "9" + "" else self[j, 2] end @@ -52,17 +59,22 @@ class String # ISO 15.2.10.5.18 def gsub(*args, &block) if args.size == 2 - s = "" - i = 0 - while j = index(args[0], i) - seplen = args[0].length - k = j + seplen - pre = self[0, j] - post = self[k, length-k] - s += self[i, j-i] + args[1].__sub_replace(pre, args[0], post) - i = k + pattern, replace = *args + plen = pattern.length + replace = replace.to_str + offset = 0 + result = [] + while found = index(pattern, offset) + result << self[offset, found - offset] + offset = found + plen + result << replace.__sub_replace(self[0, found], pattern, self[offset..-1] || "") + if plen == 0 + result << self[offset, 1] + offset += 1 + end end - s + self[i, length-i] + result << self[offset..-1] if offset < length + result.join elsif args.size == 1 && block split(args[0], -1).join(block.call(args[0])) else @@ -78,6 +90,7 @@ class String # # ISO 15.2.10.5.19 def gsub!(*args, &block) + raise RuntimeError, "can't modify frozen String" if frozen? str = self.gsub(*args, &block) return nil if str == self self.replace(str) @@ -123,6 +136,7 @@ class String # # ISO 15.2.10.5.37 def sub!(*args, &block) + raise RuntimeError, "can't modify frozen String" if frozen? str = self.sub(*args, &block) return nil if str == self self.replace(str) diff --git a/src/backtrace.c b/src/backtrace.c index b499cee5a..deb3f8469 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -118,6 +118,7 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func if (MRB_PROC_CFUNC_P(ci->proc)) continue; irep = ci->proc->body.irep; + if (!irep) continue; if (mrb->c->cibase[i].err) { pc = mrb->c->cibase[i].err; @@ -228,10 +229,11 @@ print_backtrace(mrb_state *mrb, mrb_value backtrace) static void print_backtrace_saved(mrb_state *mrb) { - int i; + int i, ai; FILE *stream = stderr; fprintf(stream, "trace:\n"); + ai = mrb_gc_arena_save(mrb); for (i = 0; i < mrb->backtrace.n; i++) { mrb_backtrace_entry *entry; @@ -251,6 +253,7 @@ print_backtrace_saved(mrb_state *mrb) else { fprintf(stream, ":in %s", method_name); } + mrb_gc_arena_restore(mrb, ai); } fprintf(stream, "\n"); @@ -262,7 +265,7 @@ mrb_print_backtrace(mrb_state *mrb) { mrb_value backtrace; - if (!mrb->exc || mrb_obj_is_kind_of(mrb, mrb_obj_value(mrb->exc), E_SYSSTACK_ERROR)) { + if (!mrb->exc) { return; } diff --git a/src/class.c b/src/class.c index 81b312fd0..184036a91 100644 --- a/src/class.c +++ b/src/class.c @@ -240,12 +240,22 @@ mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super) return mrb_define_class_id(mrb, mrb_intern_cstr(mrb, name), super); } +static mrb_value mrb_bob_init(mrb_state *mrb, mrb_value cv); + static void mrb_class_inherited(mrb_state *mrb, struct RClass *super, struct RClass *klass) { + mrb_value s; + mrb_sym mid; + if (!super) super = mrb->object_class; - mrb_funcall(mrb, mrb_obj_value(super), "inherited", 1, mrb_obj_value(klass)); + s = mrb_obj_value(super); + mid = mrb_intern_lit(mrb, "inherited"); + if (!mrb_func_basic_p(mrb, s, mid, mrb_bob_init)) { + mrb_value c = mrb_obj_value(klass); + mrb_funcall_argv(mrb, mrb_obj_value(super), mid, 1, &c); + } } MRB_API struct RClass* @@ -320,8 +330,14 @@ mrb_class_get(mrb_state *mrb, const char *name) MRB_API struct RClass * mrb_exc_get(mrb_state *mrb, const char *name) { - struct RClass *exc = mrb_class_get_under(mrb, mrb->object_class, name); - struct RClass *e = exc; + struct RClass *exc, *e; + mrb_value c = mrb_const_get(mrb, mrb_obj_value(mrb->object_class), + mrb_intern_cstr(mrb, name)); + + if (mrb_type(c) != MRB_TT_CLASS) { + mrb_raise(mrb, mrb->eException_class, "exception corrupted"); + } + exc = e = mrb_class_ptr(c); while (e) { if (e == mrb->eException_class) @@ -1206,10 +1222,6 @@ mrb_singleton_class(mrb_state *mrb, mrb_value v) } obj = mrb_basic_ptr(v); prepare_singleton_class(mrb, obj); - if (mrb->c && mrb->c->ci && mrb->c->ci->target_class) { - mrb_obj_iv_set(mrb, (struct RObject*)obj->c, mrb_intern_lit(mrb, "__outer__"), - mrb_obj_value(mrb->c->ci->target_class)); - } return mrb_obj_value(obj->c); } @@ -1407,10 +1419,13 @@ MRB_API mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv) { mrb_value obj; + mrb_sym mid; obj = mrb_instance_alloc(mrb, mrb_obj_value(c)); - mrb_funcall_argv(mrb, obj, mrb_intern_lit(mrb, "initialize"), argc, argv); - + mid = mrb_intern_lit(mrb, "initialize"); + if (!mrb_func_basic_p(mrb, obj, mid, mrb_bob_init)) { + mrb_funcall_argv(mrb, obj, mid, argc, argv); + } return obj; } @@ -1432,13 +1447,17 @@ mrb_class_new_class(mrb_state *mrb, mrb_value cv) mrb_int n; mrb_value super, blk; mrb_value new_class; + mrb_sym mid; n = mrb_get_args(mrb, "|C&", &super, &blk); if (n == 0) { super = mrb_obj_value(mrb->object_class); } new_class = mrb_obj_value(mrb_class_new(mrb, mrb_class_ptr(super))); - mrb_funcall_with_block(mrb, new_class, mrb_intern_lit(mrb, "initialize"), n, &super, blk); + mid = mrb_intern_lit(mrb, "initialize"); + if (!mrb_func_basic_p(mrb, new_class, mid, mrb_bob_init)) { + mrb_funcall_with_block(mrb, new_class, mid, n, &super, blk); + } mrb_class_inherited(mrb, mrb_class_ptr(super), mrb_class_ptr(new_class)); return new_class; } @@ -1469,75 +1488,53 @@ mrb_bob_not(mrb_state *mrb, mrb_value cv) return mrb_bool_value(!mrb_test(cv)); } -void -mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args) -{ - mrb_sym inspect; - mrb_value repr; - - inspect = mrb_intern_lit(mrb, "inspect"); - if (mrb->c->ci > mrb->c->cibase && mrb->c->ci[-1].mid == inspect) { - /* method missing in inspect; avoid recursion */ - repr = mrb_any_to_s(mrb, self); - } - else if (mrb_respond_to(mrb, self, inspect) && mrb->c->ci - mrb->c->cibase < 64) { - repr = mrb_funcall_argv(mrb, self, inspect, 0, 0); - if (mrb_string_p(repr) && RSTRING_LEN(repr) > 64) { - repr = mrb_any_to_s(mrb, self); - } - } - else { - repr = mrb_any_to_s(mrb, self); - } - - mrb_no_method_error(mrb, name, args, "undefined method '%S' for %S", - mrb_sym2str(mrb, name), repr); -} - -/* 15.3.1.3.30 */ +/* 15.3.1.3.1 */ +/* 15.3.1.3.10 */ +/* 15.3.1.3.11 */ /* * call-seq: - * obj.method_missing(symbol [, *args] ) -> result + * obj == other -> true or false + * obj.equal?(other) -> true or false + * obj.eql?(other) -> true or false * - * Invoked by Ruby when <i>obj</i> is sent a message it cannot handle. - * <i>symbol</i> is the symbol for the method called, and <i>args</i> - * are any arguments that were passed to it. By default, the interpreter - * raises an error when this method is called. However, it is possible - * to override the method to provide more dynamic behavior. - * If it is decided that a particular method should not be handled, then - * <i>super</i> should be called, so that ancestors can pick up the - * missing method. - * The example below creates - * a class <code>Roman</code>, which responds to methods with names - * consisting of roman numerals, returning the corresponding integer - * values. + * Equality---At the <code>Object</code> level, <code>==</code> returns + * <code>true</code> only if <i>obj</i> and <i>other</i> are the + * same object. Typically, this method is overridden in descendant + * classes to provide class-specific meaning. * - * class Roman - * def romanToInt(str) - * # ... - * end - * def method_missing(methId) - * str = methId.id2name - * romanToInt(str) - * end - * end + * Unlike <code>==</code>, the <code>equal?</code> method should never be + * overridden by subclasses: it is used to determine object identity + * (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same + * object as <code>b</code>). * - * r = Roman.new - * r.iv #=> 4 - * r.xxiii #=> 23 - * r.mm #=> 2000 + * The <code>eql?</code> method returns <code>true</code> if + * <i>obj</i> and <i>anObject</i> have the same value. Used by + * <code>Hash</code> to test members for equality. For objects of + * class <code>Object</code>, <code>eql?</code> is synonymous with + * <code>==</code>. Subclasses normally continue this tradition, but + * there are exceptions. <code>Numeric</code> types, for example, + * perform type conversion across <code>==</code>, but not across + * <code>eql?</code>, so: + * + * 1 == 1.0 #=> true + * 1.eql? 1.0 #=> false */ +mrb_value +mrb_obj_equal_m(mrb_state *mrb, mrb_value self) +{ + mrb_value arg; + + mrb_get_args(mrb, "o", &arg); + return mrb_bool_value(mrb_obj_equal(mrb, self, arg)); +} + static mrb_value -mrb_bob_missing(mrb_state *mrb, mrb_value mod) +mrb_obj_not_equal_m(mrb_state *mrb, mrb_value self) { - mrb_sym name; - mrb_value *a; - mrb_int alen; + mrb_value arg; - mrb_get_args(mrb, "n*", &name, &a, &alen); - mrb_method_missing(mrb, name, mod, mrb_ary_new_from_values(mrb, alen, a)); - /* not reached */ - return mrb_nil_value(); + mrb_get_args(mrb, "o", &arg); + return mrb_bool_value(!mrb_equal(mrb, self, arg)); } MRB_API mrb_bool @@ -2250,6 +2247,11 @@ mrb_mod_module_function(mrb_state *mrb, mrb_value mod) return mod; } +/* implementation of __id__ */ +mrb_value mrb_obj_id_m(mrb_state *mrb, mrb_value self); +/* implementation of instance_eval */ +mrb_value mrb_obj_instance_eval(mrb_state*, mrb_value); + void mrb_init_class(mrb_state *mrb) { @@ -2289,7 +2291,11 @@ mrb_init_class(mrb_state *mrb) MRB_SET_INSTANCE_TT(cls, MRB_TT_CLASS); mrb_define_method(mrb, bob, "initialize", mrb_bob_init, MRB_ARGS_NONE()); mrb_define_method(mrb, bob, "!", mrb_bob_not, MRB_ARGS_NONE()); - mrb_define_method(mrb, bob, "method_missing", mrb_bob_missing, MRB_ARGS_ANY()); /* 15.3.1.3.30 */ + mrb_define_method(mrb, bob, "==", mrb_obj_equal_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.1 */ + mrb_define_method(mrb, bob, "!=", mrb_obj_not_equal_m, MRB_ARGS_REQ(1)); + mrb_define_method(mrb, bob, "__id__", mrb_obj_id_m, MRB_ARGS_NONE()); /* 15.3.1.3.3 */ + mrb_define_method(mrb, bob, "__send__", mrb_f_send, MRB_ARGS_ANY()); /* 15.3.1.3.4 */ + mrb_define_method(mrb, bob, "instance_eval", mrb_obj_instance_eval, MRB_ARGS_ANY()); /* 15.3.1.3.18 */ mrb_define_class_method(mrb, cls, "new", mrb_class_new_class, MRB_ARGS_OPT(1)); mrb_define_method(mrb, cls, "superclass", mrb_class_superclass, MRB_ARGS_NONE()); /* 15.2.3.3.4 */ diff --git a/src/codedump.c b/src/codedump.c index 4b13d4361..c20afdd00 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -408,16 +408,29 @@ codedump(mrb_state *mrb, mrb_irep *irep) printf("OP_ONERR\t%03d\n", i+GETARG_sBx(c)); break; case OP_RESCUE: - printf("OP_RESCUE\tR%d\t\t", GETARG_A(c)); - print_lv(mrb, irep, c, RA); + { + int a = GETARG_A(c); + int b = GETARG_B(c); + int cnt = GETARG_C(c); + + if (b == 0) { + printf("OP_RESCUE\tR%d\t\t%s", a, cnt ? "cont" : ""); + print_lv(mrb, irep, c, RA); + break; + } + else { + printf("OP_RESCUE\tR%d\tR%d\t%s", a, b, cnt ? "cont" : ""); + print_lv(mrb, irep, c, RAB); + break; + } + } break; case OP_RAISE: printf("OP_RAISE\tR%d\t\t", GETARG_A(c)); print_lv(mrb, irep, c, RA); break; case OP_POPERR: - printf("OP_POPERR\t%d\t\t", GETARG_A(c)); - print_lv(mrb, irep, c, RA); + printf("OP_POPERR\t%d\t\t\n", GETARG_A(c)); break; case OP_EPOP: printf("OP_EPOP\t%d\n", GETARG_A(c)); diff --git a/src/error.c b/src/error.c index a71ee548f..931361763 100644 --- a/src/error.c +++ b/src/error.c @@ -202,12 +202,9 @@ exc_get_backtrace(mrb_state *mrb, mrb_value exc) return backtrace; } -static mrb_value -exc_set_backtrace(mrb_state *mrb, mrb_value exc) +static void +set_backtrace(mrb_state *mrb, mrb_value exc, mrb_value backtrace) { - mrb_value backtrace; - - mrb_get_args(mrb, "o", &backtrace); if (!mrb_array_p(backtrace)) { type_err: mrb_raise(mrb, E_TYPE_ERROR, "backtrace must be Array of String"); @@ -222,7 +219,15 @@ exc_set_backtrace(mrb_state *mrb, mrb_value exc) } } mrb_iv_set(mrb, exc, mrb_intern_lit(mrb, "backtrace"), backtrace); +} + +static mrb_value +exc_set_backtrace(mrb_state *mrb, mrb_value exc) +{ + mrb_value backtrace; + mrb_get_args(mrb, "o", &backtrace); + set_backtrace(mrb, exc, backtrace); return backtrace; } @@ -253,12 +258,6 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc) } } -static void -set_backtrace(mrb_state *mrb, mrb_value info, mrb_value bt) -{ - mrb_funcall(mrb, info, "set_backtrace", 1, bt); -} - static mrb_bool have_backtrace(mrb_state *mrb, struct RObject *exc) { @@ -520,19 +519,22 @@ MRB_API mrb_noreturn void mrb_no_method_error(mrb_state *mrb, mrb_sym id, mrb_value args, char const* fmt, ...) { mrb_value exc; + mrb_value argv[3]; va_list ap; va_start(ap, fmt); - exc = mrb_funcall(mrb, mrb_obj_value(E_NOMETHOD_ERROR), "new", 3, - mrb_vformat(mrb, fmt, ap), mrb_symbol_value(id), args); + argv[0] = mrb_vformat(mrb, fmt, ap); + argv[1] = mrb_symbol_value(id); + argv[2] = args; va_end(ap); + exc = mrb_obj_new(mrb, E_NOMETHOD_ERROR, 3, argv); mrb_exc_raise(mrb, exc); } void mrb_init_exception(mrb_state *mrb) { - struct RClass *exception, *runtime_error, *script_error; + struct RClass *exception, *runtime_error, *script_error, *stack_error; mrb->eException_class = exception = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */ MRB_SET_INSTANCE_TT(exception, MRB_TT_EXCEPTION); @@ -553,5 +555,6 @@ mrb_init_exception(mrb_state *mrb) #endif script_error = mrb_define_class(mrb, "ScriptError", mrb->eException_class); /* 15.2.37 */ mrb_define_class(mrb, "SyntaxError", script_error); /* 15.2.38 */ - mrb_define_class(mrb, "SystemStackError", exception); + stack_error = mrb_define_class(mrb, "SystemStackError", exception); + mrb->stack_err = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, stack_error, "stack level too deep")); } @@ -639,6 +639,7 @@ gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj) struct REnv *e = (struct REnv*)obj; mrb_int i, len; + if MRB_ENV_STACK_SHARED_P(e) break; len = MRB_ENV_STACK_LEN(e); for (i=0; i<len; i++) { mrb_gc_mark_value(mrb, e->stack[i]); @@ -857,9 +858,15 @@ root_scan_phase(mrb_state *mrb, mrb_gc *gc) mrb_gc_mark(mrb, (struct RBasic*)mrb->top_self); /* mark exception */ mrb_gc_mark(mrb, (struct RBasic*)mrb->exc); + /* mark backtrace */ mrb_gc_mark(mrb, (struct RBasic*)mrb->backtrace.exc); + e = (size_t)mrb->backtrace.n; + for (i=0; i<e; i++) { + mrb_gc_mark(mrb, (struct RBasic*)mrb->backtrace.entries[i].klass); + } /* mark pre-allocated exception */ mrb_gc_mark(mrb, (struct RBasic*)mrb->nomem_err); + mrb_gc_mark(mrb, (struct RBasic*)mrb->stack_err); #ifdef MRB_GC_FIXED_ARENA mrb_gc_mark(mrb, (struct RBasic*)mrb->arena_err); #endif diff --git a/src/hash.c b/src/hash.c index 98feaceac..d15faa206 100644 --- a/src/hash.c +++ b/src/hash.c @@ -159,11 +159,15 @@ mrb_hash_new(mrb_state *mrb) return mrb_hash_new_capa(mrb, 0); } +static mrb_value mrb_hash_default(mrb_state *mrb, mrb_value hash); +static mrb_value hash_default(mrb_state *mrb, mrb_value hash, mrb_value key); + MRB_API mrb_value mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key) { khash_t(ht) *h = RHASH_TBL(hash); khiter_t k; + mrb_sym mid; if (h) { k = kh_get(ht, mrb, h, key); @@ -171,9 +175,12 @@ mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key) return kh_value(h, k).v; } - /* not found */ + mid = mrb_intern_lit(mrb, "default"); + if (mrb_func_basic_p(mrb, hash, mid, mrb_hash_default)) { + return hash_default(mrb, hash, key); + } /* xxx mrb_funcall_tailcall(mrb, hash, "default", 1, key); */ - return mrb_funcall(mrb, hash, "default", 1, key); + return mrb_funcall_argv(mrb, hash, mid, 1, &key); } MRB_API mrb_value @@ -366,6 +373,20 @@ mrb_hash_aget(mrb_state *mrb, mrb_value self) return mrb_hash_get(mrb, self, key); } +static mrb_value +hash_default(mrb_state *mrb, mrb_value hash, mrb_value key) +{ + if (MRB_RHASH_DEFAULT_P(hash)) { + if (MRB_RHASH_PROCDEFAULT_P(hash)) { + return mrb_funcall(mrb, RHASH_PROCDEFAULT(hash), "call", 2, hash, key); + } + else { + return RHASH_IFNONE(hash); + } + } + return mrb_nil_value(); +} + /* 15.2.13.4.5 */ /* * call-seq: diff --git a/src/kernel.c b/src/kernel.c index 5ca1736c3..3377f5a11 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -6,6 +6,7 @@ #include <mruby.h> #include <mruby/array.h> +#include <mruby/hash.h> #include <mruby/class.h> #include <mruby/proc.h> #include <mruby/string.h> @@ -27,15 +28,21 @@ typedef enum { NOEX_RESPONDS = 0x80 } mrb_method_flag_t; -static mrb_bool -mrb_obj_basic_to_s_p(mrb_state *mrb, mrb_value obj) +MRB_API mrb_bool +mrb_func_basic_p(mrb_state *mrb, mrb_value obj, mrb_sym mid, mrb_func_t func) { - struct RProc *me = mrb_method_search(mrb, mrb_class(mrb, obj), mrb_intern_lit(mrb, "to_s")); - if (MRB_PROC_CFUNC_P(me) && (me->body.func == mrb_any_to_s)) + struct RProc *me = mrb_method_search(mrb, mrb_class(mrb, obj), mid); + if (MRB_PROC_CFUNC_P(me) && (me->body.func == func)) return TRUE; return FALSE; } +static mrb_bool +mrb_obj_basic_to_s_p(mrb_state *mrb, mrb_value obj) +{ + return mrb_func_basic_p(mrb, obj, mrb_intern_lit(mrb, "to_s"), mrb_any_to_s); +} + /* 15.3.1.3.17 */ /* * call-seq: @@ -59,55 +66,6 @@ mrb_obj_inspect(mrb_state *mrb, mrb_value obj) return mrb_any_to_s(mrb, obj); } -/* 15.3.1.3.1 */ -/* 15.3.1.3.10 */ -/* 15.3.1.3.11 */ -/* - * call-seq: - * obj == other -> true or false - * obj.equal?(other) -> true or false - * obj.eql?(other) -> true or false - * - * Equality---At the <code>Object</code> level, <code>==</code> returns - * <code>true</code> only if <i>obj</i> and <i>other</i> are the - * same object. Typically, this method is overridden in descendant - * classes to provide class-specific meaning. - * - * Unlike <code>==</code>, the <code>equal?</code> method should never be - * overridden by subclasses: it is used to determine object identity - * (that is, <code>a.equal?(b)</code> iff <code>a</code> is the same - * object as <code>b</code>). - * - * The <code>eql?</code> method returns <code>true</code> if - * <i>obj</i> and <i>anObject</i> have the same value. Used by - * <code>Hash</code> to test members for equality. For objects of - * class <code>Object</code>, <code>eql?</code> is synonymous with - * <code>==</code>. Subclasses normally continue this tradition, but - * there are exceptions. <code>Numeric</code> types, for example, - * perform type conversion across <code>==</code>, but not across - * <code>eql?</code>, so: - * - * 1 == 1.0 #=> true - * 1.eql? 1.0 #=> false - */ -static mrb_value -mrb_obj_equal_m(mrb_state *mrb, mrb_value self) -{ - mrb_value arg; - - mrb_get_args(mrb, "o", &arg); - return mrb_bool_value(mrb_obj_equal(mrb, self, arg)); -} - -static mrb_value -mrb_obj_not_equal_m(mrb_state *mrb, mrb_value self) -{ - mrb_value arg; - - mrb_get_args(mrb, "o", &arg); - return mrb_bool_value(!mrb_equal(mrb, self, arg)); -} - /* 15.3.1.3.2 */ /* * call-seq: @@ -143,7 +101,7 @@ mrb_equal_m(mrb_state *mrb, mrb_value self) * <code>:name</code> notation, which returns the symbol id of * <code>name</code>. Replaces the deprecated <code>Object#id</code>. */ -static mrb_value +mrb_value mrb_obj_id_m(mrb_state *mrb, mrb_value self) { return mrb_fixnum_value(mrb_obj_id(self)); @@ -531,9 +489,6 @@ mrb_obj_init_copy(mrb_state *mrb, mrb_value self) } -/* implementation of instance_eval */ -mrb_value mrb_obj_instance_eval(mrb_state*, mrb_value); - MRB_API mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c) { @@ -956,6 +911,79 @@ mrb_obj_remove_instance_variable(mrb_state *mrb, mrb_value self) return val; } +void +mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args) +{ + mrb_sym inspect; + mrb_value repr; + + inspect = mrb_intern_lit(mrb, "inspect"); + if (mrb->c->ci > mrb->c->cibase && mrb->c->ci[-1].mid == inspect) { + /* method missing in inspect; avoid recursion */ + repr = mrb_any_to_s(mrb, self); + } + else if (mrb_respond_to(mrb, self, inspect) && mrb->c->ci - mrb->c->cibase < 64) { + repr = mrb_funcall_argv(mrb, self, inspect, 0, 0); + if (mrb_string_p(repr) && RSTRING_LEN(repr) > 64) { + repr = mrb_any_to_s(mrb, self); + } + } + else { + repr = mrb_any_to_s(mrb, self); + } + + mrb_no_method_error(mrb, name, args, "undefined method '%S' for %S", + mrb_sym2str(mrb, name), repr); +} + +/* 15.3.1.3.30 */ +/* + * call-seq: + * obj.method_missing(symbol [, *args] ) -> result + * + * Invoked by Ruby when <i>obj</i> is sent a message it cannot handle. + * <i>symbol</i> is the symbol for the method called, and <i>args</i> + * are any arguments that were passed to it. By default, the interpreter + * raises an error when this method is called. However, it is possible + * to override the method to provide more dynamic behavior. + * If it is decided that a particular method should not be handled, then + * <i>super</i> should be called, so that ancestors can pick up the + * missing method. + * The example below creates + * a class <code>Roman</code>, which responds to methods with names + * consisting of roman numerals, returning the corresponding integer + * values. + * + * class Roman + * def romanToInt(str) + * # ... + * end + * def method_missing(methId) + * str = methId.id2name + * romanToInt(str) + * end + * end + * + * r = Roman.new + * r.iv #=> 4 + * r.xxiii #=> 23 + * r.mm #=> 2000 + */ +#ifdef MRB_DEFAULT_METHOD_MISSING +static mrb_value +mrb_obj_missing(mrb_state *mrb, mrb_value mod) +{ + mrb_sym name; + mrb_value *a; + mrb_int alen; + + mrb_get_args(mrb, "n*", &name, &a, &alen); + mrb_method_missing(mrb, name, mod, mrb_ary_new_from_values(mrb, alen, a)); + /* not reached */ + return mrb_nil_value(); +} +#endif + static inline mrb_bool basic_obj_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym id, int pub) { @@ -1106,8 +1134,8 @@ mrb_obj_ceqq(mrb_state *mrb, mrb_value self) static mrb_value mrb_local_variables(mrb_state *mrb, mrb_value self) { - mrb_value ret; struct RProc *proc; + mrb_value vars; struct mrb_irep *irep; size_t i; @@ -1121,10 +1149,10 @@ mrb_local_variables(mrb_state *mrb, mrb_value self) if (!irep->lv) { return mrb_ary_new(mrb); } - ret = mrb_ary_new_capa(mrb, irep->nlocals - 1); + vars = mrb_hash_new(mrb); for (i = 0; i + 1 < irep->nlocals; ++i) { if (irep->lv[i].name) { - mrb_ary_push(mrb, ret, mrb_symbol_value(irep->lv[i].name)); + mrb_hash_set(mrb, vars, mrb_symbol_value(irep->lv[i].name), mrb_true_value()); } } if (proc->env) { @@ -1137,7 +1165,7 @@ mrb_local_variables(mrb_state *mrb, mrb_value self) if (irep->lv) { for (i = 0; i + 1 < irep->nlocals; ++i) { if (irep->lv[i].name) { - mrb_ary_push(mrb, ret, mrb_symbol_value(irep->lv[i].name)); + mrb_hash_set(mrb, vars, mrb_symbol_value(irep->lv[i].name), mrb_true_value()); } } } @@ -1146,9 +1174,10 @@ mrb_local_variables(mrb_state *mrb, mrb_value self) } } - return ret; + return mrb_hash_keys(mrb, vars); } +mrb_value mrb_obj_equal_m(mrb_state *mrb, mrb_value); void mrb_init_kernel(mrb_state *mrb) { @@ -1164,11 +1193,7 @@ mrb_init_kernel(mrb_state *mrb) mrb_define_method(mrb, krn, "singleton_class", mrb_singleton_class, MRB_ARGS_NONE()); - mrb_define_method(mrb, krn, "==", mrb_obj_equal_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.1 */ - mrb_define_method(mrb, krn, "!=", mrb_obj_not_equal_m, MRB_ARGS_REQ(1)); mrb_define_method(mrb, krn, "===", mrb_equal_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.2 */ - mrb_define_method(mrb, krn, "__id__", mrb_obj_id_m, MRB_ARGS_NONE()); /* 15.3.1.3.3 */ - mrb_define_method(mrb, krn, "__send__", mrb_f_send, MRB_ARGS_ANY()); /* 15.3.1.3.4 */ mrb_define_method(mrb, krn, "block_given?", mrb_f_block_given_p_m, MRB_ARGS_NONE()); /* 15.3.1.3.6 */ mrb_define_method(mrb, krn, "class", mrb_obj_class_m, MRB_ARGS_NONE()); /* 15.3.1.3.7 */ mrb_define_method(mrb, krn, "clone", mrb_obj_clone, MRB_ARGS_NONE()); /* 15.3.1.3.8 */ @@ -1182,7 +1207,6 @@ mrb_init_kernel(mrb_state *mrb) mrb_define_method(mrb, krn, "hash", mrb_obj_hash, MRB_ARGS_NONE()); /* 15.3.1.3.15 */ mrb_define_method(mrb, krn, "initialize_copy", mrb_obj_init_copy, MRB_ARGS_REQ(1)); /* 15.3.1.3.16 */ mrb_define_method(mrb, krn, "inspect", mrb_obj_inspect, MRB_ARGS_NONE()); /* 15.3.1.3.17 */ - mrb_define_method(mrb, krn, "instance_eval", mrb_obj_instance_eval, MRB_ARGS_ANY()); /* 15.3.1.3.18 */ mrb_define_method(mrb, krn, "instance_of?", obj_is_instance_of, MRB_ARGS_REQ(1)); /* 15.3.1.3.19 */ mrb_define_method(mrb, krn, "instance_variable_defined?", mrb_obj_ivar_defined, MRB_ARGS_REQ(1)); /* 15.3.1.3.20 */ mrb_define_method(mrb, krn, "instance_variable_get", mrb_obj_ivar_get, MRB_ARGS_REQ(1)); /* 15.3.1.3.21 */ @@ -1192,6 +1216,9 @@ mrb_init_kernel(mrb_state *mrb) mrb_define_method(mrb, krn, "iterator?", mrb_f_block_given_p_m, MRB_ARGS_NONE()); /* 15.3.1.3.25 */ mrb_define_method(mrb, krn, "kind_of?", mrb_obj_is_kind_of_m, MRB_ARGS_REQ(1)); /* 15.3.1.3.26 */ mrb_define_method(mrb, krn, "local_variables", mrb_local_variables, MRB_ARGS_NONE()); /* 15.3.1.3.28 */ +#ifdef MRB_DEFAULT_METHOD_MISSING + mrb_define_method(mrb, krn, "method_missing", mrb_obj_missing, MRB_ARGS_ANY()); /* 15.3.1.3.30 */ +#endif mrb_define_method(mrb, krn, "methods", mrb_obj_methods_m, MRB_ARGS_OPT(1)); /* 15.3.1.3.31 */ mrb_define_method(mrb, krn, "nil?", mrb_false, MRB_ARGS_NONE()); /* 15.3.1.3.32 */ mrb_define_method(mrb, krn, "object_id", mrb_obj_id_m, MRB_ARGS_NONE()); /* 15.3.1.3.33 */ diff --git a/src/mruby_core.rake b/src/mruby_core.rake index abde441d5..4558493d9 100644 --- a/src/mruby_core.rake +++ b/src/mruby_core.rake @@ -4,11 +4,11 @@ MRuby.each_target do current_build_dir = "#{build_dir}/#{relative_from_root}" objs = Dir.glob("#{current_dir}/*.c").map { |f| - next nil if cxx_abi_enabled? and f =~ /(error|vm).c$/ + next nil if cxx_exception_enabled? and f =~ /(error|vm).c$/ objfile(f.pathmap("#{current_build_dir}/%n")) }.compact - if cxx_abi_enabled? + if cxx_exception_enabled? objs += %w(vm error).map { |v| compile_as_cxx "#{current_dir}/#{v}.c", "#{current_build_dir}/#{v}.cxx" } end self.libmruby << objs diff --git a/src/string.c b/src/string.c index 7a75bb63e..c36b7524a 100644 --- a/src/string.c +++ b/src/string.c @@ -469,7 +469,7 @@ str_substr(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len) beg += clen; if (beg < 0) return mrb_nil_value(); } - if (beg + len > clen) + if (len > clen - beg) len = clen - beg; if (len <= 0) { len = 0; @@ -519,6 +519,8 @@ str_replace(mrb_state *mrb, struct RString *s1, struct RString *s2) long len; check_frozen(mrb, s1); + s1->flags &= ~MRB_STR_NO_UTF; + s1->flags |= s2->flags&MRB_STR_NO_UTF; if (s1 == s2) return mrb_obj_value(s1); len = RSTR_LEN(s2); if (RSTR_SHARED_P(s1)) { @@ -957,8 +959,8 @@ mrb_str_cmp_m(mrb_state *mrb, mrb_value str1) else { mrb_value tmp = mrb_funcall(mrb, str2, "<=>", 1, str1); - if (mrb_nil_p(tmp)) return mrb_nil_value(); - if (!mrb_fixnum(tmp)) { + if (!mrb_nil_p(tmp)) return mrb_nil_value(); + if (!mrb_fixnum_p(tmp)) { return mrb_funcall(mrb, mrb_fixnum_value(0), "-", 1, tmp); } result = -mrb_fixnum(tmp); @@ -1166,8 +1168,11 @@ mrb_str_aref_m(mrb_state *mrb, mrb_value str) argc = mrb_get_args(mrb, "o|o", &a1, &a2); if (argc == 2) { + mrb_int n1, n2; + mrb_regexp_check(mrb, a1); - return str_substr(mrb, str, mrb_fixnum(a1), mrb_fixnum(a2)); + mrb_get_args(mrb, "ii", &n1, &n2); + return str_substr(mrb, str, n1, n2); } if (argc != 1) { mrb_raisef(mrb, E_ARGUMENT_ERROR, "wrong number of arguments (%S for 1)", mrb_fixnum_value(argc)); @@ -1586,8 +1591,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str) mrb_get_args(mrb, "*", &argv, &argc); if (argc == 2) { - pos = mrb_fixnum(argv[1]); - sub = argv[0]; + mrb_get_args(mrb, "oi", &sub, &pos); } else { pos = 0; @@ -1604,7 +1608,7 @@ mrb_str_index(mrb_state *mrb, mrb_value str) return mrb_nil_value(); } } - if (pos >= clen) return mrb_nil_value(); + if (pos > clen) return mrb_nil_value(); pos = chars2bytes(str, 0, pos); switch (mrb_type(sub)) { @@ -1771,7 +1775,7 @@ mrb_str_reverse_bang(mrb_state *mrb, mrb_value str) mrb_str_modify(mrb, mrb_str_ptr(str)); len = RSTRING_LEN(str); - buf = mrb_malloc(mrb, (size_t)len); + buf = (char*)mrb_malloc(mrb, (size_t)len); p = buf; e = buf + len; @@ -1852,14 +1856,11 @@ mrb_str_rindex(mrb_state *mrb, mrb_value str) mrb_value *argv; mrb_int argc; mrb_value sub; - mrb_value vpos; mrb_int pos, len = RSTRING_CHAR_LEN(str); mrb_get_args(mrb, "*", &argv, &argc); if (argc == 2) { - sub = argv[0]; - vpos = argv[1]; - pos = mrb_fixnum(vpos); + mrb_get_args(mrb, "oi", &sub, &pos); if (pos < 0) { pos += len; if (pos < 0) { @@ -2644,7 +2645,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str) } #endif c = *p; - if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p, pend))) { + if (c == '"'|| c == '\\' || (c == '#' && IS_EVSTR(p+1, pend))) { buf[0] = '\\'; buf[1] = c; mrb_str_cat(mrb, result, buf, 2); continue; @@ -40,6 +40,11 @@ void abort(void); #define MRB_STACK_GROWTH 128 #endif +/* Maximum mrb_funcall() depth. Should be set lower on memory constrained systems. */ +#ifndef MRB_FUNCALL_DEPTH_MAX +#define MRB_FUNCALL_DEPTH_MAX 512 +#endif + /* Maximum stack depth. Should be set lower on memory constrained systems. The value below allows about 60000 recursive calls in the simplest case. */ #ifndef MRB_STACK_MAX @@ -162,13 +167,16 @@ stack_extend_alloc(mrb_state *mrb, int room, int keep) to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */ if (size > MRB_STACK_MAX) { init_new_stack_space(mrb, room, keep); - mrb_raise(mrb, E_SYSSTACK_ERROR, "stack level too deep. (limit=" MRB_STRINGIZE(MRB_STACK_MAX) ")"); + mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err)); } } static inline void stack_extend(mrb_state *mrb, int room, int keep) { + if (room < keep) { + room = keep; + } if (mrb->c->stack + room >= mrb->c->stend) { stack_extend_alloc(mrb, room, keep); } @@ -283,6 +291,9 @@ ecall(mrb_state *mrb, int i) int cioff; if (i<0) return; + if (mrb->c->ci - mrb->c->cibase > MRB_FUNCALL_DEPTH_MAX) { + mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err)); + } p = mrb->c->ensure[i]; if (!p) return; if (mrb->c->ci->eidx > i) @@ -380,6 +391,9 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc undef = mid; argc++; } + if (mrb->c->ci - mrb->c->cibase > MRB_FUNCALL_DEPTH_MAX) { + mrb_exc_raise(mrb, mrb_obj_value(mrb->stack_err)); + } ci = cipush(mrb); ci->mid = mid; ci->proc = p; @@ -504,15 +518,19 @@ mrb_f_send(mrb_state *mrb, mrb_value self) mrb_callinfo *ci; mrb_get_args(mrb, "n*&", &name, &argv, &argc, &block); + ci = mrb->c->ci; + if (ci->acc < 0) { + funcall: + return mrb_funcall_with_block(mrb, self, name, argc, argv, block); + } c = mrb_class(mrb, self); p = mrb_method_search_vm(mrb, &c, name); if (!p) { /* call method_mising */ - return mrb_funcall_with_block(mrb, self, name, argc, argv, block); + goto funcall; } - ci = mrb->c->ci; ci->mid = name; ci->target_class = c; regs = mrb->c->stack+1; @@ -548,6 +566,7 @@ eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c) p = mrb_proc_ptr(blk); ci->proc = p; ci->argc = 1; + ci->mid = ci[-1].mid; if (MRB_PROC_CFUNC_P(p)) { stack_extend(mrb, 3, 0); mrb->c->stack[0] = self; @@ -1063,8 +1082,44 @@ RETRY_TRY_BLOCK: } CASE(OP_RESCUE) { - /* A R(A) := exc; clear(exc) */ - SET_OBJ_VALUE(regs[GETARG_A(i)], mrb->exc); + /* A B R(A) := exc; clear(exc); R(B) := matched (bool) */ + int a = GETARG_A(i); + int b = GETARG_B(i); + int c = GETARG_C(i); + mrb_value exc; + + if (b != 0) { + mrb_value e = regs[b]; + struct RClass *ec; + + if (c == 0) { + exc = mrb_obj_value(mrb->exc); + } + else { /* continued; exc taken from R(A) */ + exc = regs[a]; + } + switch (mrb_type(e)) { + case MRB_TT_CLASS: + case MRB_TT_MODULE: + break; + default: + mrb_raise(mrb, E_TYPE_ERROR, "class or module required for rescue clause"); + break; + } + ec = mrb_class_ptr(e); + if (mrb_obj_is_kind_of(mrb, exc, ec)) { + regs[b] = mrb_true_value(); + } + else { + regs[b] = mrb_false_value(); + } + } + else if (c == 0) { + exc = mrb_obj_value(mrb->exc); + } + if (a != 0 && c == 0) { + regs[GETARG_A(i)] = exc; + } mrb->exc = 0; NEXT; } @@ -1152,6 +1207,7 @@ RETRY_TRY_BLOCK: else { mrb_value blk = regs[bidx]; if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) { + ci->nregs = bidx+1; regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc"); } } @@ -1174,16 +1230,13 @@ RETRY_TRY_BLOCK: mrb_method_missing(mrb, mid, recv, args); } mid = missing; - if (n == CALL_MAXARGS) { - mrb_ary_unshift(mrb, regs[a+1], sym); - } - else { - value_move(regs+a+2, regs+a+1, ++n); - regs[a+1] = sym; - if (n == CALL_MAXARGS) { - regs[a+1] = mrb_ary_new_from_values(mrb, n, regs+a+1); - } + if (n != CALL_MAXARGS) { + mrb_value blk = regs[bidx]; + regs[a+1] = mrb_ary_new_from_values(mrb, n, regs+a+1); + regs[a+2] = blk; + n = CALL_MAXARGS; } + mrb_ary_unshift(mrb, regs[a+1], sym); } /* push callinfo */ @@ -1309,7 +1362,9 @@ RETRY_TRY_BLOCK: else { stack_extend(mrb, irep->nregs, ci->argc+2); } - regs[0] = m->env->stack[0]; + if(m->env) { + regs[0] = m->env->stack[0]; + } pc = irep->iseq; JUMP; } @@ -1325,7 +1380,7 @@ RETRY_TRY_BLOCK: int a = GETARG_A(i); int n = GETARG_C(i); - if (mid == 0 || !mrb->c->ci->target_class) { + if (mid == 0 || !ci->target_class) { mrb_value exc; exc = mrb_exc_new_str_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method"); @@ -1350,6 +1405,10 @@ RETRY_TRY_BLOCK: mrb_method_missing(mrb, mid, recv, args); } mid = missing; + if (n == CALL_MAXARGS-1) { + regs[a+1] = mrb_ary_new_from_values(mrb, n, regs+a+1); + n++; + } if (n == CALL_MAXARGS) { mrb_ary_unshift(mrb, regs[a+1], mrb_symbol_value(ci->mid)); } @@ -1364,14 +1423,27 @@ RETRY_TRY_BLOCK: ci->mid = mid; ci->proc = m; ci->stackent = mrb->c->stack; - if (n == CALL_MAXARGS) { - ci->argc = -1; - } - else { - ci->argc = n; - } ci->target_class = c; ci->pc = pc + 1; + { + int bidx; + mrb_value blk; + + if (n == CALL_MAXARGS) { + ci->argc = -1; + bidx = a+2; + } + else { + ci->argc = n; + bidx = a+n+1; + } + blk = regs[bidx]; + if (!mrb_nil_p(blk) && mrb_type(blk) != MRB_TT_PROC) { + ci->nregs = bidx+1; + regs[bidx] = mrb_convert_type(mrb, blk, MRB_TT_PROC, "Proc", "to_proc"); + ci = mrb->c->ci; + } + } /* prepare stack */ mrb->c->stack += a; @@ -1586,17 +1658,14 @@ RETRY_TRY_BLOCK: stk = mrb->c->stack; while (ci[0].ridx == ci[-1].ridx) { cipop(mrb); - ci = mrb->c->ci; - mrb->c->stack = ci[1].stackent; - if (ci[1].acc == CI_ACC_SKIP && prev_jmp) { + mrb->c->stack = ci->stackent; + if (ci->acc == CI_ACC_SKIP && prev_jmp) { mrb->jmp = prev_jmp; MRB_THROW(prev_jmp); } + ci = mrb->c->ci; if (ci == mrb->c->cibase) { mrb->c->stack = stk; - while (eidx > 0) { - ecall(mrb, --eidx); - } if (ci->ridx == 0) { if (mrb->c == mrb->root_c) { mrb->c->stack = mrb->c->stbase; @@ -1636,20 +1705,31 @@ RETRY_TRY_BLOCK: switch (GETARG_B(i)) { case OP_R_RETURN: /* Fall through to OP_R_NORMAL otherwise */ - if (proc->env && !MRB_PROC_STRICT_P(proc)) { + if (ci->acc >=0 && proc->env && !MRB_PROC_STRICT_P(proc)) { struct REnv *e = top_env(mrb, proc); + mrb_callinfo *ce; if (!MRB_ENV_STACK_SHARED_P(e)) { localjump_error(mrb, LOCALJUMP_ERROR_RETURN); goto L_RAISE; } - ci = mrb->c->cibase + e->cioff; - if (ci == mrb->c->cibase) { + + ce = mrb->c->cibase + e->cioff; + while (--ci > ce) { + if (ci->env) { + mrb_env_unshare(mrb, ci->env); + } + if (ci->acc < 0) { + localjump_error(mrb, LOCALJUMP_ERROR_RETURN); + goto L_RAISE; + } + } + if (ce == mrb->c->cibase) { localjump_error(mrb, LOCALJUMP_ERROR_RETURN); goto L_RAISE; } mrb->c->stack = mrb->c->ci->stackent; - mrb->c->ci = ci; + mrb->c->ci = ce; break; } case OP_R_NORMAL: @@ -1690,6 +1770,9 @@ RETRY_TRY_BLOCK: mrb->c->ci = ci; break; } + if (ci->env) { + mrb_env_unshare(mrb, ci->env); + } ci--; } break; @@ -1705,10 +1788,11 @@ RETRY_TRY_BLOCK: mrb->jmp = prev_jmp; return v; } - cipop(mrb); + ci = mrb->c->ci; acc = ci->acc; mrb->c->stack = ci->stackent; - if (acc == CI_ACC_SKIP) { + cipop(mrb); + if (acc == CI_ACC_SKIP || acc == CI_ACC_DIRECT) { mrb->jmp = prev_jmp; return v; } @@ -1810,7 +1894,7 @@ RETRY_TRY_BLOCK: if (lv == 0) stack = regs + 1; else { struct REnv *e = uvenv(mrb, lv-1); - if (!e) { + if (!e || e->mid == 0) { localjump_error(mrb, LOCALJUMP_ERROR_YIELD); goto L_RAISE; } @@ -2542,3 +2626,13 @@ mrb_top_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int sta return v; } + +#if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus) +# if !defined(MRB_ENABLE_CXX_ABI) +} /* end of extern "C" */ +# endif +mrb_int mrb_jmpbuf::jmpbuf_id = 0; +# if !defined(MRB_ENABLE_CXX_ABI) +extern "C" { +# endif +#endif diff --git a/tasks/gitlab.rake b/tasks/gitlab.rake new file mode 100644 index 000000000..471172377 --- /dev/null +++ b/tasks/gitlab.rake @@ -0,0 +1,118 @@ +CI_VERSION = '0.7'.freeze +CI_BASE = 'ubuntu:16.10'.freeze +CI_COMPILERS = ['gcc-4.7', + 'gcc-4.8', + 'gcc-4.9', + 'gcc-5', + 'gcc-6', + 'clang-3.5', + 'clang-3.6', + 'clang-3.7', + 'clang-3.8', + 'clang-3.9'].freeze + +def ci_image_tag(compiler) + compiler.tr('+', 'c').delete('-').delete('.') +end + +def ci_docker_tag(compiler) + tag = ci_image_tag(compiler) + "registry.gitlab.com/dabroz/mruby:#{tag}_#{CI_VERSION}" +end + +def run_cmd(cmd) + puts cmd + raise 'error' unless system cmd +end + +desc 'recreate docker images for GitLab builds' +task :gitlab_dockers do + CI_COMPILERS.each do |compiler| + tag = ci_image_tag(compiler) + filename = "Dockerfile.#{tag}" + File.open(filename, 'wb') do |f| + f << "# #{compiler} - #{tag}\n" + f << "FROM #{CI_BASE}\n" + f << "RUN apt-get update && apt-get install -y git ruby2.3 ruby2.3-dev bison\n" + f << "RUN apt-get update && apt-get install -y binutils manpages\n" + f << "RUN apt-get update && apt-get install -y #{compiler}\n" + if compiler['gcc'] + f << "RUN apt-get update && apt-get install -y libx32#{compiler}-dev\n" + f << "RUN apt-get update && apt-get install --no-install-recommends -y #{compiler}-multilib\n" + end + f << "RUN dpkg --add-architecture i386\n" + f << "RUN apt-get update && apt-get install -y linux-libc-dev:i386\n" + if compiler['clang'] + f << "RUN apt-get update && apt-get install --no-install-recommends -y libc6-dev-i386\n" + f << "RUN apt-get update && apt-get install -y gcc gcc-multilib\n" + end + end + docker_tag = ci_docker_tag(compiler) + cmd1 = "docker build -t #{docker_tag} -f #{filename} ." + cmd2 = "docker push #{docker_tag}" + run_cmd cmd1 + run_cmd cmd2 + File.delete(filename) + end +end + +desc 'create build configurations and update .gitlab-ci.yml' +task :gitlab_config do + require 'yaml' + + configs = [] + [true, false].each do |mode_32| + ['', 'MRB_USE_FLOAT'].each do |float_conf| + ['', 'MRB_INT16', 'MRB_INT64'].each do |int_conf| + ['', 'MRB_NAN_BOXING', 'MRB_WORD_BOXING'].each do |boxing_conf| + ['', 'MRB_UTF8_STRING'].each do |utf8_conf| + next if (float_conf == 'MRB_USE_FLOAT') && (boxing_conf == 'MRB_NAN_BOXING') + next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_NAN_BOXING') + next if (int_conf == 'MRB_INT16') && (boxing_conf == 'MRB_WORD_BOXING') + next if (int_conf == 'MRB_INT64') && (boxing_conf == 'MRB_WORD_BOXING') && mode_32 + env = [float_conf, int_conf, boxing_conf, utf8_conf].map do |conf| + conf == '' ? nil : "-D#{conf}=1" + end.compact.join(' ') + bit = mode_32 ? '-m32 ' : '' + _info = '' + _info += mode_32 ? '32bit ' : '64bit ' + _info += float_conf['USE'] ? 'float ' : '' + _info += int_conf['16'] ? 'int16 ' : '' + _info += int_conf['64'] ? 'int64 ' : '' + _info += boxing_conf['NAN'] ? 'nan ' : '' + _info += boxing_conf['word'] ? 'word ' : '' + _info += utf8_conf['UTF8'] ? 'utf8 ' : '' + _info = _info.gsub(/ +/, ' ').strip.tr(' ', '_') + configs << { '_info' => _info, 'CFLAGS' => "#{bit}#{env}", 'LDFLAGS' => bit.strip.to_s } + end + end + end + end + end + path = './.gitlab-ci.yml' + data = YAML.load_file(path) + data.keys.select do |key| + key.start_with? 'Test' + end.each do |key| + data.delete(key) + end + CI_COMPILERS.each do |compiler| + configs.each do |config| + name = "Test #{compiler} #{config['_info']}" + hash = { + 'CC' => compiler, + 'CXX' => compiler.gsub('gcc', 'g++').gsub('clang', 'clang++'), + 'LD' => compiler + } + hash = hash.merge(config) + hash.delete('_info') + data[name] = { + 'stage' => 'test', + 'image' => ci_docker_tag(compiler), + 'variables' => hash, + 'script' => 'env; ./minirake --verbose all test' + } + end + end + File.open(path, 'w') { |f| YAML.dump(data, f) } +end diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake index 3053c3d49..1f7cde529 100644 --- a/tasks/mrbgem_spec.rake +++ b/tasks/mrbgem_spec.rake @@ -90,7 +90,9 @@ module MRuby build.libmruby << @objs instance_eval(&@build_config_initializer) if @build_config_initializer + end + def setup_compilers compilers.each do |compiler| compiler.define_rules build_dir, "#{dir}" compiler.defines << %Q[MRBGEM_#{funcname.upcase}_VERSION=#{version}] @@ -419,6 +421,8 @@ module MRuby @ary = tsort_dependencies gem_table.keys, gem_table, true + each(&:setup_compilers) + each do |g| import_include_paths(g) end diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index bd911493d..f5d4374d1 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -83,8 +83,9 @@ module MRuby @bins = [] @gems, @libmruby = MRuby::Gem::List.new, [] @build_mrbtest_lib_only = false - @cxx_abi_enabled = false + @cxx_exception_enabled = false @cxx_exception_disabled = false + @cxx_abi_enabled = false @enable_bintest = false @enable_test = false @toolchains = [] @@ -110,16 +111,43 @@ module MRuby end def disable_cxx_exception + if @cxx_exception_enabled or @cxx_abi_enabled + raise "cxx_exception already enabled" + end @cxx_exception_disabled = true end + def enable_cxx_exception + return if @cxx_exception_enabled + return if @cxx_abi_enabled + if @cxx_exception_disabled + raise "cxx_exception disabled" + end + @cxx_exception_enabled = true + compilers.each { |c| + c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) + c.flags << c.cxx_exception_flag + } + linker.command = cxx.command if toolchains.find { |v| v == 'gcc' } + end + + def cxx_exception_enabled? + @cxx_exception_enabled + end + def cxx_abi_enabled? @cxx_abi_enabled end def enable_cxx_abi - return if @cxx_exception_disabled or @cxx_abi_enabled - compilers.each { |c| c.defines += %w(MRB_ENABLE_CXX_EXCEPTION) } + return if @cxx_abi_enabled + if @cxx_exception_enabled + raise "cxx_exception already enabled" + end + compilers.each { |c| + c.defines += %w(MRB_ENABLE_CXX_EXCEPTION MRB_ENABLE_CXX_ABI) + c.flags << c.cxx_compile_flag + } compilers.each { |c| c.flags << c.cxx_compile_flag } linker.command = cxx.command if toolchains.find { |v| v == 'gcc' } @cxx_abi_enabled = true @@ -136,15 +164,13 @@ module MRuby #define __STDC_CONSTANT_MACROS #define __STDC_LIMIT_MACROS -#ifndef MRB_ENABLE_CXX_EXCEPTION +#ifndef MRB_ENABLE_CXX_ABI extern "C" { #endif #include "#{src}" -#ifndef MRB_ENABLE_CXX_EXCEPTION +#ifndef MRB_ENABLE_CXX_ABI } #endif - -#{src == "#{MRUBY_ROOT}/src/error.c"? 'mrb_int mrb_jmpbuf::jmpbuf_id = 0;' : ''} EOS end diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index d688077ff..694b4a24c 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -41,7 +41,7 @@ module MRuby class Command::Compiler < Command attr_accessor :flags, :include_paths, :defines, :source_exts attr_accessor :compile_options, :option_define, :option_include_path, :out_ext - attr_accessor :cxx_compile_flag + attr_accessor :cxx_compile_flag, :cxx_exception_flag def initialize(build, source_exts=[]) super(build) diff --git a/tasks/mruby_build_gem.rake b/tasks/mruby_build_gem.rake index 9a802097f..b48df6510 100644 --- a/tasks/mruby_build_gem.rake +++ b/tasks/mruby_build_gem.rake @@ -38,7 +38,7 @@ module MRuby cxx_srcs = ['src', 'test', 'tools'].map do |subdir| Dir.glob("#{Gem.current.dir}/#{subdir}/*.{cpp,cxx,cc}") end.flatten - enable_cxx_abi unless cxx_srcs.empty? + enable_cxx_exception unless cxx_srcs.empty? Gem.current end diff --git a/tasks/toolchains/android.rake b/tasks/toolchains/android.rake index 0cc60a7a3..e69dbf5a6 100644 --- a/tasks/toolchains/android.rake +++ b/tasks/toolchains/android.rake @@ -186,6 +186,22 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter @platform end + def armeabi_v7a_mfpu + @armeabi_v7a_mfpu ||= (params[:mfpu] || 'vfpv3-d16').to_s + end + + def armeabi_v7a_mfloat_abi + @armeabi_v7a_mfloat_abi ||= (params[:mfloat_abi] || 'softfp').to_s + end + + def no_warn_mismatch + if %W(soft softfp).include? armeabi_v7a_mfloat_abi + '' + else + ',--no-warn-mismatch' + end + end + def cc case toolchain when :gcc then bin_gcc('gcc') @@ -200,24 +216,21 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter end end - def cflags + def ctarget flags = [] - flags += %W(-D__android__ --sysroot="#{sysroot}") case toolchain when :gcc - flags += %W(-mandroid) case arch when /armeabi-v7a/ then flags += %W(-march=armv7-a) when /armeabi/ then flags += %W(-march=armv5te) when /arm64-v8a/ then flags += %W(-march=armv8-a) when /x86_64/ then flags += %W(-march=x86-64) when /x86/ then flags += %W(-march=i686) - when /mips64/ then flags += %W(-march=mips64) + when /mips64/ then flags += %W(-march=mips64r6) when /mips/ then flags += %W(-march=mips32) end when :clang - flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}") case arch when /armeabi-v7a/ then flags += %W(-target armv7-none-linux-androideabi) when /armeabi/ then flags += %W(-target armv5te-none-linux-androideabi) @@ -229,9 +242,66 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter end end + case arch + when /armeabi-v7a/ then flags += %W(-mfpu=#{armeabi_v7a_mfpu} -mfloat-abi=#{armeabi_v7a_mfloat_abi}) + when /armeabi/ then flags += %W(-mtune=xscale -msoft-float) + when /arm64-v8a/ then flags += %W() + when /x86_64/ then flags += %W() + when /x86/ then flags += %W() + when /mips64/ then flags += %W(-fmessage-length=0) + when /mips/ then flags += %W(-fmessage-length=0) + end + + flags + end + + def cflags + flags = [] + + flags += %W(-MMD -MP -D__android__ -DANDROID --sysroot="#{sysroot}") + flags += ctarget + case toolchain + when :gcc + when :clang + flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}" -Wno-invalid-command-line-argument -Wno-unused-command-line-argument) + end + flags += %W(-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes) + + flags + end + + def ldflags + flags = [] + + flags += %W(--sysroot="#{sysroot}") + flags end + def ldflags_before_libraries + flags = [] + + case toolchain + when :gcc + case arch + when /armeabi-v7a/ then flags += %W(-Wl#{no_warn_mismatch}) + end + when :clang + flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}") + case arch + when /armeabi-v7a/ then flags += %W(-target armv7-none-linux-androideabi -Wl,--fix-cortex-a8#{no_warn_mismatch}) + when /armeabi/ then flags += %W(-target armv5te-none-linux-androideabi) + when /arm64-v8a/ then flags += %W(-target aarch64-none-linux-android) + when /x86_64/ then flags += %W(-target x86_64-none-linux-android) + when /x86/ then flags += %W(-target i686-none-linux-android) + when /mips64/ then flags += %W(-target mips64el-none-linux-android) + when /mips/ then flags += %W(-target mipsel-none-linux-android) + end + end + flags += %W(-no-canonical-prefixes) + + flags + end end MRuby::Toolchain.new(:android) do |conf, params| @@ -246,5 +316,6 @@ MRuby::Toolchain.new(:android) do |conf, params| conf.archiver.command = android.ar conf.linker.command = android.cc - conf.linker.flags = [] + conf.linker.flags = android.ldflags + conf.linker.flags_before_libraries = android.ldflags_before_libraries end diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake index 59ae015ac..f370c0abf 100644 --- a/tasks/toolchains/gcc.rake +++ b/tasks/toolchains/gcc.rake @@ -7,6 +7,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| cc.option_define = '-D%s' cc.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' cc.cxx_compile_flag = '-x c++ -std=c++03' + cc.cxx_exception_flag = '-fexceptions' end [conf.cxx].each do |cxx| @@ -17,6 +18,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params| cxx.option_define = '-D%s' cxx.compile_options = '%{flags} -MMD -o %{outfile} -c %{infile}' cxx.cxx_compile_flag = '-x c++ -std=c++03' + cxx.cxx_exception_flag = '-fexceptions' end conf.linker do |linker| diff --git a/tasks/toolchains/visualcpp.rake b/tasks/toolchains/visualcpp.rake index 5f5bab9c2..5bc24a73a 100644 --- a/tasks/toolchains/visualcpp.rake +++ b/tasks/toolchains/visualcpp.rake @@ -8,6 +8,7 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| cc.option_define = '/D%s' cc.compile_options = "%{flags} /Fo%{outfile} %{infile}" cc.cxx_compile_flag = '/TP' + cc.cxx_exception_flag = '/EHs' end conf.cxx do |cxx| @@ -18,6 +19,7 @@ MRuby::Toolchain.new(:visualcpp) do |conf, _params| cxx.option_define = '/D%s' cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}" cxx.cxx_compile_flag = '/TP' + cxx.cxx_exception_flag = '/EHs' end conf.linker do |linker| diff --git a/test/t/kernel.rb b/test/t/kernel.rb index ca4b73907..aff2dd461 100644 --- a/test/t/kernel.rb +++ b/test/t/kernel.rb @@ -549,11 +549,10 @@ assert('Kernel.local_variables', '15.3.1.2.7') do vars = Kernel.local_variables.sort assert_equal [:a, :b, :vars], vars - Proc.new { + assert_equal [:a, :b, :c, :vars], Proc.new { |a, b| c = 2 - vars = Kernel.local_variables.sort - assert_equal [:a, :b, :c, :vars], vars - }.call + Kernel.local_variables.sort + }.call(-1, -2) end assert('Kernel#!=') do diff --git a/test/t/nomethoderror.rb b/test/t/nomethoderror.rb index 41a3ba14f..5fed79689 100644 --- a/test/t/nomethoderror.rb +++ b/test/t/nomethoderror.rb @@ -20,52 +20,3 @@ assert('NoMethodError#args', '15.2.32.2.1') do end end end - -assert('Can still raise when BasicObject#method_missing is removed') do - assert_raise(NoMethodError) do - begin - BasicObject.alias_method(:old_method_missing, :method_missing) - BasicObject.remove_method(:method_missing) - 1.__send__(:foo) - ensure - BasicObject.alias_method(:method_missing, :old_method_missing) - BasicObject.remove_method(:old_method_missing) - end - end -end - -assert('Can still call super when BasicObject#method_missing is removed') do - assert_raise(NoMethodError) do - class A - def foo - super - end - end - begin - BasicObject.alias_method(:old_method_missing, :method_missing) - BasicObject.remove_method(:method_missing) - A.new.foo - ensure - BasicObject.alias_method(:method_missing, :old_method_missing) - BasicObject.remove_method(:old_method_missing) - end - end -end - -assert("NoMethodError#new does not return an exception") do - begin - class << NoMethodError - def new(*) - nil - end - end - - assert_raise(TypeError) do - Object.q - end - ensure - class << NoMethodError - remove_method :new - end - end -end diff --git a/test/t/string.rb b/test/t/string.rb index 20dc49d92..ddc74fa54 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -341,6 +341,12 @@ assert('String#each_line', '15.2.10.5.15') do end assert_equal list, n_list + + n_list.clear + a.each_line("li") do |line| + n_list << line + end + assert_equal ["first li", "ne\nsecond li", "ne\nthird li", "ne"], n_list end assert('String#empty?', '15.2.10.5.16') do @@ -365,6 +371,8 @@ assert('String#gsub', '15.2.10.5.18') do assert_equal('$$a$$', '##a##'.gsub('##'){|w| '$$' }, 'mruby/mruby#847 another case with block') assert_equal('A', 'a'.gsub('a', 'A')) assert_equal('A', 'a'.gsub('a'){|w| w.capitalize }) + assert_equal("<a><><>", 'a'.gsub('a', '<\0><\1><\2>')) + assert_equal(".h.e.l.l.o.", "hello".gsub("", ".")) end assert('String#gsub with backslash') do @@ -402,6 +410,8 @@ assert('String#index', '15.2.10.5.22') do assert_equal 0, 'abc'.index('a') assert_nil 'abc'.index('d') assert_equal 3, 'abcabc'.index('a', 1) + assert_equal 5, "hello".index("", 5) + assert_equal nil, "hello".index("", 6) end assert('String#initialize', '15.2.10.5.23') do |
