Skip to content

Commit

Permalink
simplify booleans in data_json
Browse files Browse the repository at this point in the history
  • Loading branch information
plobsing committed Nov 20, 2010
1 parent ed339aa commit 3761b73
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions compilers/data_json/data_json/pge2pir.tg
Expand Up @@ -54,18 +54,14 @@ transform pir (value) {
got_true:
pir = new 'CodeString'
result = pir.'unique'('$P')
$S0 = node
pir.'emit'(" %0 = new 'Boolean'", result)
pir.'emit'(' %0 = 1', result, $S0)
pir.'emit'(" %0 = new 'Boolean', 1", result)
node['ret'] = result
.return(pir)

got_false:
pir = new 'CodeString'
result = pir.'unique'('$P')
$S0 = node
pir.'emit'(" %0 = new 'Boolean'", result)
pir.'emit'(' %0 = 0', result, $S0)
pir.'emit'(" %0 = new 'Boolean', 0", result)
node['ret'] = result
.return(pir)

Expand Down

0 comments on commit 3761b73

Please sign in to comment.