Skip to content

Commit 69acb4e

Browse files
committed
cache native size type
1 parent 7110bf1 commit 69acb4e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/compiler.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6528,6 +6528,7 @@ export class Compiler extends DiagnosticEmitter {
65286528
// indirect call: index argument with signature (non-generic, can't be inlined)
65296529
case ElementKind.LOCAL: {
65306530
let local = <Local>target;
6531+
let nativeSizeType = this.options.nativeSizeType;
65316532
signature = assert(local.type.signatureReference);
65326533
if (local.type.is(TypeFlags.CLOSURE)) {
65336534
// If we're calling a local we know to be a closure, then we must still be in the creator functions
@@ -6539,13 +6540,13 @@ export class Compiler extends DiagnosticEmitter {
65396540
module.load(
65406541
local.type.byteSize,
65416542
local.type.is(TypeFlags.SIGNED),
6542-
module.local_get(local.index, this.options.nativeSizeType),
6543+
module.local_get(local.index, nativeSizeType),
65436544
this.options.nativeSizeType,
65446545
0
65456546
),
65466547
expression.arguments,
65476548
expression,
6548-
module.local_get(local.index, this.options.nativeSizeType),
6549+
module.local_get(local.index, nativeSizeType),
65496550
contextualType == Type.void
65506551
)
65516552
], signature.returnType.toNativeType());

0 commit comments

Comments
 (0)