diff --git a/modern/src/maki-interpreter/__snapshots__/objects.test.js.snap b/modern/src/maki-interpreter/__snapshots__/objects.test.js.snap index 0a960d0c..e15ea58f 100644 --- a/modern/src/maki-interpreter/__snapshots__/objects.test.js.snap +++ b/modern/src/maki-interpreter/__snapshots__/objects.test.js.snap @@ -459,5 +459,13 @@ ConfigItem.getguid ConfigAttribute.setdata ConfigAttribute.getdata ConfigAttribute.getparentitem -ConfigAttribute.getattributename" +ConfigAttribute.getattributename +PlDir.showcurrentlyplayingentry +FeedWatcher.setfeed +FeedWatcher.releasefeed +FeedWatcher.onfeedchange +Form.getcontentsheight +Form.newcell +Form.nextrow +Form.deleteall" `; diff --git a/modern/src/maki-interpreter/objects.test.js b/modern/src/maki-interpreter/objects.test.js index 89c1be23..66d65b6e 100644 --- a/modern/src/maki-interpreter/objects.test.js +++ b/modern/src/maki-interpreter/objects.test.js @@ -78,6 +78,13 @@ describe("Maki classes", () => { }); } + test("All classes are implemented", () => { + const getName = Klass => Klass.prototype.getclassname(); + const actualNames = Object.values(runtime).map(getName); + const expectedNames = Object.values(objects).map(obj => obj.name); + expect(new Set(actualNames)).toEqual(new Set(expectedNames)); + }); + test("have no extra methods", () => { // getclassname _should_ be implemented on Object and let each class inherit // it. However it's far easier to implement it on each class directly, so diff --git a/modern/src/maki-interpreter/tools/extract-functions.js b/modern/src/maki-interpreter/tools/extract-functions.js index 53e80067..63b4b08a 100755 --- a/modern/src/maki-interpreter/tools/extract-functions.js +++ b/modern/src/maki-interpreter/tools/extract-functions.js @@ -51,7 +51,9 @@ function getCallCountsFromMaki(buffer) { const classId = maki.classes[method.typeOffset]; const klass = getClass(classId); if (klass == null) { - throw new Error(`Unknown class ID: ${getFormattedId(classId)}`); + throw new Error( + `Unknown class ID: ${getFormattedId(classId)} aka ${classId} (raw)` + ); } const parentClass = getFunctionObject(klass, method.name); return `${parentClass.name}.${method.name.toLowerCase()}`; diff --git a/modern/src/runtime/index.ts b/modern/src/runtime/index.ts index 6ea9c805..91a94150 100644 --- a/modern/src/runtime/index.ts +++ b/modern/src/runtime/index.ts @@ -39,6 +39,9 @@ import CheckBox from "./CheckBox"; import Config from "./Config"; import ConfigItem from "./ConfigItem"; import ConfigAttribute from "./ConfigAttribute"; +import PlDir from "./PlDir"; +import FeedWatcher from "./FeedWatcher"; +import Form from "./Form"; const runtime = { "516549714a510d87b5a6e391e7f33532": MakiObject, @@ -82,6 +85,22 @@ const runtime = { "593dba224976d07771f452b90b405536": Config, d40302824d873aab32128d87d5fcad6f: ConfigItem, "24dec2834a36b76e249ecc8c736c6bc4": ConfigAttribute, + "61a7abad41f67d7980e1d0b1f4a40386": PlDir, + a5376fa1411a4e94ec05f6830a5fea5e: FeedWatcher, + "2d2d13764cb9be0ae6570cbcf599c9e4": Form, + /* + // https://github.com/captbaritone/webamp/pull/933#issuecomment-535690208 + + a5376fa1411a4e94ec05f6830a5fea5e: FeedWatcher, + 6dcb05e448c28ac4f04993b14af50e91: AlbumArtLayer, + aee235ff498febd1e0d7af961a54d4da: ColorMgr, + b8e867b04da72715db53baa5acfefca1: Application, + f857beca41f18e197e093e97039f6439: CoreAdmin, + 2825a91b4245d4885970f1aa7b4388cf: Core, + e2bbc14d417384f6ebb2b3bd5055662f: Frame, + 836f8b2e4db4e0d10a0d7f93d1dcc804: File, + + */ }; export default runtime;