@@ -108,7 +108,7 @@ function htmlspecialchars(str) {
108108 return str ;
109109}
110110
111- function processTrace ( jumpToEnd ) {
111+ function enterVisualizeMode ( jumpToEnd ) {
112112 curInstr = 0 ;
113113
114114 // only do this at most ONCE, and then clear out preseededCurInstr
@@ -121,28 +121,9 @@ function processTrace(jumpToEnd) {
121121 $ ( "#pyStdout" ) . val ( '' ) ;
122122
123123 if ( curTrace . length > 0 ) {
124- var lastEntry = curTrace [ curTrace . length - 1 ] ;
125-
126- // GLOBAL!
127- instrLimitReached = ( lastEntry . event == 'instruction_limit_reached' ) ;
128-
129- if ( instrLimitReached ) {
130- curTrace . pop ( ) // kill last entry
131- var warningMsg = lastEntry . exception_msg ;
132- $ ( "#errorOutput" ) . html ( htmlspecialchars ( warningMsg ) ) ;
133- $ ( "#errorOutput" ) . show ( ) ;
134- }
135- // as imran suggests, for a (non-error) one-liner, SNIP off the
136- // first instruction so that we start after the FIRST instruction
137- // has been executed ...
138- else if ( curTrace . length == 2 ) {
139- curTrace . shift ( ) ;
140- }
141-
142-
143124 if ( jumpToEnd ) {
144125 // if there's an exception, then jump to the FIRST occurrence of
145- // that exception. otherwise, jump to the very end of execution.
126+ // that exception. otherwise, jump to the very end of execution.
146127 curInstr = curTrace . length - 1 ;
147128
148129 for ( var i = 0 ; i < curTrace . length ; i ++ ) {
@@ -165,8 +146,7 @@ function processTrace(jumpToEnd) {
165146 $ ( '#executionSlider' ) . slider ( {
166147 min : 0 ,
167148 max : curTrace . length - 1 ,
168- step : 1
169-
149+ step : 1 ,
170150 } ) ;
171151
172152 //disable keyboard actions on the slider itself (to prevent double-firing of events)
@@ -889,6 +869,15 @@ function renderDataStructures(curEntry, vizDiv) {
889869 console.log('---');
890870 */
891871
872+ // VERY VERY experimental!!!
873+ // when doing this for realz, convert to using d3 and use row ID tag
874+ // as unique object ID for object constancy.
875+ var curEntryLayout = curTraceLayouts [ curInstr ] ;
876+ toplevelHeapLayout = curEntryLayout . map ( function ( row )
877+ { return row . slice ( 1 , row . length ) ; // KRAZY!!! remove row ID tag for now
878+ } ) ;
879+
880+
892881
893882 // Heap object rendering phase:
894883
0 commit comments