continuing to rip out whitespace

This commit is contained in:
Danny Yoo 2011-09-06 16:00:33 -04:00
parent 468722ee28
commit 948afb930c

View File

@ -131,7 +131,7 @@ EOF
[(symbol? stmt) [(symbol? stmt)
(next)] (next)]
[(LinkedLabel? stmt) [(LinkedLabel? stmt)
(fprintf op "~a.multipleValueReturn = ~a;\n" (fprintf op "~a.multipleValueReturn=~a;\n"
(assemble-label (make-Label (LinkedLabel-label stmt))) (assemble-label (make-Label (LinkedLabel-label stmt)))
(assemble-label (make-Label (LinkedLabel-linked-to stmt)))) (assemble-label (make-Label (LinkedLabel-linked-to stmt))))
(next)] (next)]
@ -224,24 +224,24 @@ EOF
(: test-code String) (: test-code String)
(define test-code (cond (define test-code (cond
[(TestFalse? test) [(TestFalse? test)
(format "if (~a === false)" (format "if(~a===false)"
(assemble-oparg (TestFalse-operand test)))] (assemble-oparg (TestFalse-operand test)))]
[(TestTrue? test) [(TestTrue? test)
(format "if (~a !== false)" (format "if(~a!==false)"
(assemble-oparg (TestTrue-operand test)))] (assemble-oparg (TestTrue-operand test)))]
[(TestOne? test) [(TestOne? test)
(format "if (~a === 1)" (format "if(~a===1)"
(assemble-oparg (TestOne-operand test)))] (assemble-oparg (TestOne-operand test)))]
[(TestZero? test) [(TestZero? test)
(format "if (~a === 0)" (format "if(~a===0)"
(assemble-oparg (TestZero-operand test)))] (assemble-oparg (TestZero-operand test)))]
[(TestPrimitiveProcedure? test) [(TestPrimitiveProcedure? test)
(format "if (typeof(~a) === 'function')" (format "if(typeof(~a)==='function')"
(assemble-oparg (TestPrimitiveProcedure-operand test)))] (assemble-oparg (TestPrimitiveProcedure-operand test)))]
[(TestClosureArityMismatch? test) [(TestClosureArityMismatch? test)
(format "if (! RUNTIME.isArityMatching((~a).racketArity, ~a))" (format "if(!RUNTIME.isArityMatching((~a).racketArity,~a))"
(assemble-oparg (TestClosureArityMismatch-closure test)) (assemble-oparg (TestClosureArityMismatch-closure test))
(assemble-oparg (TestClosureArityMismatch-n test)))])) (assemble-oparg (TestClosureArityMismatch-n test)))]))
(display test-code op) (display test-code op)
@ -257,7 +257,7 @@ EOF
blockht blockht
entry-points entry-points
op)]) op)])
(display "} else {" op) (display "}else{" op)
(assemble-block-statements name (rest stmts) blockht entry-points op) (assemble-block-statements name (rest stmts) blockht entry-points op)
(display "}" op) (display "}" op)
'ok] 'ok]
@ -416,27 +416,27 @@ EOF
;; to help localize type checks, we add a type annotation here. ;; to help localize type checks, we add a type annotation here.
(ann (cond (ann (cond
[(TestFalse? test) [(TestFalse? test)
(format "if (~a === false) { ~a }" (format "if(~a===false){~a}"
(assemble-oparg (TestFalse-operand test)) (assemble-oparg (TestFalse-operand test))
jump)] jump)]
[(TestTrue? test) [(TestTrue? test)
(format "if (~a !== false) { ~a }" (format "if(~a!==false){~a}"
(assemble-oparg (TestTrue-operand test)) (assemble-oparg (TestTrue-operand test))
jump)] jump)]
[(TestOne? test) [(TestOne? test)
(format "if (~a === 1) { ~a }" (format "if(~a===1){~a}"
(assemble-oparg (TestOne-operand test)) (assemble-oparg (TestOne-operand test))
jump)] jump)]
[(TestZero? test) [(TestZero? test)
(format "if (~a === 0) { ~a }" (format "if(~a===0){~a}"
(assemble-oparg (TestZero-operand test)) (assemble-oparg (TestZero-operand test))
jump)] jump)]
[(TestPrimitiveProcedure? test) [(TestPrimitiveProcedure? test)
(format "if (typeof(~a) === 'function') { ~a }" (format "if(typeof(~a)==='function'){~a}"
(assemble-oparg (TestPrimitiveProcedure-operand test)) (assemble-oparg (TestPrimitiveProcedure-operand test))
jump)] jump)]
[(TestClosureArityMismatch? test) [(TestClosureArityMismatch? test)
(format "if (! RUNTIME.isArityMatching((~a).racketArity, ~a)) { ~a }" (format "if(!RUNTIME.isArityMatching((~a).racketArity,~a)){~a}"
(assemble-oparg (TestClosureArityMismatch-closure test)) (assemble-oparg (TestClosureArityMismatch-closure test))
(assemble-oparg (TestClosureArityMismatch-n test)) (assemble-oparg (TestClosureArityMismatch-n test))
jump)]) jump)])
@ -449,7 +449,7 @@ EOF
"MACHINE.control.push(new RUNTIME.Frame());"] "MACHINE.control.push(new RUNTIME.Frame());"]
[(PushControlFrame/Call? stmt) [(PushControlFrame/Call? stmt)
(format "MACHINE.control.push(new RUNTIME.CallFrame(~a, MACHINE.proc));" (format "MACHINE.control.push(new RUNTIME.CallFrame(~a,MACHINE.proc));"
(let: ([label : (U Symbol LinkedLabel) (PushControlFrame/Call-label stmt)]) (let: ([label : (U Symbol LinkedLabel) (PushControlFrame/Call-label stmt)])
(cond (cond
[(symbol? label) [(symbol? label)
@ -459,7 +459,7 @@ EOF
[(PushControlFrame/Prompt? stmt) [(PushControlFrame/Prompt? stmt)
;; fixme: use a different frame structure ;; fixme: use a different frame structure
(format "MACHINE.control.push(new RUNTIME.PromptFrame(~a, ~a));" (format "MACHINE.control.push(new RUNTIME.PromptFrame(~a,~a));"
(let: ([label : (U Symbol LinkedLabel) (PushControlFrame/Prompt-label stmt)]) (let: ([label : (U Symbol LinkedLabel) (PushControlFrame/Prompt-label stmt)])
(cond (cond
[(symbol? label) [(symbol? label)
@ -492,10 +492,10 @@ EOF
(let: ([skip : OpArg (PopEnvironment-skip stmt)]) (let: ([skip : OpArg (PopEnvironment-skip stmt)])
(cond (cond
[(and (Const? skip) (= (ensure-natural (Const-const skip)) 0)) [(and (Const? skip) (= (ensure-natural (Const-const skip)) 0))
(format "MACHINE.env.length -= ~a;" (format "MACHINE.env.length-=~a;"
(assemble-oparg (PopEnvironment-n stmt)))] (assemble-oparg (PopEnvironment-n stmt)))]
[else [else
(format "MACHINE.env.splice(MACHINE.env.length - (~a + ~a), ~a);" (format "MACHINE.env.splice(MACHINE.env.length-(~a +~a),~a);"
(assemble-oparg (PopEnvironment-skip stmt)) (assemble-oparg (PopEnvironment-skip stmt))
(assemble-oparg (PopEnvironment-n stmt)) (assemble-oparg (PopEnvironment-n stmt))
(assemble-oparg (PopEnvironment-n stmt)))]))] (assemble-oparg (PopEnvironment-n stmt)))]))]
@ -528,5 +528,3 @@ EOF
(if (natural? n) (if (natural? n)
n n
(error 'ensure-natural))) (error 'ensure-natural)))