src/third_party/v8-3.25/src/liveedit-debugger.js
// an actual tree of functions in script.
an actual tree of functions in script.
an actual tree of functions in script .
function BuildCodeInfoTree(code_info_array) {
    var index = 0;
    function BuildNode() {
      var my_index = index;
      index++;
      var child_array = new Array();
      while (index < code_info_array.length &&
          code_info_array[index].outer_index == my_index) {
        child_array.push(BuildNode());
      }
      var node = new CodeInfoTreeNode(code_info_array[my_index], child_array,
          my_index);
      for (var i = 0; i < child_array.length; i++) {
        child_array[i].parent = node;
      }
      return node;
    }
    var root = BuildNode();
    Assert(index == code_info_array.length);
    return root;
  }
function BuildCodeInfoTree ( code_info_array ) { var index = 0 ; function BuildNode ( ) { var my_index = index ; index ++ ; var child_array = new Array ( ) ; while ( index < code_info_array . length && code_info_array [ index ] . outer_index == my_index ) { child_array . push ( BuildNode ( ) ) ; } var node = new CodeInfoTreeNode ( code_info_array [ my_index ] , child_array , my_index ) ; for ( var i = 0 ; i < child_array . length ; i ++ ) { child_array [ i ] . parent = node ; } return node ; } var root = BuildNode ( ) ; Assert ( index == code_info_array . length ) ; return root ; }
an actual tree of functions in script.
an actual tree of functions in script .
// Throughtout all function we iterate over input array. // Recursive function that builds a branch of tree.