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
|
||||
* @property {Object} obj
|
||||
* @property {number} off
|
||||
* @property {number} slot
|
||||
* @property {number} refs
|
||||
* 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()
|
||||
*
|
||||
* @typedef {{
|
||||
* obj: Object,
|
||||
* off: number,
|
||||
* slot: number,
|
||||
* refs: number
|
||||
* }}
|
||||
*/
|
||||
var BackTrack;
|
||||
|
||||
/**
|
||||
* Bus(cpu, dbg)
|
||||
|
|
@ -173,14 +182,6 @@ function Bus(parmsBus, cpu, dbg)
|
|||
this.initMemory();
|
||||
|
||||
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.cbtDeletions = 0;
|
||||
this.ibtLastAlloc = -1;
|
||||
|
|
@ -854,9 +855,9 @@ Bus.prototype.setLongDirect = function(addr, l)
|
|||
*
|
||||
* @this {Bus}
|
||||
* @param {Object} obj
|
||||
* @param {Object} bto
|
||||
* @param {BackTrack} bto
|
||||
* @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)
|
||||
{
|
||||
|
|
@ -910,7 +911,7 @@ Bus.prototype.addBackTrackObject = function(obj, bto, off)
|
|||
* getBackTrackIndex(bto, off)
|
||||
*
|
||||
* @this {Bus}
|
||||
* @param {Object|null} bto
|
||||
* @param {BackTrack|null} bto
|
||||
* @param {number} off
|
||||
* @return {number}
|
||||
*/
|
||||
|
|
@ -928,7 +929,7 @@ Bus.prototype.getBackTrackIndex = function(bto, off)
|
|||
*
|
||||
* @this {Bus}
|
||||
* @param {number} addr is a physical (non-segmented) address
|
||||
* @param {Object|null} bto
|
||||
* @param {BackTrack|null} bto
|
||||
* @param {number} off
|
||||
*/
|
||||
Bus.prototype.writeBackTrackObject = function(addr, bto, off)
|
||||
|
|
|
|||
|
|
@ -229,26 +229,18 @@ function Disk(controller, drive, mode)
|
|||
}
|
||||
|
||||
/**
|
||||
* @class File
|
||||
* @property {string} sPath
|
||||
* @property {string} sName
|
||||
* @property {number} bAttr
|
||||
* @property {number} cbSize
|
||||
* @property {Array.<number>} apba
|
||||
* @property {Disk} disk
|
||||
* @typedef {{
|
||||
* sPath: string,
|
||||
* sName: string,
|
||||
* bAttr: number,
|
||||
* cbSize: number,
|
||||
* apba: Array.<number>,
|
||||
* 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:
|
||||
*
|
||||
* '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
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue