on master help sign in
dead code removal
d787b78Michael James
runtime/Debugger.js−13
@@ -232,31 +232,18 @@ function debuggerInit(debugModule, runtime, hotSwapState) {
232 currentEventIndex = 0;
232 currentEventIndex = 0;
233 }
233 }
234
234
235− assert(index >= currentEventIndex, "index must be bad");
236 while (currentEventIndex < index) {
235 while (currentEventIndex < index) {
237 var nextEvent = debugModule.getRecordedEventAt(currentEventIndex);
236 var nextEvent = debugModule.getRecordedEventAt(currentEventIndex);
238 runtime.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
237 runtime.notify(nextEvent.id, nextEvent.value, nextEvent.timestep);
239
238
240 currentEventIndex += 1;
239 currentEventIndex += 1;
241 }
240 }
242− assert(currentEventIndex == index, "while loop didn't work");
243 }
241 }
244
242
245 function getMaxSteps() {
243 function getMaxSteps() {
246 return debugModule.getRecordedEventsLength();
244 return debugModule.getRecordedEventsLength();
247 }
245 }
248
246
249− function doPlayback(eventList) {
250− var x = eventList.shift();
251− var time = x[2];
252− runtime.notify(x[0], x[1], x[2]);
253−
254− if (eventList.length > 0) {
255− var delta = eventList[0][2] - time;
256− setTimeout(function() { doPlayback(eventList); }, delta);
257− }
258− }
259−
260 function redrawGraphics() {
247 function redrawGraphics() {
261 var main = debugModule.debuggedModule.main
248 var main = debugModule.debuggedModule.main
262 for (var i = main.kids.length ; i-- ; ) {
249 for (var i = main.kids.length ; i-- ; ) {