@@ -626,47 +626,6 @@ function renderDataStructures(curEntry, vizDiv) {
626626 $ ( vizDiv + " #stack" ) . append ( '<div id="stackHeader">Frames</div>' ) ;
627627
628628
629- // merge zombie_stack_locals and stack_locals into one master
630- // ordered list using some simple rules for aesthetics
631- var stack_to_render = [ ] ;
632-
633- // first push all regular stack entries backwards
634- if ( curEntry . stack_locals ) {
635- for ( var i = curEntry . stack_locals . length - 1 ; i >= 0 ; i -- ) {
636- var entry = curEntry . stack_locals [ i ] ;
637- entry . is_zombie = false ;
638- entry . is_highlighted = ( i == 0 ) ;
639- stack_to_render . push ( entry ) ;
640- }
641- }
642-
643- // zombie stack consists of exited functions that have returned nested functions
644- // push zombie stack entries at the BEGINNING of stack_to_render,
645- // EXCEPT put zombie entries BEHIND regular entries that are their parents
646- if ( curEntry . zombie_stack_locals ) {
647-
648- for ( var i = curEntry . zombie_stack_locals . length - 1 ; i >= 0 ; i -- ) {
649- var entry = curEntry . zombie_stack_locals [ i ] ;
650- entry . is_zombie = true ;
651- entry . is_highlighted = false ; // never highlight zombie entries
652-
653- // j should be 0 most of the time, so we're always inserting new
654- // elements to the front of stack_to_render (which is why we are
655- // iterating backwards over zombie_stack_locals).
656- var j = 0 ;
657- for ( j = 0 ; j < stack_to_render . length ; j ++ ) {
658- if ( $ . inArray ( stack_to_render [ j ] . frame_id , entry . parent_frame_id_list ) >= 0 ) {
659- continue ;
660- }
661- break ;
662- }
663-
664- stack_to_render . splice ( j , 0 , entry ) ;
665- }
666-
667- }
668-
669-
670629 // first build up a list of lists representing the locations of TOP-LEVEL heap objects to be rendered.
671630 // doing so decouples the data format of curEntry from the nitty-gritty HTML rendering code,
672631 // which gives us more flexibility in experimenting with layout strategies.
@@ -813,16 +772,11 @@ function renderDataStructures(curEntry, vizDiv) {
813772 }
814773 } ) ;
815774
816- $ . each ( stack_to_render , function ( i , frame ) {
775+ $ . each ( curEntry . stack_to_render , function ( i , frame ) {
817776 if ( frame . ordered_varnames . length > 0 ) {
818777 $ . each ( frame . ordered_varnames , function ( xxx , varname ) {
819778 var val = frame . encoded_locals [ varname ] ;
820779
821- // ignore return values for zombie frames
822- if ( frame . is_zombie && varname == '__return__' ) {
823- return ;
824- }
825-
826780 if ( ! isPrimitiveType ( val ) ) {
827781 layoutHeapObject ( val ) ;
828782 //console.log(frame.func_name + ':', varname, getRefID(val));
@@ -1148,7 +1102,7 @@ function renderDataStructures(curEntry, vizDiv) {
11481102 }
11491103
11501104
1151- $ . each ( stack_to_render , function ( i , e ) {
1105+ $ . each ( curEntry . stack_to_render , function ( i , e ) {
11521106 renderStackFrame ( e , i , e . is_zombie ) ;
11531107 } ) ;
11541108
@@ -1199,11 +1153,6 @@ function renderDataStructures(curEntry, vizDiv) {
11991153 $ . each ( frame . ordered_varnames , function ( xxx , varname ) {
12001154 var val = localVars [ varname ] ;
12011155
1202- // don't render return values for zombie frames
1203- if ( is_zombie && varname == '__return__' ) {
1204- return ;
1205- }
1206-
12071156 // special treatment for displaying return value and indicating
12081157 // that the function is about to return to its caller
12091158 //
@@ -1296,7 +1245,7 @@ function renderDataStructures(curEntry, vizDiv) {
12961245
12971246 // highlight the top-most non-zombie stack frame or, if not available, globals
12981247 var frame_already_highlighted = false ;
1299- $ . each ( stack_to_render , function ( i , e ) {
1248+ $ . each ( curEntry . stack_to_render , function ( i , e ) {
13001249 if ( e . is_highlighted ) {
13011250 highlight_frame ( 'stack' + i ) ;
13021251 frame_already_highlighted = true ;
0 commit comments