From b03f1f78e3f1bab579b21219bbecffb6eb4b7020 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Sat, 11 Aug 2018 00:28:32 +0900 Subject: Fix misspelling words in comments --- doc/guides/mrbgems.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/guides') diff --git a/doc/guides/mrbgems.md b/doc/guides/mrbgems.md index 8dac0dc86..0fcc936ed 100644 --- a/doc/guides/mrbgems.md +++ b/doc/guides/mrbgems.md @@ -179,11 +179,11 @@ Version requirement supports following operators: When more than one version requirements is passed, the dependency must satisfy all of it. -You can have default gem to use as depedency when it's not defined in *build_config.rb*. +You can have default gem to use as dependency when it's not defined in *build_config.rb*. When the last argument of `add_dependency` call is `Hash`, it will be treated as default gem information. Its format is same as argument of method `MRuby::Build#gem`, expect that it can't be treated as path gem location. -When a special version of depedency is required, +When a special version of dependency is required, use `MRuby::Build#gem` in *build_config.rb* to override default gem. If you have conflicting GEMs use the following method: -- cgit v1.2.3 From 1c09046c13fc0a763583c6da0f1d350f6c41c4ca Mon Sep 17 00:00:00 2001 From: Hiroshi Mimaki Date: Tue, 11 Dec 2018 10:52:20 +0900 Subject: Update release date. --- README.md | 2 +- doc/guides/debugger.md | 2 +- doc/limitations.md | 14 +++++++------- include/mruby/version.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/guides') diff --git a/README.md b/README.md index 529091bdc..e43510ebe 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ of the Ministry of Economy, Trade and Industry of Japan. ## How to get mruby -The stable version 1.4.1 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/1.4.1.zip](https://github.com/mruby/mruby/archive/1.4.1.zip) +The stable version 2.0.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.0.0.zip](https://github.com/mruby/mruby/archive/2.0.0.zip) The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master) diff --git a/doc/guides/debugger.md b/doc/guides/debugger.md index 1cc7a9a39..b433a5ac5 100644 --- a/doc/guides/debugger.md +++ b/doc/guides/debugger.md @@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option: ```bash $ mrdb --version -mruby 1.4.1 (2018-4-27) +mruby 2.0.0 (2018-12-11) ``` ## 2.2 Basic Operation diff --git a/doc/limitations.md b/doc/limitations.md index 825435f01..23017ccbe 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -38,7 +38,7 @@ puts [1,2,3] 3 ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] ``` [1, 2, 3] @@ -61,7 +61,7 @@ end ```ZeroDivisionError``` is raised. -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] No exception is raised. @@ -119,7 +119,7 @@ false true ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] ``` true @@ -142,7 +142,7 @@ defined?(Foo) nil ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] ```NameError``` is raised. @@ -159,7 +159,7 @@ alias $a $__a__ ``` nil ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] Syntax error @@ -181,7 +181,7 @@ end ```ArgumentError``` is raised. The re-defined ```+``` operator does not accept any arguments. -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] ``` 'ab' ``` Behavior of the operator wasn't changed. @@ -197,7 +197,7 @@ $ ruby -e 'puts Proc.new {}.binding' # ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.0 (2018-12-11)] ``` $ ./bin/mruby -e 'puts Proc.new {}.binding' diff --git a/include/mruby/version.h b/include/mruby/version.h index daeca4b75..680533ab4 100644 --- a/include/mruby/version.h +++ b/include/mruby/version.h @@ -67,12 +67,12 @@ MRB_BEGIN_DECL /* * Release month. */ -#define MRUBY_RELEASE_MONTH 4 +#define MRUBY_RELEASE_MONTH 12 /* * Release day. */ -#define MRUBY_RELEASE_DAY 27 +#define MRUBY_RELEASE_DAY 11 /* * Release date as a string. -- cgit v1.2.3 From 7c91efc1ffda769a5f1a872c646c82b00698f1b8 Mon Sep 17 00:00:00 2001 From: Hiroshi Mimaki Date: Thu, 4 Apr 2019 09:26:40 +0900 Subject: Update version and release date. `mruby 2.0.1 (2019-4-4)` --- README.md | 2 +- doc/guides/debugger.md | 2 +- doc/limitations.md | 18 +++++++++--------- include/mruby.h | 2 +- include/mruby/version.h | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'doc/guides') diff --git a/README.md b/README.md index c3e9ae10a..3e71ef7ca 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ of the Ministry of Economy, Trade and Industry of Japan. ## How to get mruby -The stable version 2.0.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.0.0.zip](https://github.com/mruby/mruby/archive/2.0.0.zip) +The stable version 2.0.1 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/2.0.1.zip](https://github.com/mruby/mruby/archive/2.0.1.zip) The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master) diff --git a/doc/guides/debugger.md b/doc/guides/debugger.md index b433a5ac5..81c0e9d63 100644 --- a/doc/guides/debugger.md +++ b/doc/guides/debugger.md @@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option: ```bash $ mrdb --version -mruby 2.0.0 (2018-12-11) +mruby 2.0.1 (2019-4-4) ``` ## 2.2 Basic Operation diff --git a/doc/limitations.md b/doc/limitations.md index 23017ccbe..9b4ed9c6f 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -38,7 +38,7 @@ puts [1,2,3] 3 ``` -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] ``` [1, 2, 3] @@ -61,7 +61,7 @@ end ```ZeroDivisionError``` is raised. -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] No exception is raised. @@ -89,7 +89,7 @@ p Liste.new "foobar" ``` [] ``` -#### mruby [1.4.1 (2018-4-27)] +#### mruby [2.0.1 (2019-4-4)] ```ArgumentError``` is raised. @@ -119,7 +119,7 @@ false true ``` -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] ``` true @@ -142,7 +142,7 @@ defined?(Foo) nil ``` -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] ```NameError``` is raised. @@ -159,7 +159,7 @@ alias $a $__a__ ``` nil ``` -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] Syntax error @@ -181,7 +181,7 @@ end ```ArgumentError``` is raised. The re-defined ```+``` operator does not accept any arguments. -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] ``` 'ab' ``` Behavior of the operator wasn't changed. @@ -197,7 +197,7 @@ $ ruby -e 'puts Proc.new {}.binding' # ``` -#### mruby [2.0.0 (2018-12-11)] +#### mruby [2.0.1 (2019-4-4)] ``` $ ./bin/mruby -e 'puts Proc.new {}.binding' @@ -219,7 +219,7 @@ $ ruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)' [[{"a"=>1}], {:b=>2}] ``` -#### mruby [mruby 2.0.0] +#### mruby [mruby 2.0.1] ``` $ ./bin/mruby -e 'def m(*r,**k) p [r,k] end; m("a"=>1,:b=>2)' diff --git a/include/mruby.h b/include/mruby.h index d891d0f5c..5b0d84cd3 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -1,7 +1,7 @@ /* ** mruby - An embeddable Ruby implementation ** -** Copyright (c) mruby developers 2010-2018 +** Copyright (c) mruby developers 2010-2019 ** ** Permission is hereby granted, free of charge, to any person obtaining ** a copy of this software and associated documentation files (the diff --git a/include/mruby/version.h b/include/mruby/version.h index 680533ab4..e7763732c 100644 --- a/include/mruby/version.h +++ b/include/mruby/version.h @@ -47,7 +47,7 @@ MRB_BEGIN_DECL /* * Tiny release version number. */ -#define MRUBY_RELEASE_TEENY 0 +#define MRUBY_RELEASE_TEENY 1 /* * The mruby version. @@ -62,17 +62,17 @@ MRB_BEGIN_DECL /* * Release year. */ -#define MRUBY_RELEASE_YEAR 2018 +#define MRUBY_RELEASE_YEAR 2019 /* * Release month. */ -#define MRUBY_RELEASE_MONTH 12 +#define MRUBY_RELEASE_MONTH 4 /* * Release day. */ -#define MRUBY_RELEASE_DAY 11 +#define MRUBY_RELEASE_DAY 4 /* * Release date as a string. -- cgit v1.2.3 From b57f61ac95254cdd9becf8aab1e4e15bae404564 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 27 Apr 2019 22:28:54 +0900 Subject: Update document for any configurations - (Modify) `MRB_INT16` - (Add) `MRB_INT32` - (Modify) `MRB_INT64` - (Add) `MRB_USE_ETEXT_EDATA` - (Add) `MRB_NO_INIT_ARRAY_START - (Add) `MRB_WITHOUT_FLOAT` - (Add) `MRB_METHOD_CACHE` - (Add) `MRB_METHOD_CACHE_SIZE` - (Add) `MRB_METHOD_TABLE_INLINE - (Add) `MRB_ENABLE_ALL_SYMBOLS` --- doc/guides/mrbconf.md | 49 +++++++++++++++++++++++++++++++++++++++++++------ include/mrbconf.h | 9 +++++++-- 2 files changed, 50 insertions(+), 8 deletions(-) (limited to 'doc/guides') diff --git a/doc/guides/mrbconf.md b/doc/guides/mrbconf.md index f957f8ce2..4e3a81aa3 100644 --- a/doc/guides/mrbconf.md +++ b/doc/guides/mrbconf.md @@ -50,15 +50,21 @@ You can use mrbconfs with following ways: * When defined single precision floating point type(C type `float`) is used as `mrb_float`. * Else double precision floating point type(C type `double`) is used as `mrb_float`. +`MRB_WITHOUT_FLOAT` +* When defined removes floating point numbers from mruby. +* It makes mruby easier to handle in "Microcontroller without FPU" and "Kernel Space". + `MRB_INT16` * When defined `int16_t` will be defined as `mrb_int`. -* Conflicts with `MRB_INT64`. +* Conflicts with `MRB_INT32` and `MRB_INT64`. + +`MRB_INT32` +* When defined, or both `MRB_INT16` and `MRB_INT64` are not defined on 32-bit CPU mode, `int32_t` will be defined as `mrb_int`. +* Conflicts with `MRB_INT16` and `MRB_INT64`. `MRB_INT64` -* When defined `int64_t` will be defined as `mrb_int`. -* Conflicts with `MRB_INT16`. -* When `MRB_INT16` or `MRB_INT64` isn't defined `int`(most of the times 32-bit integer) -will be defined as `mrb_int`. +* When defined, or both `MRB_INT16` and `MRB_INT32` are not defined on 64-bit CPU mode, `int64_t` will be defined as `mrb_int`. +* Conflicts with `MRB_INT16` and `MRB_INT32`. ## Garbage collector configuration. @@ -115,7 +121,7 @@ largest value of required alignment. `MRB_NAN_BOXING` * If defined represent `mrb_value` in boxed `double`. -* Conflicts with `MRB_USE_FLOAT`. +* Conflicts with `MRB_USE_FLOAT` and `MRB_WITHOUT_FLOAT`. `MRB_WORD_BOXING` * If defined represent `mrb_value` as a word. @@ -126,6 +132,20 @@ largest value of required alignment. * Default value is `4`. * Specifies size of each segment in segment list. +## Reduce heap memory configuration. + +`MRB_USE_ETEXT_EDATA` +* If you specify the address of a read-only section when creating a symbol or string, that string will be used as it is. +* Heap memory can be saved. +* Uses `_etext` and `__init_array_start`. +* It must be `_etext < data_addr < &__init_array_start`. + +`MRB_NO_INIT_ARRAY_START` +* Ignored if `MRB_USE_ETEXT_EDATA` is not defined. +* Please try if `__init_array_start` is not available. +* Uses `_etext` and `_edata`. +* It must be `_etext < data_addr < _edata`. + ## Other configuration. `MRB_UTF8_STRING` * Adds UTF-8 encoding support to character-oriented String instance methods. @@ -144,3 +164,20 @@ largest value of required alignment. `MRB_STR_BUF_MIN_SIZE` * Default value is `128`. * Specifies initial capacity of `RString` created by `mrb_str_buf_new` function.. + +`MRB_METHOD_CACHE` +* Improve performance for method dispatch. + +`MRB_METHOD_CACHE_SIZE` +* Default value is `128`. +* Ignored if `MRB_METHOD_CACHE` is not defined. +* Need to be the power of 2. + +`MRB_METHOD_TABLE_INLINE` +* Reduce the size of method table. +* Requires LSB of function pointers to be zero. +* For example, you might need to specify `--falign-functions=n` (where `n > 1`) for GCC. + +`MRB_ENABLE_ALL_SYMBOLS` +* Make it available `Symbols.all_symbols` in `mrbgems/mruby-symbol-ext` +* Increase heap memory usage. diff --git a/include/mrbconf.h b/include/mrbconf.h index 08e69d3aa..caae08d7c 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -41,10 +41,15 @@ /* you might need to specify --falign-functions=n (where n>1) */ //#define MRB_METHOD_TABLE_INLINE -/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT64 */ +/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT32 and MRB_INT64 */ //#define MRB_INT16 -/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 */ +/* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT16 and MRB_INT64; + Default for 32-bit CPU mode. */ +//#define MRB_INT32 + +/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 and MRB_INT32; + Default for 64-bit CPU mode. */ //#define MRB_INT64 /* if no specific integer type is chosen */ -- cgit v1.2.3 From 828a99894179e858b4ddda4ba686413b56f986de Mon Sep 17 00:00:00 2001 From: dearblue Date: Sat, 27 Apr 2019 22:29:20 +0900 Subject: Update document for `MRB_USE_CUSTOM_RO_DATA_P` --- doc/guides/mrbconf.md | 7 +++++++ include/mrbconf.h | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'doc/guides') diff --git a/doc/guides/mrbconf.md b/doc/guides/mrbconf.md index 4e3a81aa3..3c20b3388 100644 --- a/doc/guides/mrbconf.md +++ b/doc/guides/mrbconf.md @@ -146,6 +146,13 @@ largest value of required alignment. * Uses `_etext` and `_edata`. * It must be `_etext < data_addr < _edata`. +`MRB_USE_CUSTOM_RO_DATA_P` +* Takes precedence over `MRB_USE_ETEXT_EDATA`. +* Please try if both `MRB_USE_ETEXT_EDATA` and `MRB_NO_INIT_ARRAY_START` are not available. +* The `mrb_ro_data_p()` function is implemented by the user in an arbitrary file. +* The prototype declaration is `mrb_bool mrb_ro_data_p(const char *ptr)`. +* Return `TRUE` if `ptr` is in read-only section, otherwise return `FALSE`. + ## Other configuration. `MRB_UTF8_STRING` * Adds UTF-8 encoding support to character-oriented String instance methods. diff --git a/include/mrbconf.h b/include/mrbconf.h index caae08d7c..6b0b9e37e 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -93,6 +93,11 @@ effective only when MRB_USE_ETEXT_EDATA is defined */ //#define MRB_NO_INIT_ARRAY_START +/* if do not works both MRB_USE_ETEXT_EDATA and MRB_NO_INIT_ARRAY_START, + you can try mrb_ro_data_p() that you have implemented yourself in any file; + prototype is `mrb_bool mrb_ro_data_p(const char *ptr)` */ +//#define MRB_USE_CUSTOM_RO_DATA_P + /* turn off generational GC by default */ //#define MRB_GC_TURN_OFF_GENERATIONAL -- cgit v1.2.3