diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-02-16 08:38:33 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-02-16 10:38:49 -0800 |
commit | 550f73ae3e3b29aa36e793e8ffc5cd23478df099 (patch) | |
tree | 3f4d8f9d7648169df967a820406923a9c4321cba /deps/v8/tools/logreader.js | |
parent | 3ef6433255cfeabdeb70bbfa51ac32a287c5d243 (diff) | |
download | android-node-v8-550f73ae3e3b29aa36e793e8ffc5cd23478df099.tar.gz android-node-v8-550f73ae3e3b29aa36e793e8ffc5cd23478df099.tar.bz2 android-node-v8-550f73ae3e3b29aa36e793e8ffc5cd23478df099.zip |
Upgrade V8 to 3.1.5
Diffstat (limited to 'deps/v8/tools/logreader.js')
-rw-r--r-- | deps/v8/tools/logreader.js | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/deps/v8/tools/logreader.js b/deps/v8/tools/logreader.js index 50e3aa45c5..315e721276 100644 --- a/deps/v8/tools/logreader.js +++ b/deps/v8/tools/logreader.js @@ -29,10 +29,6 @@ * @fileoverview Log Reader is used to process log file produced by V8. */ -// Initlialize namespaces -var devtools = devtools || {}; -devtools.profiler = devtools.profiler || {}; - /** * Base class for processing log files. @@ -41,7 +37,7 @@ devtools.profiler = devtools.profiler || {}; * log records. * @constructor */ -devtools.profiler.LogReader = function(dispatchTable) { +function LogReader(dispatchTable) { /** * @type {Array.<Object>} */ @@ -55,9 +51,9 @@ devtools.profiler.LogReader = function(dispatchTable) { /** * CSV lines parser. - * @type {devtools.profiler.CsvParser} + * @type {CsvParser} */ - this.csvParser_ = new devtools.profiler.CsvParser(); + this.csvParser_ = new CsvParser(); }; @@ -66,7 +62,7 @@ devtools.profiler.LogReader = function(dispatchTable) { * * @param {string} str Error message. */ -devtools.profiler.LogReader.prototype.printError = function(str) { +LogReader.prototype.printError = function(str) { // Do nothing. }; @@ -76,7 +72,7 @@ devtools.profiler.LogReader.prototype.printError = function(str) { * * @param {string} chunk A portion of log. */ -devtools.profiler.LogReader.prototype.processLogChunk = function(chunk) { +LogReader.prototype.processLogChunk = function(chunk) { this.processLog_(chunk.split('\n')); }; @@ -86,7 +82,7 @@ devtools.profiler.LogReader.prototype.processLogChunk = function(chunk) { * * @param {string} line A line of log. */ -devtools.profiler.LogReader.prototype.processLogLine = function(line) { +LogReader.prototype.processLogLine = function(line) { this.processLog_([line]); }; @@ -99,7 +95,7 @@ devtools.profiler.LogReader.prototype.processLogLine = function(line) { * @param {Array.<string>} stack String representation of a stack. * @return {Array.<number>} Processed stack. */ -devtools.profiler.LogReader.prototype.processStack = function(pc, func, stack) { +LogReader.prototype.processStack = function(pc, func, stack) { var fullStack = func ? [pc, func] : [pc]; var prevFrame = pc; for (var i = 0, n = stack.length; i < n; ++i) { @@ -124,7 +120,7 @@ devtools.profiler.LogReader.prototype.processStack = function(pc, func, stack) { * @param {!Object} dispatch Dispatch record. * @return {boolean} True if dispatch must be skipped. */ -devtools.profiler.LogReader.prototype.skipDispatch = function(dispatch) { +LogReader.prototype.skipDispatch = function(dispatch) { return false; }; @@ -135,7 +131,7 @@ devtools.profiler.LogReader.prototype.skipDispatch = function(dispatch) { * @param {Array.<string>} fields Log record. * @private */ -devtools.profiler.LogReader.prototype.dispatchLogRow_ = function(fields) { +LogReader.prototype.dispatchLogRow_ = function(fields) { // Obtain the dispatch. var command = fields[0]; if (!(command in this.dispatchTable_)) { @@ -173,7 +169,7 @@ devtools.profiler.LogReader.prototype.dispatchLogRow_ = function(fields) { * @param {Array.<string>} lines Log lines. * @private */ -devtools.profiler.LogReader.prototype.processLog_ = function(lines) { +LogReader.prototype.processLog_ = function(lines) { for (var i = 0, n = lines.length; i < n; ++i, ++this.lineNum_) { var line = lines[i]; if (!line) { |