| Index: tools/deep_memory_profiler/visualizer/utility.js
|
| diff --git a/tools/deep_memory_profiler/visualizer/utility.js b/tools/deep_memory_profiler/visualizer/utility.js
|
| deleted file mode 100644
|
| index 85f676819ff683c722d435bf3e65118576e87299..0000000000000000000000000000000000000000
|
| --- a/tools/deep_memory_profiler/visualizer/utility.js
|
| +++ /dev/null
|
| @@ -1,66 +0,0 @@
|
| -// Copyright 2013 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -/**
|
| - * This function returns the first element index that >= target, when no element
|
| - * in the array >= target, return array.length.
|
| - * This function must be called in the shape of binarySearch(array, target).
|
| - * @param {number} target
|
| - * @return {number}
|
| - */
|
| -var binarySearch = function(target) {
|
| - 'use strict';
|
| -
|
| - var left = 0;
|
| - var right = this.length - 1;
|
| - while (left <= right) {
|
| - var mid = Math.floor((left + right) / 2);
|
| - if (this[mid] < target)
|
| - left = mid + 1;
|
| - else if (this[mid] > target)
|
| - right = mid - 1;
|
| - else
|
| - return mid;
|
| - }
|
| - return left;
|
| -};
|
| -
|
| -/**
|
| - * Return the intersection set of two arrays.
|
| - * @param {Array.<*>} left
|
| - * @param {Array.<*>} right
|
| - * @return {Array.<*>}
|
| - */
|
| -var intersection = function(left, right) {
|
| - return left.reduce(function(previous, current) {
|
| - if (right.indexOf(current) != -1)
|
| - previous.push(current);
|
| - return previous;
|
| - }, []);
|
| -};
|
| -
|
| -/**
|
| - * Return the difference set of left with right.
|
| - * Notice: difference(left, right) differentiates with difference(right, left).
|
| - * @param {Array.<*>} left
|
| - * @param {Array.<*>} right
|
| - * @return {Array.<*>}
|
| - */
|
| -var difference = function(left, right) {
|
| - return left.reduce(function(previous, current) {
|
| - if (right.indexOf(current) == -1)
|
| - previous.push(current);
|
| - return previous;
|
| - }, []);
|
| -};
|
| -
|
| -/**
|
| - * Output object with indented format.
|
| - * @param {Object} obj
|
| - * @param {string} title
|
| - */
|
| -var inspect = function(obj, title) {
|
| - if (title) console.log(title);
|
| - console.log(JSON.stringify(obj, null, 2));
|
| -};
|
|
|