summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-09-30 12:40:05 -0700
committerGitHub <noreply@github.com>2020-09-30 12:40:05 -0700
commit20d6236b1b96878015c050fc953d63a040d60385 (patch)
treea8586d61b55ebd2a5a5cbb0591918b9f240f96ad /src
parent07047103a26e1c17ee995ef3e1358ddb26d8e8c8 (diff)
downloadbinaryen-20d6236b1b96878015c050fc953d63a040d60385.tar.gz
binaryen-20d6236b1b96878015c050fc953d63a040d60385.tar.bz2
binaryen-20d6236b1b96878015c050fc953d63a040d60385.zip
Remove unnecessary "new" on Table generation in wasm2js (#3163)
It's not an actual constructor, just a JS function that returns the object.
Diffstat (limited to 'src')
-rw-r--r--src/wasm2js.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index cb7bfd20d..0a2e45d49 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -598,8 +598,7 @@ void Wasm2JSBuilder::addTable(Ref ast, Module* wasm) {
Ref theVar = ValueBuilder::makeVar();
ast->push_back(theVar);
- Ref table =
- ValueBuilder::makeNew(ValueBuilder::makeCall(IString("Table"), theArray));
+ Ref table = ValueBuilder::makeCall(IString("Table"), theArray);
ValueBuilder::appendToVar(theVar, FUNCTION_TABLE, table);
} else if (!wasm->table.imported()) {
// Otherwise if the table is internal (neither imported not exported).