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
36684899
Commit
36684899
authored
Sep 07, 2018
by
dearblue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear terminated space
parent
1595e836
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
26 additions
and
26 deletions
+26
-26
examples/targets/build_config_android_arm64-v8a.rb
examples/targets/build_config_android_arm64-v8a.rb
+2
-2
examples/targets/build_config_android_armeabi.rb
examples/targets/build_config_android_armeabi.rb
+2
-2
mrbgems/mruby-array-ext/test/array.rb
mrbgems/mruby-array-ext/test/array.rb
+1
-1
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
+4
-4
mrbgems/mruby-random/src/random.c
mrbgems/mruby-random/src/random.c
+1
-1
src/array.c
src/array.c
+1
-1
src/codedump.c
src/codedump.c
+1
-1
src/gc.c
src/gc.c
+1
-1
src/numeric.c
src/numeric.c
+1
-1
src/variable.c
src/variable.c
+5
-5
src/vm.c
src/vm.c
+2
-2
tasks/toolchains/gcc.rake
tasks/toolchains/gcc.rake
+1
-1
test/t/kernel.rb
test/t/kernel.rb
+1
-1
test/t/syntax.rb
test/t/syntax.rb
+3
-3
No files found.
examples/targets/build_config_android_arm64-v8a.rb
View file @
36684899
...
...
@@ -15,8 +15,8 @@ end
# Requires Android NDK r13 or later.
MRuby
::
CrossBuild
.
new
(
'android-arm64-v8a'
)
do
|
conf
|
params
=
{
:arch
=>
'arm64-v8a'
,
params
=
{
:arch
=>
'arm64-v8a'
,
:platform
=>
'android-24'
,
:toolchain
=>
:clang
,
}
...
...
examples/targets/build_config_android_armeabi.rb
View file @
36684899
...
...
@@ -15,8 +15,8 @@ end
# Requires Android NDK r13 or later.
MRuby
::
CrossBuild
.
new
(
'android-armeabi'
)
do
|
conf
|
params
=
{
:arch
=>
'armeabi'
,
params
=
{
:arch
=>
'armeabi'
,
:platform
=>
'android-24'
,
:toolchain
=>
:clang
,
}
...
...
mrbgems/mruby-array-ext/test/array.rb
View file @
36684899
...
...
@@ -418,5 +418,5 @@ assert('Array#transpose') do
assert_equal
([[
1
],
[
2
],
[
3
]].
transpose
,
[[
1
,
2
,
3
]])
assert_equal
([[
1
,
2
],
[
3
,
4
],
[
5
,
6
]].
transpose
,
[[
1
,
3
,
5
],
[
2
,
4
,
6
]])
assert_raise
(
TypeError
)
{
[
1
].
transpose
}
assert_raise
(
IndexError
)
{
[[
1
],
[
2
,
3
,
4
]].
transpose
}
assert_raise
(
IndexError
)
{
[[
1
],
[
2
,
3
,
4
]].
transpose
}
end
mrbgems/mruby-compiler/core/codegen.c
View file @
36684899
...
...
@@ -419,7 +419,7 @@ gen_move(codegen_scope *s, uint16_t dst, uint16_t src, int nopeep)
}
else
{
struct
mrb_insn_data
data
=
mrb_last_insn
(
s
);
switch
(
data
.
insn
)
{
case
OP_MOVE
:
if
(
dst
==
src
)
return
;
/* remove useless MOVE */
...
...
@@ -456,7 +456,7 @@ gen_return(codegen_scope *s, uint8_t op, uint16_t src)
}
else
{
struct
mrb_insn_data
data
=
mrb_last_insn
(
s
);
if
(
data
.
insn
==
OP_MOVE
&&
src
==
data
.
a
)
{
s
->
pc
=
s
->
lastpc
;
genop_1
(
s
,
op
,
data
.
b
);
...
...
@@ -764,7 +764,7 @@ lambda_body(codegen_scope *s, node *tree, int blk)
kd
=
tail
&&
tail
->
cdr
->
cdr
->
car
?
1
:
0
;
/* block argument? */
ba
=
tail
&&
tail
->
cdr
->
cdr
->
cdr
->
car
?
1
:
0
;
if
(
ma
>
0x1f
||
oa
>
0x1f
||
pa
>
0x1f
||
ka
>
0x1f
)
{
codegen_error
(
s
,
"too many formal arguments"
);
}
...
...
@@ -3118,7 +3118,7 @@ generate_code(mrb_state *mrb, parser_state *p, int val)
scope
->
filename_index
=
p
->
current_filename_index
;
MRB_TRY
(
&
scope
->
jmp
)
{
mrb
->
jmp
=
&
scope
->
jmp
;
mrb
->
jmp
=
&
scope
->
jmp
;
/* prepare irep */
codegen
(
scope
,
p
->
tree
,
val
);
proc
=
mrb_proc_new
(
mrb
,
scope
->
irep
);
...
...
mrbgems/mruby-random/src/random.c
View file @
36684899
...
...
@@ -219,7 +219,7 @@ mrb_ary_shuffle_bang(mrb_state *mrb, mrb_value ary)
mrb_int
j
;
mrb_value
*
ptr
=
RARRAY_PTR
(
ary
);
mrb_value
tmp
;
j
=
mrb_fixnum
(
mrb_random_mt_rand
(
mrb
,
random
,
mrb_fixnum_value
(
RARRAY_LEN
(
ary
))));
...
...
src/array.c
View file @
36684899
...
...
@@ -231,7 +231,7 @@ ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
static
void
ary_shrink_capa
(
mrb_state
*
mrb
,
struct
RArray
*
a
)
{
mrb_int
capa
;
if
(
ARY_EMBED_P
(
a
))
return
;
...
...
src/codedump.c
View file @
36684899
...
...
@@ -516,7 +516,7 @@ codedump(mrb_state *mrb, mrb_irep *irep)
#undef OPCODE
}
break
;
default:
printf
(
"OP_unknown (0x%x)
\n
"
,
ins
);
break
;
...
...
src/gc.c
View file @
36684899
...
...
@@ -1559,7 +1559,7 @@ mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, vo
mrb
->
jmp
=
&
c_jmp
;
gc_each_objects
(
mrb
,
&
mrb
->
gc
,
callback
,
data
);
mrb
->
jmp
=
prev_jmp
;
mrb
->
gc
.
iterating
=
iterating
;
mrb
->
gc
.
iterating
=
iterating
;
}
MRB_CATCH
(
&
c_jmp
)
{
mrb
->
gc
.
iterating
=
iterating
;
mrb
->
jmp
=
prev_jmp
;
...
...
src/numeric.c
View file @
36684899
...
...
@@ -433,7 +433,7 @@ flo_shift(mrb_state *mrb, mrb_value x, mrb_int width)
val
=
trunc
(
val
);
#else
if
(
val
>
0
){
val
=
floor
(
val
);
val
=
floor
(
val
);
}
else
{
val
=
ceil
(
val
);
}
...
...
src/variable.c
View file @
36684899
...
...
@@ -790,7 +790,7 @@ mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
proc
=
mrb
->
c
->
ci
->
proc
;
while
(
proc
)
{
c2
=
MRB_PROC_TARGET_CLASS
(
proc
);
if
(
c2
&&
iv_get
(
mrb
,
c2
->
iv
,
sym
,
&
v
))
{
if
(
c2
&&
iv_get
(
mrb
,
c2
->
iv
,
sym
,
&
v
))
{
return
v
;
}
proc
=
proc
->
upper
;
...
...
@@ -988,25 +988,25 @@ struct csym_arg {
struct
RClass
*
c
;
mrb_sym
sym
;
};
static
int
csym_i
(
mrb_state
*
mrb
,
mrb_sym
sym
,
mrb_value
v
,
void
*
p
)
{
struct
csym_arg
*
a
=
(
struct
csym_arg
*
)
p
;
struct
RClass
*
c
=
a
->
c
;
if
(
mrb_type
(
v
)
==
c
->
tt
&&
mrb_class_ptr
(
v
)
==
c
)
{
a
->
sym
=
sym
;
return
1
;
/* stop iteration */
}
return
0
;
}
static
mrb_sym
find_class_sym
(
mrb_state
*
mrb
,
struct
RClass
*
outer
,
struct
RClass
*
c
)
{
struct
csym_arg
arg
;
if
(
!
outer
)
return
0
;
if
(
outer
==
c
)
return
0
;
arg
.
c
=
c
;
...
...
src/vm.c
View file @
36684899
...
...
@@ -1818,7 +1818,7 @@ RETRY_TRY_BLOCK:
}
regs
[
blk_pos
]
=
*
blk
;
/* move block */
if
(
kd
)
regs
[
len
+
1
]
=
kdict
;
/* copy mandatory and optional arguments */
if
(
argv0
!=
argv
)
{
value_move
(
&
regs
[
1
],
argv
,
argc
-
mlen
);
/* m1 + o */
...
...
@@ -2077,7 +2077,7 @@ RETRY_TRY_BLOCK:
break
;
case
OP_R_BREAK
:
if
(
MRB_PROC_STRICT_P
(
proc
))
goto
NORMAL_RETURN
;
if
(
MRB_PROC_ORPHAN_P
(
proc
))
{
if
(
MRB_PROC_ORPHAN_P
(
proc
))
{
mrb_value
exc
;
L_BREAK_ERROR:
...
...
tasks/toolchains/gcc.rake
View file @
36684899
...
...
@@ -55,7 +55,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params|
@header_search_paths
end
end
def
conf
.
enable_sanitizer
(
*
opts
)
fail
'sanitizer already set'
if
@sanitizer_list
...
...
test/t/kernel.rb
View file @
36684899
...
...
@@ -157,7 +157,7 @@ assert('Kernel#clone', '15.3.1.3.8') do
assert_true
a
.
respond_to?
(
:test
)
assert_false
b
.
respond_to?
(
:test
)
assert_true
c
.
respond_to?
(
:test
)
a
.
freeze
d
=
a
.
clone
assert_true
d
.
frozen?
...
...
test/t/syntax.rb
View file @
36684899
...
...
@@ -454,15 +454,15 @@ assert('multiline comments work correctly') do
=begin
this is a comment with nothing after begin and end
=end
=begin this is a comment
=begin this is a comment
this is a comment with extra after =begin
=end
=begin
this is a comment that has =end with spaces after it
=end
=end
=begin this is a comment
this is a comment that has extra after =begin and =end with spaces after it
=end
=end
line
=
__LINE__
=begin this is a comment
this is a comment that has extra after =begin and =end with tabs after it
...
...
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