Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
ff57c027
Commit
ff57c027
authored
Jan 15, 2020
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove broken `MRB_INT16` configuration option.
parent
2742ded3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
52 deletions
+26
-52
doc/guides/mrbconf.md
doc/guides/mrbconf.md
+4
-8
include/mrbconf.h
include/mrbconf.h
+3
-6
include/mruby/boxing_word.h
include/mruby/boxing_word.h
+0
-4
include/mruby/value.h
include/mruby/value.h
+0
-12
tasks/gitlab.rake
tasks/gitlab.rake
+19
-22
No files found.
doc/guides/mrbconf.md
View file @
ff57c027
...
...
@@ -54,17 +54,13 @@ You can use mrbconfs with following ways:
*
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_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_in
t`
.
*
Conflicts with
`MRB_INT
16`
and
`MRB_INT
64`
.
*
When defined, or
`MRB_INT64`
are not defined on 32-bit CPU mode,
`mrb_int`
will be defined as
`int32_
t`
.
*
Conflicts with
`MRB_INT64`
.
`MRB_INT64`
*
When defined, or
both
`MRB_INT16`
and
`MRB_INT32`
are not defined on 64-bit CPU mode,
`int64_t`
will be defined as
`mrb_in
t`
.
*
Conflicts with
`MRB_INT
16`
and
`MRB_INT
32`
.
*
When defined, or
`MRB_INT32`
are not defined on 64-bit CPU mode,
`mrb_int`
will be defined as
`int64_
t`
.
*
Conflicts with
`MRB_INT32`
.
## Garbage collector configuration.
...
...
include/mrbconf.h
View file @
ff57c027
...
...
@@ -40,19 +40,16 @@
/* no MRB_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */
//#define MRB_METHOD_T_STRUCT
/* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT32 and MRB_INT64 */
//#define MRB_INT16
/* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT16 and MRB_INT64;
/* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT64;
Default for 32-bit CPU mode. */
//#define MRB_INT32
/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT
16 and MRB_INT
32;
/* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT32;
Default for 64-bit CPU mode. */
//#define MRB_INT64
/* if no specific integer type is chosen */
#if !defined(MRB_INT
16) && !defined(MRB_INT
32) && !defined(MRB_INT64)
#if !defined(MRB_INT32) && !defined(MRB_INT64)
# if defined(MRB_64BIT) && !defined(MRB_NAN_BOXING)
/* Use 64bit integers on 64bit architecture (without MRB_NAN_BOXING) */
# define MRB_INT64
...
...
include/mruby/boxing_word.h
View file @
ff57c027
...
...
@@ -7,10 +7,6 @@
#ifndef MRUBY_BOXING_WORD_H
#define MRUBY_BOXING_WORD_H
#if defined(MRB_INT16)
# error MRB_INT16 is too small for MRB_WORD_BOXING.
#endif
#if defined(MRB_INT64) && !defined(MRB_64BIT)
#error MRB_INT64 cannot be used with MRB_WORD_BOXING in 32-bit mode.
#endif
...
...
include/mruby/value.h
View file @
ff57c027
...
...
@@ -34,10 +34,6 @@ typedef uint32_t mrb_sym;
typedef
uint8_t
mrb_bool
;
struct
mrb_state
;
#if defined(MRB_INT16) && defined(MRB_INT64)
# error "You can't define MRB_INT16 and MRB_INT64 at the same time."
#endif
#if defined _MSC_VER && _MSC_VER < 1800
# define PRIo64 "llo"
# define PRId64 "lld"
...
...
@@ -63,14 +59,6 @@ struct mrb_state;
# define MRB_PRIo PRIo64
# define MRB_PRId PRId64
# define MRB_PRIx PRIx64
#elif defined(MRB_INT16)
typedef
int16_t
mrb_int
;
# define MRB_INT_BIT 16
# define MRB_INT_MIN (INT16_MIN>>MRB_FIXNUM_SHIFT)
# define MRB_INT_MAX (INT16_MAX>>MRB_FIXNUM_SHIFT)
# define MRB_PRIo PRIo16
# define MRB_PRId PRId16
# define MRB_PRIx PRIx16
#else
typedef
int32_t
mrb_int
;
# define MRB_INT_BIT 32
...
...
tasks/gitlab.rake
View file @
ff57c027
...
...
@@ -63,28 +63,25 @@ task :gitlab_config do
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
[
''
,
'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_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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment