Use @typedef instead of @class annotations
This commit is contained in:
parent
8ac1219c13
commit
0e77c0c88a
2 changed files with 39 additions and 34 deletions
|
|
@ -41,12 +41,21 @@ if (typeof module !== 'undefined') {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class BackTrack
|
* BackTrack objects have the following properties:
|
||||||
* @property {Object} obj
|
*
|
||||||
* @property {number} off
|
* obj: a reference to the source object (eg, ROM object, Sector object)
|
||||||
* @property {number} slot
|
* off: the offset within the source object that this object refers to
|
||||||
* @property {number} refs
|
* slot: the slot (+1) in abtObjects which this object currently occupies
|
||||||
|
* refs: the number of memory references, as recorded by writeBackTrack()
|
||||||
|
*
|
||||||
|
* @typedef {{
|
||||||
|
* obj: Object,
|
||||||
|
* off: number,
|
||||||
|
* slot: number,
|
||||||
|
* refs: number
|
||||||
|
* }}
|
||||||
*/
|
*/
|
||||||
|
var BackTrack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bus(cpu, dbg)
|
* Bus(cpu, dbg)
|
||||||
|
|
@ -173,14 +182,6 @@ function Bus(parmsBus, cpu, dbg)
|
||||||
this.initMemory();
|
this.initMemory();
|
||||||
|
|
||||||
if (BACKTRACK) {
|
if (BACKTRACK) {
|
||||||
/*
|
|
||||||
* BackTrack objects have the following properties:
|
|
||||||
*
|
|
||||||
* obj: a reference to the source object (eg, ROM object, Sector object)
|
|
||||||
* off: the offset within the source object that this object refers to
|
|
||||||
* slot: the slot (+1) in abtObjects which this object currently occupies
|
|
||||||
* refs: the number of memory references, as recorded by writeBackTrack()
|
|
||||||
*/
|
|
||||||
this.abtObjects = [];
|
this.abtObjects = [];
|
||||||
this.cbtDeletions = 0;
|
this.cbtDeletions = 0;
|
||||||
this.ibtLastAlloc = -1;
|
this.ibtLastAlloc = -1;
|
||||||
|
|
@ -854,9 +855,9 @@ Bus.prototype.setLongDirect = function(addr, l)
|
||||||
*
|
*
|
||||||
* @this {Bus}
|
* @this {Bus}
|
||||||
* @param {Object} obj
|
* @param {Object} obj
|
||||||
* @param {Object} bto
|
* @param {BackTrack} bto
|
||||||
* @param {number} off (the offset within obj that this wrapper object is relative to)
|
* @param {number} off (the offset within obj that this wrapper object is relative to)
|
||||||
* @return {Object|null}
|
* @return {BackTrack|null}
|
||||||
*/
|
*/
|
||||||
Bus.prototype.addBackTrackObject = function(obj, bto, off)
|
Bus.prototype.addBackTrackObject = function(obj, bto, off)
|
||||||
{
|
{
|
||||||
|
|
@ -910,7 +911,7 @@ Bus.prototype.addBackTrackObject = function(obj, bto, off)
|
||||||
* getBackTrackIndex(bto, off)
|
* getBackTrackIndex(bto, off)
|
||||||
*
|
*
|
||||||
* @this {Bus}
|
* @this {Bus}
|
||||||
* @param {Object|null} bto
|
* @param {BackTrack|null} bto
|
||||||
* @param {number} off
|
* @param {number} off
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
|
|
@ -928,7 +929,7 @@ Bus.prototype.getBackTrackIndex = function(bto, off)
|
||||||
*
|
*
|
||||||
* @this {Bus}
|
* @this {Bus}
|
||||||
* @param {number} addr is a physical (non-segmented) address
|
* @param {number} addr is a physical (non-segmented) address
|
||||||
* @param {Object|null} bto
|
* @param {BackTrack|null} bto
|
||||||
* @param {number} off
|
* @param {number} off
|
||||||
*/
|
*/
|
||||||
Bus.prototype.writeBackTrackObject = function(addr, bto, off)
|
Bus.prototype.writeBackTrackObject = function(addr, bto, off)
|
||||||
|
|
|
||||||
|
|
@ -229,26 +229,18 @@ function Disk(controller, drive, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class File
|
* @typedef {{
|
||||||
* @property {string} sPath
|
* sPath: string,
|
||||||
* @property {string} sName
|
* sName: string,
|
||||||
* @property {number} bAttr
|
* bAttr: number,
|
||||||
* @property {number} cbSize
|
* cbSize: number,
|
||||||
* @property {Array.<number>} apba
|
* apba: Array.<number>,
|
||||||
* @property {Disk} disk
|
* disk: Disk
|
||||||
|
* }}
|
||||||
*/
|
*/
|
||||||
|
var FileInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class Sector
|
|
||||||
* @property {number} sector
|
|
||||||
* @property {number} length
|
|
||||||
* @property {Array.<number>} data
|
|
||||||
* @property {number|null} pattern
|
|
||||||
* @property {number} iCylinder
|
|
||||||
* @property {number} iHead
|
|
||||||
* @property {number} iModify
|
|
||||||
* @property {number} cModify
|
|
||||||
*
|
|
||||||
* Every Sector object (once loaded and fully parsed) should have ALL of the following named properties:
|
* Every Sector object (once loaded and fully parsed) should have ALL of the following named properties:
|
||||||
*
|
*
|
||||||
* 'sector': sector number
|
* 'sector': sector number
|
||||||
|
|
@ -277,7 +269,19 @@ function Disk(controller, drive, mode)
|
||||||
*
|
*
|
||||||
* TODO: Perhaps we should also maintain a failure count and stop trying to write sectors that reach a certain
|
* TODO: Perhaps we should also maintain a failure count and stop trying to write sectors that reach a certain
|
||||||
* threshold. Error-handling, as usual, is the thorniest problem.
|
* threshold. Error-handling, as usual, is the thorniest problem.
|
||||||
|
*
|
||||||
|
* @typedef {{
|
||||||
|
* sector: number,
|
||||||
|
* length: number,
|
||||||
|
* data: Array.<number>,
|
||||||
|
* pattern: (number|null),
|
||||||
|
* iCylinder: number,
|
||||||
|
* iHead: number,
|
||||||
|
* iModify: number,
|
||||||
|
* cModify: number
|
||||||
|
* }}
|
||||||
*/
|
*/
|
||||||
|
var SectorData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class SectorInfo
|
* @class SectorInfo
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue