Commit d9342231 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge branch 'bouk-negate'

parents 0af170fb 13979a43
...@@ -2221,6 +2221,10 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -2221,6 +2221,10 @@ codegen(codegen_scope *s, node *tree, int val)
{ {
nt = (intptr_t)tree->car; nt = (intptr_t)tree->car;
tree = tree->cdr; tree = tree->cdr;
if (!val) {
codegen(s, tree, NOVAL);
break;
}
switch (nt) { switch (nt) {
case NODE_FLOAT: case NODE_FLOAT:
{ {
......
...@@ -81,3 +81,13 @@ assert('next in normal loop with 127 arguments') do ...@@ -81,3 +81,13 @@ assert('next in normal loop with 127 arguments') do
end end
end end
end end
assert('negate literal register alignment') do
a = *case
when 0
-0.0
2
end
assert_equal [2], a
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment