Skip to content

Commit

Permalink
Comment out all console.log() calls
Browse files Browse the repository at this point in the history
But keep them in case they are ever necessary
  • Loading branch information
bjorn3 committed Feb 1, 2023
1 parent 032766f commit 7219829
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/fs_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class File {
/*:: data: Uint8Array*/;

constructor(data/*: ArrayBuffer | Uint8Array*/) {
console.log(data);
//console.log(data);
this.data = new Uint8Array(data);
}

Expand Down Expand Up @@ -41,7 +41,7 @@ export class Directory {
if (entry.contents[component] != undefined) {
entry = entry.contents[component];
} else {
console.log(component);
//console.log(component);
return null;
}
}
Expand All @@ -57,7 +57,7 @@ export class Directory {
if (entry.contents[component] != undefined) {
entry = entry.contents[component];
} else {
console.log("create", component);
//console.log("create", component);
if (i == components.length - 1) {
entry.contents[component] = new File(new ArrayBuffer(0));
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/fs_fd.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class OpenDirectory extends Fd {
}

fd_readdir_single(cookie/*: BigInt*/)/*: { ret: number, dirent: wasi.Dirent | null }*/ {
console.log(cookie, Object.keys(this.dir.contents).slice(Number(cookie)));
//console.log(cookie, Object.keys(this.dir.contents).slice(Number(cookie)));
if (cookie >= BigInt(Object.keys(this.dir.contents).length)) {
return { ret: 0, dirent: null };
}
Expand Down
12 changes: 6 additions & 6 deletions src/wasi.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class WASI {
buf_size += arg.length + 1;
}
buffer.setUint32(argv_buf_size, buf_size, true);
console.log(buffer.getUint32(argc, true), buffer.getUint32(argv_buf_size, true));
//console.log(buffer.getUint32(argc, true), buffer.getUint32(argv_buf_size, true));
return 0;
},
args_get(argv/*: number*/, argv_buf/*: number*/)/*: number*/ {
Expand All @@ -44,7 +44,7 @@ export default class WASI {
buffer.setUint8(argv_buf + arg.length, 0);
argv_buf += arg.length + 1;
}
console.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_argv_buf, argv_buf)));
//console.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_argv_buf, argv_buf)));
return 0;
},

Expand All @@ -56,7 +56,7 @@ export default class WASI {
buf_size += environ.length + 1;
}
buffer.setUint32(environ_size, buf_size, true);
console.log(buffer.getUint32(environ_count, true), buffer.getUint32(environ_size, true));
//console.log(buffer.getUint32(environ_count, true), buffer.getUint32(environ_size, true));
return 0;
},
environ_get(environ/*: number*/, environ_buf/*: number*/)/*: number*/ {
Expand All @@ -71,7 +71,7 @@ export default class WASI {
buffer.setUint8(environ_buf + e.length, 0);
environ_buf += e.length + 1;
}
console.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_environ_buf, environ_buf)));
//console.log(new TextDecoder("utf-8").decode(buffer8.slice(orig_environ_buf, environ_buf)));
return 0;
},

Expand Down Expand Up @@ -360,7 +360,7 @@ export default class WASI {
let buffer8 = new Uint8Array(self.inst.exports.memory.buffer);
if (self.fds[fd] != undefined) {
let path = new TextDecoder("utf-8").decode(buffer8.slice(path_ptr, path_ptr + path_len));
console.log(path);
//console.log(path);
let { ret, fd_obj } = self.fds[fd].path_open(dirflags, path, oflags, fs_rights_base, fs_rights_inheriting, fd_flags);
if (ret != 0) {
return ret;
Expand All @@ -379,7 +379,7 @@ export default class WASI {
let buffer8 = new Uint8Array(self.inst.exports.memory.buffer);
if (self.fds[fd] != undefined) {
let path = new TextDecoder("utf-8").decode(buffer8.slice(path_ptr, path_ptr + path_len));
console.log(path);
//console.log(path);
let { ret, data } = self.fds[fd].path_readlink(path);
if (data != null) {
if (data.length > buf_len) {
Expand Down

0 comments on commit 7219829

Please sign in to comment.