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
0b4017fd
Commit
0b4017fd
authored
8 years ago
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
resolve conflict; ref #3286
parents
d77b2541
71641bbf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
mrbgems/mruby-compiler/core/codegen.c
mrbgems/mruby-compiler/core/codegen.c
+4
-0
test/t/codegen.rb
test/t/codegen.rb
+4
-0
No files found.
mrbgems/mruby-compiler/core/codegen.c
View file @
0b4017fd
...
@@ -1362,6 +1362,10 @@ codegen(codegen_scope *s, node *tree, int val)
...
@@ -1362,6 +1362,10 @@ codegen(codegen_scope *s, node *tree, int val)
int
pos1
,
pos2
;
int
pos1
,
pos2
;
node
*
e
=
tree
->
cdr
->
cdr
->
car
;
node
*
e
=
tree
->
cdr
->
cdr
->
car
;
if
(
!
tree
->
car
)
{
codegen
(
s
,
e
,
val
);
return
;
}
switch
((
intptr_t
)
tree
->
car
->
car
)
{
switch
((
intptr_t
)
tree
->
car
->
car
)
{
case
NODE_TRUE
:
case
NODE_TRUE
:
case
NODE_INT
:
case
NODE_INT
:
...
...
This diff is collapsed.
Click to expand it.
test/t/codegen.rb
View file @
0b4017fd
...
@@ -9,3 +9,7 @@ assert('peephole optimization does not eliminate move whose result is reused') d
...
@@ -9,3 +9,7 @@ assert('peephole optimization does not eliminate move whose result is reused') d
method
(
&
a
&&=
0
)
method
(
&
a
&&=
0
)
end
end
end
end
assert
(
'empty condition in ternary expression parses correctly'
)
do
assert_equal
(()
?
1
:
2
,
2
)
end
This diff is collapsed.
Click to expand 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