Skip to content

Commit 2d334a4

Browse files
authored
Remove printrtti command line option (AssemblyScript#1270)
1 parent 76b975c commit 2d334a4

File tree

4 files changed

+1
-51
lines changed

4 files changed

+1
-51
lines changed

cli/asc.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ interface CompilerOptions {
139139
listFiles?: boolean;
140140
/** Prints measuring information on I/O and compile times. */
141141
measure?: boolean;
142-
/** Prints the module's runtime type information to stderr. */
143-
printrtti?: boolean;
144142
/** Disables terminal colors. */
145143
noColors?: boolean;
146144
/** Specifies an alternative file extension. */

cli/asc.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -849,9 +849,7 @@ exports.main = function main(argv, options, callback) {
849849
if (args.measure) {
850850
printStats(stats, stderr);
851851
}
852-
if (args.printrtti) {
853-
printRTTI(program, stderr);
854-
}
852+
855853
return callback(null);
856854

857855
function readFileNode(filename, baseDir) {
@@ -1004,15 +1002,6 @@ function printStats(stats, output) {
10041002

10051003
exports.printStats = printStats;
10061004

1007-
/** Prints runtime type information. */
1008-
function printRTTI(program, output) {
1009-
if (!output) output = process.stderr;
1010-
output.write("# Runtime type information (RTTI)\n");
1011-
output.write(assemblyscript.buildRTTI(program));
1012-
}
1013-
1014-
exports.printRTTI = printRTTI;
1015-
10161005
var allocBuffer = typeof global !== "undefined" && global.Buffer
10171006
? global.Buffer.allocUnsafe || function(len) { return new global.Buffer(len); }
10181007
: function(len) { return new Uint8Array(len) };

cli/asc.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,6 @@
321321
"type": "b",
322322
"default": false
323323
},
324-
"printrtti": {
325-
"description": "Prints the module's runtime type information to stderr.",
326-
"type": "b",
327-
"default": false
328-
},
329324
" ...": {
330325
"description": "Specifies node.js options (CLI only). See: node --help"
331326
},

src/index.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -257,38 +257,6 @@ export function buildTSD(program: Program): string {
257257
return TSDBuilder.build(program);
258258
}
259259

260-
/** Builds a JSON file of a program's runtime type information. */
261-
export function buildRTTI(program: Program): string {
262-
var sb = new Array<string>();
263-
sb.push("{\n \"names\": [\n");
264-
// TODO: for (let cls of program.managedClasses.values()) {
265-
for (let _values = Map_values(program.managedClasses), i = 0, k = _values.length; i < k; ++i) {
266-
let cls = unchecked(_values[i]);
267-
sb.push(" \"");
268-
sb.push(cls.internalName);
269-
sb.push("\",\n");
270-
}
271-
sb.push(" ],\n \"base\": [\n");
272-
// TODO: for (let cls of program.managedClasses.values()) {
273-
for (let _values = Map_values(program.managedClasses), i = 0, k = _values.length; i < k; ++i) {
274-
let cls = unchecked(_values[i]);
275-
let base = cls.base;
276-
sb.push(" ");
277-
sb.push(base ? base.id.toString() : "0");
278-
sb.push(",\n");
279-
}
280-
sb.push(" ],\n \"flags\": [\n");
281-
// TODO: for (let cls of program.managedClasses.values()) {
282-
for (let _values = Map_values(program.managedClasses), i = 0, k = _values.length; i < k; ++i) {
283-
let cls = unchecked(_values[i]);
284-
sb.push(" ");
285-
sb.push(cls.rttiFlags.toString());
286-
sb.push(",\n");
287-
}
288-
sb.push(" ]\n}\n");
289-
return sb.join("");
290-
}
291-
292260
// Full API
293261
export * from "./ast";
294262
export * from "./common";

0 commit comments

Comments
 (0)