Changeset 27390 in project
- Timestamp:
- 09/07/12 23:11:24 (8 years ago)
- Location:
- release/4/spock
- Files:
-
- 4 deleted
- 13 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
release/4/spock/tags/0.9
-
Property
svn:mergeinfo
set to
/release/4/spock/branches/nothrow merged eligible
-
Property
svn:mergeinfo
set to
-
release/4/spock/tags/0.9/codegen.scm
r23521 r27390 95 95 (when dest (emit "\t// " dest)) 96 96 (when (and (pair? llist) (pair? (cdr llist))) ;XXX not really correct 97 (emit nl " SPOCK.count(arguments"97 (emit nl "var r = SPOCK.count(arguments" 98 98 (if (and debug-mode dest) 99 99 (string-append ", " (constant (stringify dest))) 100 100 "") 101 ");")) 101 ");") 102 (emit nl "if(r) return r;")) 102 103 (when rest 103 104 (emit nl "var " rest " = SPOCK.rest(arguments, " (- (length vars) 1)) … … 177 178 (indent 178 179 (lambda () 180 ;;XXX this will not unwind, but at least decrease the counter 179 181 (emit nl "SPOCK.count(arguments") 180 182 (if dest -
release/4/spock/tags/0.9/debug.js
r22775 r27390 41 41 if(--SPOCK.stack <= 0) { 42 42 ++SPOCK.restartCount; 43 thrownew SPOCK.Continuation(args.callee, Array.prototype.slice.call(args));43 return new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 44 44 } 45 45 46 46 if(loc) SPOCK.trace(loc, args); 47 48 return false; 47 49 }; 48 50 -
release/4/spock/tags/0.9/runtime.js
r23047 r27390 255 255 SPOCK.count = function(args, loc) { 256 256 if(--SPOCK.stack <= 0) 257 throw new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 257 return new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 258 else return false; 258 259 }; 259 260 260 261 SPOCK.rest = function(args, count, loc) { 261 262 var rest = null; 262 263 264 // this will not unwind, but decrease the counter 263 265 SPOCK.count(args, loc); 264 266 … … 273 275 SPOCK.run = function(func) { // optional arguments 274 276 function terminate(result) { 275 thrownew SPOCK.Result(result);277 return new SPOCK.Result(result); 276 278 } 277 279 … … 304 306 305 307 while(true) { 306 try { 307 result = func.apply(SPOCK.global, args); 308 break; 309 } 310 catch(x) { 311 if(x instanceof SPOCK.Continuation) { 312 SPOCK.stack = SPOCK.STACKSIZE; 313 func = x.k_callee; 314 args = x.k_arguments; 315 } 316 else if(x instanceof SPOCK.Result) { 317 result = x.value; 318 break; 319 } 320 else { 321 restore(); 322 SPOCK.error(x); 323 } 324 } 325 } 326 327 restore(); 308 result = func.apply(SPOCK.global, args); 309 310 if(result instanceof SPOCK.Continuation) { 311 SPOCK.stack = SPOCK.STACKSIZE; 312 func = result.k_callee; 313 args = result.k_arguments; 314 } 315 else if(result instanceof SPOCK.Result) { 316 restore(); 317 return result.value; 318 } 319 else { 320 restore(); 321 SPOCK.error("unexpected return of non-continuation", result); 322 } 323 } 324 328 325 return result; 329 326 }; -
release/4/spock/tags/0.9/spock.setup
r26847 r27390 73 73 '("spock.so" "spock" "spock.import.so" 74 74 "spock-compiler.so" "spock-compiler.import.so") 75 '((version 0.0 8)))75 '((version 0.09))) 76 76 77 77 (install-program 78 78 'chicken-spock 79 79 (list executable) 80 '((version 0.0 8)))80 '((version 0.09))) -
release/4/spock/tags/0.9/spock/library.scm
r26843 r27390 1513 1513 (lambda (k) 1514 1514 (proc (%get-context k)) 1515 ((%native-lambda " thrownew SPOCK.Result(undefined);")))))1515 ((%native-lambda "return new SPOCK.Result(undefined);"))))) 1516 1516 1517 1517 ;;XXX currently undocumented and untested -
release/4/spock/tags/0.9/tests/drag.html
r22837 r27390 15 15 right-margin: auto; 16 16 left: 0px; 17 top-margin ;auto;17 top-margin: auto; 18 18 bottom: 0px; 19 19 } -
release/4/spock/trunk
-
Property
svn:mergeinfo
set to
/release/4/spock/branches/nothrow merged eligible
-
Property
svn:mergeinfo
set to
-
release/4/spock/trunk/codegen.scm
r23521 r27390 95 95 (when dest (emit "\t// " dest)) 96 96 (when (and (pair? llist) (pair? (cdr llist))) ;XXX not really correct 97 (emit nl " SPOCK.count(arguments"97 (emit nl "var r = SPOCK.count(arguments" 98 98 (if (and debug-mode dest) 99 99 (string-append ", " (constant (stringify dest))) 100 100 "") 101 ");")) 101 ");") 102 (emit nl "if(r) return r;")) 102 103 (when rest 103 104 (emit nl "var " rest " = SPOCK.rest(arguments, " (- (length vars) 1)) … … 177 178 (indent 178 179 (lambda () 180 ;;XXX this will not unwind, but at least decrease the counter 179 181 (emit nl "SPOCK.count(arguments") 180 182 (if dest -
release/4/spock/trunk/debug.js
r22775 r27390 41 41 if(--SPOCK.stack <= 0) { 42 42 ++SPOCK.restartCount; 43 thrownew SPOCK.Continuation(args.callee, Array.prototype.slice.call(args));43 return new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 44 44 } 45 45 46 46 if(loc) SPOCK.trace(loc, args); 47 48 return false; 47 49 }; 48 50 -
release/4/spock/trunk/runtime.js
r23047 r27390 255 255 SPOCK.count = function(args, loc) { 256 256 if(--SPOCK.stack <= 0) 257 throw new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 257 return new SPOCK.Continuation(args.callee, Array.prototype.slice.call(args)); 258 else return false; 258 259 }; 259 260 260 261 SPOCK.rest = function(args, count, loc) { 261 262 var rest = null; 262 263 264 // this will not unwind, but decrease the counter 263 265 SPOCK.count(args, loc); 264 266 … … 273 275 SPOCK.run = function(func) { // optional arguments 274 276 function terminate(result) { 275 thrownew SPOCK.Result(result);277 return new SPOCK.Result(result); 276 278 } 277 279 … … 304 306 305 307 while(true) { 306 try { 307 result = func.apply(SPOCK.global, args); 308 break; 309 } 310 catch(x) { 311 if(x instanceof SPOCK.Continuation) { 312 SPOCK.stack = SPOCK.STACKSIZE; 313 func = x.k_callee; 314 args = x.k_arguments; 315 } 316 else if(x instanceof SPOCK.Result) { 317 result = x.value; 318 break; 319 } 320 else { 321 restore(); 322 SPOCK.error(x); 323 } 324 } 325 } 326 327 restore(); 308 result = func.apply(SPOCK.global, args); 309 310 if(result instanceof SPOCK.Continuation) { 311 SPOCK.stack = SPOCK.STACKSIZE; 312 func = result.k_callee; 313 args = result.k_arguments; 314 } 315 else if(result instanceof SPOCK.Result) { 316 restore(); 317 return result.value; 318 } 319 else { 320 restore(); 321 SPOCK.error("unexpected return of non-continuation", result); 322 } 323 } 324 328 325 return result; 329 326 }; -
release/4/spock/trunk/spock.setup
r26847 r27390 73 73 '("spock.so" "spock" "spock.import.so" 74 74 "spock-compiler.so" "spock-compiler.import.so") 75 '((version 0.0 8)))75 '((version 0.09))) 76 76 77 77 (install-program 78 78 'chicken-spock 79 79 (list executable) 80 '((version 0.0 8)))80 '((version 0.09))) -
release/4/spock/trunk/spock/library.scm
r26843 r27390 1513 1513 (lambda (k) 1514 1514 (proc (%get-context k)) 1515 ((%native-lambda " thrownew SPOCK.Result(undefined);")))))1515 ((%native-lambda "return new SPOCK.Result(undefined);"))))) 1516 1516 1517 1517 ;;XXX currently undocumented and untested -
release/4/spock/trunk/tests/drag.html
r22837 r27390 15 15 right-margin: auto; 16 16 left: 0px; 17 top-margin ;auto;17 top-margin: auto; 18 18 bottom: 0px; 19 19 }
Note: See TracChangeset
for help on using the changeset viewer.