Changeset 33694 in project


Ignore:
Timestamp:
10/02/16 19:35:08 (5 years ago)
Author:
felix winkelmann
Message:

spock 0.98: removed some dead code generated in conditionals, fixed escaping of double-quote (both reported by mario)

Location:
release/4/spock
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/spock/tags/0.98/codegen.scm

    r27390 r33694  
    130130            (lambda ()
    131131              (let ((y (walk y dest loc)))
    132                 (emit nl t " = " y ";"))))
     132                (unless (eq? y 'undefined) (emit nl t " = " y ";")))))
    133133           (emit nl "}" nl "else {")
    134134           (indent
    135135            (lambda ()
    136136              (let ((z (walk z dest loc)))
    137                 (emit nl t " = " z ";"))))
     137                (unless (eq? z 'undefined) (emit nl t " = " z ";")))))
    138138           (emit nl "}")
    139139           t))
  • release/4/spock/tags/0.98/spock/library.scm

    r31158 r33694  
    12961296               " case '\\t': a.push('\\t'); break;"
    12971297               " case '\\r': a.push('\\r'); break;"
    1298                " case '\\\"': a.push('\\\"'); break;"
     1298               " case '\\\"': a.push('\\\\\"'); break;"
    12991299               " case '\\\\': a.push('\\\\'); break;"
    13001300               " default: a.push(c);}}"
  • release/4/spock/trunk/codegen.scm

    r27390 r33694  
    130130            (lambda ()
    131131              (let ((y (walk y dest loc)))
    132                 (emit nl t " = " y ";"))))
     132                (unless (eq? y 'undefined) (emit nl t " = " y ";")))))
    133133           (emit nl "}" nl "else {")
    134134           (indent
    135135            (lambda ()
    136136              (let ((z (walk z dest loc)))
    137                 (emit nl t " = " z ";"))))
     137                (unless (eq? z 'undefined) (emit nl t " = " z ";")))))
    138138           (emit nl "}")
    139139           t))
  • release/4/spock/trunk/spock/library.scm

    r31158 r33694  
    12961296               " case '\\t': a.push('\\t'); break;"
    12971297               " case '\\r': a.push('\\r'); break;"
    1298                " case '\\\"': a.push('\\\"'); break;"
     1298               " case '\\\"': a.push('\\\\\"'); break;"
    12991299               " case '\\\\': a.push('\\\\'); break;"
    13001300               " default: a.push(c);}}"
Note: See TracChangeset for help on using the changeset viewer.