Add address comments for methods and vtables #4

Closed
bigjango13 wants to merge 1 commits from (deleted):master into master
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import { formatType } from './common';
import { formatType, toHex } from './common';
export class Method {
readonly self: string;
@ -32,6 +32,6 @@ export class Method {
// Generate Variable Definition
generateDefinition(nameSuffix?: string) {
return `${this.getType()} ${this.getName()}${nameSuffix !== undefined ? nameSuffix : ''};\n`;
return `${this.getType()} ${this.getName()}${nameSuffix !== undefined ? nameSuffix : ''}; // ${toHex(this.address)}\n`;
}
}

View File

@ -115,7 +115,7 @@ export class VTable implements Property {
// Pointers
if (this.#address !== null) {
// Base
out += `extern ${this.#getName()} *${this.#getName()}_base;\n`;
out += `extern ${this.#getName()} *${this.#getName()}_base; // ${toHex(this.#address)}\n`;
// Methods
for (let i = 0; i < this.#methods.length; i++) {
const info = this.#methods[i];