lib: remove unused variables and functions
This commit is contained in:
parent
1f9f863494
commit
6d842897c5
@ -739,8 +739,7 @@ function SourceInfo(body) {
|
|||||||
// This class is the repl-enabled debugger interface which is invoked on
|
// This class is the repl-enabled debugger interface which is invoked on
|
||||||
// "node debug"
|
// "node debug"
|
||||||
function Interface(stdin, stdout, args) {
|
function Interface(stdin, stdout, args) {
|
||||||
var self = this,
|
var self = this;
|
||||||
child;
|
|
||||||
|
|
||||||
this.stdin = stdin;
|
this.stdin = stdin;
|
||||||
this.stdout = stdout;
|
this.stdout = stdout;
|
||||||
|
@ -142,10 +142,6 @@ Agent.prototype.addRequest = function(req, options) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var host = options.host;
|
|
||||||
var port = options.port;
|
|
||||||
var localAddress = options.localAddress;
|
|
||||||
|
|
||||||
var name = this.getName(options);
|
var name = this.getName(options);
|
||||||
if (!this.sockets[name]) {
|
if (!this.sockets[name]) {
|
||||||
this.sockets[name] = [];
|
this.sockets[name] = [];
|
||||||
|
@ -36,7 +36,6 @@ var IncomingMessage = require('_http_incoming').IncomingMessage;
|
|||||||
var OutgoingMessage = require('_http_outgoing').OutgoingMessage;
|
var OutgoingMessage = require('_http_outgoing').OutgoingMessage;
|
||||||
|
|
||||||
var agent = require('_http_agent');
|
var agent = require('_http_agent');
|
||||||
var Agent = agent.Agent;
|
|
||||||
var globalAgent = agent.globalAgent;
|
var globalAgent = agent.globalAgent;
|
||||||
|
|
||||||
|
|
||||||
@ -308,7 +307,6 @@ function socketOnData(d) {
|
|||||||
|
|
||||||
// client
|
// client
|
||||||
function parserOnIncomingClient(res, shouldKeepAlive) {
|
function parserOnIncomingClient(res, shouldKeepAlive) {
|
||||||
var parser = this;
|
|
||||||
var socket = this.socket;
|
var socket = this.socket;
|
||||||
var req = socket._httpMessage;
|
var req = socket._httpMessage;
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ var common = require('_http_common');
|
|||||||
|
|
||||||
var CRLF = common.CRLF;
|
var CRLF = common.CRLF;
|
||||||
var chunkExpression = common.chunkExpression;
|
var chunkExpression = common.chunkExpression;
|
||||||
var continueExpression = common.continueExpression;
|
|
||||||
var debug = common.debug;
|
var debug = common.debug;
|
||||||
|
|
||||||
|
|
||||||
@ -194,7 +193,6 @@ OutgoingMessage.prototype._storeHeader = function(firstLine, headers) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var field, value;
|
var field, value;
|
||||||
var self = this;
|
|
||||||
|
|
||||||
if (headers) {
|
if (headers) {
|
||||||
var keys = Object.keys(headers);
|
var keys = Object.keys(headers);
|
||||||
@ -457,7 +455,6 @@ OutgoingMessage.prototype.addTrailers = function(headers) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
var zero_chunk_buf = new Buffer('\r\n0\r\n');
|
|
||||||
var crlf_buf = new Buffer('\r\n');
|
var crlf_buf = new Buffer('\r\n');
|
||||||
|
|
||||||
|
|
||||||
|
@ -582,7 +582,6 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
|
|||||||
|
|
||||||
function pipeOnDrain(src) {
|
function pipeOnDrain(src) {
|
||||||
return function() {
|
return function() {
|
||||||
var dest = this;
|
|
||||||
var state = src._readableState;
|
var state = src._readableState;
|
||||||
debug('pipeOnDrain', state.awaitDrain);
|
debug('pipeOnDrain', state.awaitDrain);
|
||||||
if (state.awaitDrain)
|
if (state.awaitDrain)
|
||||||
|
@ -112,7 +112,7 @@ function Transform(options) {
|
|||||||
|
|
||||||
Duplex.call(this, options);
|
Duplex.call(this, options);
|
||||||
|
|
||||||
var ts = this._transformState = new TransformState(options, this);
|
this._transformState = new TransformState(options, this);
|
||||||
|
|
||||||
// when the writable side finishes, then flush out anything remaining.
|
// when the writable side finishes, then flush out anything remaining.
|
||||||
var stream = this;
|
var stream = this;
|
||||||
@ -192,7 +192,6 @@ function done(stream, er) {
|
|||||||
// if there's nothing in the write buffer, then that means
|
// if there's nothing in the write buffer, then that means
|
||||||
// that nothing more will ever be provided
|
// that nothing more will ever be provided
|
||||||
var ws = stream._writableState;
|
var ws = stream._writableState;
|
||||||
var rs = stream._readableState;
|
|
||||||
var ts = stream._transformState;
|
var ts = stream._transformState;
|
||||||
|
|
||||||
if (ws.length)
|
if (ws.length)
|
||||||
|
@ -27,7 +27,6 @@ module.exports = Writable;
|
|||||||
Writable.WritableState = WritableState;
|
Writable.WritableState = WritableState;
|
||||||
|
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
var assert = require('assert');
|
|
||||||
var Stream = require('stream');
|
var Stream = require('stream');
|
||||||
|
|
||||||
util.inherits(Writable, Stream);
|
util.inherits(Writable, Stream);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
var constants = require('constants');
|
var constants = require('constants');
|
||||||
var crypto = require('crypto');
|
var crypto = require('crypto');
|
||||||
var events = require('events');
|
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
var tls = require('tls');
|
var tls = require('tls');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
@ -132,8 +131,6 @@ function TLSSocket(socket, options) {
|
|||||||
writable: socket.writable
|
writable: socket.writable
|
||||||
});
|
});
|
||||||
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this._tlsOptions = options;
|
this._tlsOptions = options;
|
||||||
this._secureEstablished = false;
|
this._secureEstablished = false;
|
||||||
this._controlReleased = false;
|
this._controlReleased = false;
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
var buffer = process.binding('buffer');
|
var buffer = process.binding('buffer');
|
||||||
var smalloc = process.binding('smalloc');
|
var smalloc = process.binding('smalloc');
|
||||||
var assert = require('assert');
|
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
var alloc = smalloc.alloc;
|
var alloc = smalloc.alloc;
|
||||||
var sliceOnto = smalloc.sliceOnto;
|
var sliceOnto = smalloc.sliceOnto;
|
||||||
|
@ -104,8 +104,6 @@ var handleConversion = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
got: function(message, handle, emit) {
|
got: function(message, handle, emit) {
|
||||||
var self = this;
|
|
||||||
|
|
||||||
var server = new net.Server();
|
var server = new net.Server();
|
||||||
server.listen(handle, function() {
|
server.listen(handle, function() {
|
||||||
emit(server);
|
emit(server);
|
||||||
@ -199,8 +197,6 @@ var handleConversion = {
|
|||||||
function SocketListSend(slave, key) {
|
function SocketListSend(slave, key) {
|
||||||
EventEmitter.call(this);
|
EventEmitter.call(this);
|
||||||
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.slave = slave;
|
this.slave = slave;
|
||||||
}
|
}
|
||||||
@ -585,7 +581,7 @@ exports.exec = function(command /*, options, callback */) {
|
|||||||
|
|
||||||
|
|
||||||
exports.execFile = function(file /* args, options, callback */) {
|
exports.execFile = function(file /* args, options, callback */) {
|
||||||
var args, optionArg, callback;
|
var args, callback;
|
||||||
var options = {
|
var options = {
|
||||||
encoding: 'utf8',
|
encoding: 'utf8',
|
||||||
timeout: 0,
|
timeout: 0,
|
||||||
|
@ -32,18 +32,9 @@ var BIND_STATE_BOUND = 2;
|
|||||||
// lazily loaded
|
// lazily loaded
|
||||||
var cluster = null;
|
var cluster = null;
|
||||||
var dns = null;
|
var dns = null;
|
||||||
var net = null;
|
|
||||||
|
|
||||||
var errnoException = util._errnoException;
|
var errnoException = util._errnoException;
|
||||||
|
|
||||||
function isIP(address) {
|
|
||||||
if (!net)
|
|
||||||
net = require('net');
|
|
||||||
|
|
||||||
return net.isIP(address);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function lookup(address, family, callback) {
|
function lookup(address, family, callback) {
|
||||||
if (!dns)
|
if (!dns)
|
||||||
dns = require('dns');
|
dns = require('dns');
|
||||||
|
@ -1158,12 +1158,6 @@ fs.unwatchFile = function(filename, listener) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Realpath
|
|
||||||
// Not using realpath(2) because it's bad.
|
|
||||||
// See: http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
|
|
||||||
|
|
||||||
var normalize = pathModule.normalize;
|
|
||||||
|
|
||||||
// Regexp that finds the next partion of a (partial) path
|
// Regexp that finds the next partion of a (partial) path
|
||||||
// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
|
// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
|
||||||
if (isWindows) {
|
if (isWindows) {
|
||||||
|
@ -28,7 +28,7 @@ var IncomingMessage = exports.IncomingMessage = incoming.IncomingMessage;
|
|||||||
|
|
||||||
|
|
||||||
var common = require('_http_common');
|
var common = require('_http_common');
|
||||||
var parsers = exports.parsers = common.parsers;
|
exports.parsers = common.parsers;
|
||||||
|
|
||||||
|
|
||||||
var outgoing = require('_http_outgoing');
|
var outgoing = require('_http_outgoing');
|
||||||
@ -55,8 +55,6 @@ exports.get = function(options, cb) {
|
|||||||
return globalAgent.get(options, cb);
|
return globalAgent.get(options, cb);
|
||||||
};
|
};
|
||||||
|
|
||||||
var httpSocketSetup = common.httpSocketSetup;
|
|
||||||
|
|
||||||
exports._connectionListener = server._connectionListener;
|
exports._connectionListener = server._connectionListener;
|
||||||
var Server = exports.Server = server.Server;
|
var Server = exports.Server = server.Server;
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
var tls = require('tls');
|
var tls = require('tls');
|
||||||
var http = require('http');
|
var http = require('http');
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
var url = require('url');
|
|
||||||
var inherits = require('util').inherits;
|
var inherits = require('util').inherits;
|
||||||
var debug = util.debuglog('https');
|
var debug = util.debuglog('https');
|
||||||
|
|
||||||
|
@ -747,7 +747,6 @@ Socket.prototype.__defineGetter__('bytesWritten', function() {
|
|||||||
|
|
||||||
function afterWrite(status, handle, req) {
|
function afterWrite(status, handle, req) {
|
||||||
var self = handle.owner;
|
var self = handle.owner;
|
||||||
var state = self._writableState;
|
|
||||||
if (self !== process.stderr && self !== process.stdout)
|
if (self !== process.stderr && self !== process.stdout)
|
||||||
debug('afterWrite', status);
|
debug('afterWrite', status);
|
||||||
|
|
||||||
|
@ -228,7 +228,6 @@
|
|||||||
k,
|
k,
|
||||||
digit,
|
digit,
|
||||||
t,
|
t,
|
||||||
length,
|
|
||||||
/** Cached calculation results */
|
/** Cached calculation results */
|
||||||
baseMinusT;
|
baseMinusT;
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
// * http://www.3waylabs.com/nw/WWW/products/wizcon/vt220.html
|
// * http://www.3waylabs.com/nw/WWW/products/wizcon/vt220.html
|
||||||
|
|
||||||
var kHistorySize = 30;
|
var kHistorySize = 30;
|
||||||
var kBufSize = 10 * 1024;
|
|
||||||
|
|
||||||
var util = require('util');
|
var util = require('util');
|
||||||
var inherits = require('util').inherits;
|
var inherits = require('util').inherits;
|
||||||
@ -213,8 +212,6 @@ Interface.prototype._addHistory = function() {
|
|||||||
|
|
||||||
|
|
||||||
Interface.prototype._refreshLine = function() {
|
Interface.prototype._refreshLine = function() {
|
||||||
var columns = this.columns;
|
|
||||||
|
|
||||||
// line length
|
// line length
|
||||||
var line = this._prompt + this.line;
|
var line = this._prompt + this.line;
|
||||||
var dispPos = this._getDisplayPos(line);
|
var dispPos = this._getDisplayPos(line);
|
||||||
|
@ -447,7 +447,7 @@ REPLServer.prototype.complete = function(line, callback) {
|
|||||||
// list of completion lists, one for each inheritance "level"
|
// list of completion lists, one for each inheritance "level"
|
||||||
var completionGroups = [];
|
var completionGroups = [];
|
||||||
|
|
||||||
var completeOn, match, filter, i, j, group, c;
|
var completeOn, match, filter, i, group, c;
|
||||||
|
|
||||||
// REPL commands (e.g. ".break").
|
// REPL commands (e.g. ".break").
|
||||||
var match = null;
|
var match = null;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
var assert = require('assert');
|
|
||||||
var inherits = require('util').inherits;
|
var inherits = require('util').inherits;
|
||||||
var net = require('net');
|
var net = require('net');
|
||||||
var TTY = process.binding('tty_wrap').TTY;
|
var TTY = process.binding('tty_wrap').TTY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user