@@ -43,7 +43,6 @@ var myVisualizer = null; // singleton ExecutionVisualizer instance
4343
4444
4545$ ( document ) . ready ( function ( ) {
46-
4746 var preseededCode = $ . bbq . getState ( 'code' ) ;
4847 var cumulativeState = $ . bbq . getState ( 'cumulative' ) ;
4948 if ( ! cumulativeState ) {
@@ -52,16 +51,15 @@ $(document).ready(function() {
5251
5352 var pyState = $ . bbq . getState ( 'py' ) ;
5453 var verticalStackBool = ( $ . bbq . getState ( 'verticalStack' ) == 'true' ) ; // boolean
54+ var heapPrimitivesBool = ( $ . bbq . getState ( 'heapPrimitives' ) == 'true' ) ;
55+ var drawParentPointerBool = ( $ . bbq . getState ( 'drawParentPointers' ) == 'true' ) ;
56+ var textRefsBool = ( $ . bbq . getState ( 'textReferences' ) == 'true' ) ;
5557
5658 var preseededCurInstr = Number ( $ . bbq . getState ( 'curInstr' ) ) ;
5759 if ( ! preseededCurInstr ) {
5860 preseededCurInstr = 0 ;
5961 }
6062
61- // TODO: add more options as needed
62-
63-
64-
6563 var backend_script = null ;
6664 if ( pyState == '2' ) {
6765 backend_script = python2_backend_script ;
@@ -77,10 +75,10 @@ $(document).ready(function() {
7775
7876
7977 $ . get ( backend_script ,
80- { user_script : preseededCode , cumulative_mode : cumulativeState } ,
78+ { user_script : preseededCode , cumulative_mode : cumulativeState , heap_primitives : heapPrimitivesBool } ,
8179 function ( dataFromBackend ) {
8280 var trace = dataFromBackend . trace ;
83-
81+
8482 // don't enter visualize mode if there are killer errors:
8583 if ( ! trace ||
8684 ( trace . length == 0 ) ||
@@ -109,6 +107,9 @@ $(document).ready(function() {
109107 { startingInstruction : preseededCurInstr ,
110108 embeddedMode : true ,
111109 verticalStack : verticalStackBool ,
110+ disableHeapNesting : heapPrimitivesBool ,
111+ drawParentPointers : drawParentPointerBool ,
112+ textualMemoryLabels : textRefsBool ,
112113 } ) ;
113114 }
114115 } ,
0 commit comments