Skip to content

Commit

Permalink
lowering: omit true and false in statement position
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jun 1, 2016
1 parent a4c419b commit 4904241
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3058,6 +3058,7 @@ f(x) = yt(x)
globalref cdecl stdcall fastcall thiscall)))
(cond (tail (emit-return e))
(value e)
((or (eq? e 'true) (eq? e 'false)) #f)
((symbol? e) (emit e) #f) ;; keep symbols for undefined-var checking
(else #f))
(case (car e)
Expand Down

2 comments on commit 4904241

@tkelman
Copy link
Contributor

@tkelman tkelman commented on 4904241 Jun 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what motivated this? test case, optimization?

@JeffBezanson
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a minor optimization to the IR.

Please sign in to comment.