Minor function signature adjustments

This commit is contained in:
Jeff Parsons 2015-04-02 14:30:27 -07:00 • committed by jeffpar
commit 70ddfc73d0
12 changed files with 40 additions and 29 deletions

View file

@ -1024,13 +1024,14 @@ ChipSet.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {ChipSet} * @this {ChipSet}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
ChipSet.prototype.powerDown = function(fSave) ChipSet.prototype.powerDown = function(fSave, fShutdown)
{ {
return fSave && this.save? this.save() : true; return fSave && this.save? this.save() : true;
}; };

View file

@ -277,13 +277,14 @@ CPU.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {CPU} * @this {CPU}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
CPU.prototype.powerDown = function(fSave) CPU.prototype.powerDown = function(fSave, fShutdown)
{ {
/* /*
* The Computer component (which is responsible for all powerDown and powerUp notifications) * The Computer component (which is responsible for all powerDown and powerUp notifications)

View file

@ -41,6 +41,7 @@ if (DEBUGGER) {
var Interrupts = require("./interrupts"); var Interrupts = require("./interrupts");
var Messages = require("./messages"); var Messages = require("./messages");
var Bus = require("./bus"); var Bus = require("./bus");
var Keyboard = require("./keyboard");
var State = require("./state"); var State = require("./state");
var CPU = require("./cpu"); var CPU = require("./cpu");
var X86 = require("./x86"); var X86 = require("./x86");

View file

@ -606,13 +606,14 @@ FDC.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {FDC} * @this {FDC}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
FDC.prototype.powerDown = function(fSave) FDC.prototype.powerDown = function(fSave, fShutdown)
{ {
return fSave && this.save? this.save() : true; return fSave && this.save? this.save() : true;
}; };

View file

@ -1357,13 +1357,14 @@ Keyboard.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {Keyboard} * @this {Keyboard}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
Keyboard.prototype.powerDown = function(fSave) Keyboard.prototype.powerDown = function(fSave, fShutdown)
{ {
return fSave && this.save? this.save() : true; return fSave && this.save? this.save() : true;
}; };

View file

@ -263,7 +263,7 @@ Mouse.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {Mouse} * @this {Mouse}
* @param {boolean} fSave * @param {boolean} fSave

View file

@ -38,6 +38,7 @@ if (typeof module !== 'undefined') {
var Component = require("../../shared/lib/component"); var Component = require("../../shared/lib/component");
var Bus = require("./bus"); var Bus = require("./bus");
var Memory = require("./memory"); var Memory = require("./memory");
var X86 = require("./x86");
} }
/** /**
@ -364,13 +365,14 @@ Panel.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {Panel} * @this {Panel}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
Panel.prototype.powerDown = function(fSave) Panel.prototype.powerDown = function(fSave, fShutdown)
{ {
return true; return true;
}; };

View file

@ -113,13 +113,14 @@ RAM.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {RAM} * @this {RAM}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
RAM.prototype.powerDown = function(fSave) RAM.prototype.powerDown = function(fSave, fShutdown)
{ {
/* /*
* The Computer powers down the CPU first, at which point the X86 state is saved, * The Computer powers down the CPU first, at which point the X86 state is saved,

View file

@ -174,7 +174,7 @@ ROM.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* Since we have nothing to do on powerDown(), and no state to return, we could simply omit * Since we have nothing to do on powerDown(), and no state to return, we could simply omit
* this function. But it doesn't hurt anything, and maybe we'll use our state to save something * this function. But it doesn't hurt anything, and maybe we'll use our state to save something
@ -183,9 +183,10 @@ ROM.prototype.powerUp = function(data, fRepower)
* *
* @this {ROM} * @this {ROM}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
ROM.prototype.powerDown = function(fSave) ROM.prototype.powerDown = function(fSave, fShutdown)
{ {
return true; return true;
}; };

View file

@ -401,13 +401,14 @@ SerialPort.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* @this {SerialPort} * @this {SerialPort}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
SerialPort.prototype.powerDown = function(fSave) SerialPort.prototype.powerDown = function(fSave, fShutdown)
{ {
return fSave && this.save ? this.save() : true; return fSave && this.save ? this.save() : true;
}; };

View file

@ -2451,16 +2451,17 @@ Video.prototype.powerUp = function(data, fRepower)
}; };
/** /**
* powerDown(fSave) * powerDown(fSave, fShutdown)
* *
* This is where we might add some method of blanking the display, without the disturbing the video * This is where we might add some method of blanking the display, without the disturbing the video
* buffer contents, and blocking all further updates to the display. * buffer contents, and blocking all further updates to the display.
* *
* @this {Video} * @this {Video}
* @param {boolean} fSave * @param {boolean} fSave
* @return {Object|boolean} * @param {boolean} [fShutdown]
* @return {Object|boolean} component state if fSave; otherwise, true if successful, false if failure
*/ */
Video.prototype.powerDown = function(fSave) Video.prototype.powerDown = function(fSave, fShutdown)
{ {
return fSave && this.save? this.save() : true; return fSave && this.save? this.save() : true;
}; };

View file

@ -1344,7 +1344,7 @@ X86CPU.prototype.restoreProtMode = function(a)
* UPDATES: The current speed multiplier from getSpeed() is now saved in group #3, so that your speed is preserved. * UPDATES: The current speed multiplier from getSpeed() is now saved in group #3, so that your speed is preserved.
* *
* @this {X86CPU} * @this {X86CPU}
* @return {Object} * @return {Object|null}
*/ */
X86CPU.prototype.save = function() X86CPU.prototype.save = function()
{ {