From 80dcd1475aea3d9ea9cbc3cc9c3f2d6c3b4cc2b3 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 10 Aug 2022 10:02:11 +0300 Subject: [PATCH 1/8] wip --- src/bindings/js.ts | 2 ++ src/compiler.ts | 8 +++++++- src/types.ts | 32 ++++++++++++++++++++++++++++++++ tests/compiler/simd.debug.wat | 7 +++++++ tests/compiler/simd.release.wat | 7 +++++++ tests/compiler/simd.ts | 4 ++++ 6 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/bindings/js.ts b/src/bindings/js.ts index ffeea3f618..d192ef79b2 100644 --- a/src/bindings/js.ts +++ b/src/bindings/js.ts @@ -1369,6 +1369,7 @@ function indentText(text: string, indentLevel: i32, sb: string[], butFirst: bool } export function liftRequiresExportRuntime(type: Type): bool { + if (type.isVectorValue) return true; if (!type.isInternalReference) return false; let clazz = type.classReference; if (!clazz) { @@ -1398,6 +1399,7 @@ export function liftRequiresExportRuntime(type: Type): bool { } export function lowerRequiresExportRuntime(type: Type): bool { + if (type.isVectorValue) return true; if (!type.isInternalReference) return false; let clazz = type.classReference; if (!clazz) { diff --git a/src/compiler.ts b/src/compiler.ts index c5741d2436..2dfc79f93e 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -883,6 +883,12 @@ export class Compiler extends DiagnosticEmitter { } } } + let hasVectorValueOperands = signature.hasVectorValueOperands; + if (hasVectorValueOperands) { + // Modify signatures from v128 to i32/i64 pointers + let operandIndices = signature.getVectorValueOperandIndices(); + + } } return; } @@ -957,7 +963,7 @@ export class Compiler extends DiagnosticEmitter { element.identifierNode.range ); } - + // files /** Compiles the file matching the specified path. */ diff --git a/src/types.ts b/src/types.ts index e8a77844fc..8c7d0e593b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -918,6 +918,38 @@ export class Signature { return indices; } + /** Tests if this signature has at least one v128 operand. */ + get hasVectorValueOperands(): bool { + var thisType = this.thisType; + if (thisType && thisType.isVectorValue) { + return true; + } + var parameterTypes = this.parameterTypes; + for (let i = 0, k = parameterTypes.length; i < k; ++i) { + if (unchecked(parameterTypes[i]).isVectorValue) return true; + } + return false; + } + + /** Gets the indices of all v128 operands. */ + getVectorValueOperandIndices(): i32[] { + var indices = new Array(); + var index = 0; + var thisType = this.thisType; + if (thisType) { + if (thisType.isVectorValue) indices.push(index); + ++index; + } + var parameterTypes = this.parameterTypes; + for (let i = 0, k = parameterTypes.length; i < k; ++i) { + if (unchecked(parameterTypes[i]).isVectorValue) { + indices.push(index); + } + ++index; + } + return indices; + } + /** Converts this signature to a string. */ toString(validWat: bool = false): string { var sb = new Array(); diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat index 5c62702d70..7c07fde45b 100644 --- a/tests/compiler/simd.debug.wat +++ b/tests/compiler/simd.debug.wat @@ -9,6 +9,7 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $none_=>_v128 (func (result v128))) + (type $v128_=>_v128 (func (param v128) (result v128))) (type $i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result v128))) (type $i32_i32_i32_i32_i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32 i32 i32 i32 i32) (result v128))) (type $i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32) (result v128))) @@ -36,6 +37,7 @@ (data (i32.const 140) ",\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (table $0 1 1 funcref) (elem $0 (i32.const 1)) + (export "reexport" (func $simd/reexport)) (export "test_vars_i8x16_partial" (func $simd/test_vars_i8x16_partial)) (export "test_vars_i8x16_full" (func $simd/test_vars_i8x16_full)) (export "test_vars_i16x8_partial" (func $simd/test_vars_i16x8_partial)) @@ -4842,6 +4844,11 @@ call $simd/test_const drop ) + (func $simd/reexport (param $0 v128) (result v128) + local.get $0 + local.get $0 + i32x4.mul + ) (func $simd/test_vars_i8x16_partial (param $0 i32) (param $1 i32) (param $2 i32) (result v128) v128.const i32x4 0x03000100 0x07000504 0x0b0a0908 0x000e0d0c local.get $0 diff --git a/tests/compiler/simd.release.wat b/tests/compiler/simd.release.wat index 105f61d665..64c8b42098 100644 --- a/tests/compiler/simd.release.wat +++ b/tests/compiler/simd.release.wat @@ -6,6 +6,7 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $v128_=>_v128 (func (param v128) (result v128))) (type $i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) (result v128))) (type $i32_i32_i32_i32_i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32 i32 i32 i32 i32) (result v128))) (type $i32_i32_i32_i32_=>_v128 (func (param i32 i32 i32 i32) (result v128))) @@ -24,6 +25,7 @@ (data (i32.const 1112) "\01\00\00\00(\00\00\00A\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") (data (i32.const 1164) ",") (data (i32.const 1176) "\01\00\00\00\0e\00\00\00s\00i\00m\00d\00.\00t\00s") + (export "reexport" (func $simd/reexport)) (export "test_vars_i8x16_partial" (func $simd/test_vars_i8x16_partial)) (export "test_vars_i8x16_full" (func $simd/test_vars_i8x16_full)) (export "test_vars_i16x8_partial" (func $simd/test_vars_i16x8_partial)) @@ -1220,6 +1222,11 @@ local.get $0 call $~lib/rt/tlsf/__free ) + (func $simd/reexport (param $0 v128) (result v128) + local.get $0 + local.get $0 + i32x4.mul + ) (func $simd/test_vars_i8x16_partial (param $0 i32) (param $1 i32) (param $2 i32) (result v128) v128.const i32x4 0x03000100 0x07000504 0x0b0a0908 0x000e0d0c local.get $0 diff --git a/tests/compiler/simd.ts b/tests/compiler/simd.ts index 80d243ebaf..36a511d8a1 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/simd.ts @@ -770,6 +770,10 @@ function test_const(): v128 { return one; // should not inline } +export function reexport(a: v128): v128 { + return i32x4.mul(a, a); +} + export function test_vars_i8x16_partial(a: i8, b: i8, c: i8): v128 { return i8x16(0, 1, a, 3, 4, 5, b, 7, 8, 9, 10, 11, 12, 13, 14, c); } From 3322791cb4671920751c2f95d7709ce10b3dcfea Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 10 Aug 2022 11:15:36 +0300 Subject: [PATCH 2/8] add warnings --- src/bindings/js.ts | 6 ++++-- src/compiler.ts | 13 ++++++++++--- src/diagnosticMessages.json | 2 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/bindings/js.ts b/src/bindings/js.ts index d192ef79b2..510b36e37b 100644 --- a/src/bindings/js.ts +++ b/src/bindings/js.ts @@ -1369,7 +1369,8 @@ function indentText(text: string, indentLevel: i32, sb: string[], butFirst: bool } export function liftRequiresExportRuntime(type: Type): bool { - if (type.isVectorValue) return true; + // TODO: enable v128 in signatures in future + // if (type.isVectorValue) return true; if (!type.isInternalReference) return false; let clazz = type.classReference; if (!clazz) { @@ -1399,7 +1400,8 @@ export function liftRequiresExportRuntime(type: Type): bool { } export function lowerRequiresExportRuntime(type: Type): bool { - if (type.isVectorValue) return true; + // TODO: enable v128 in signatures in future + // if (type.isVectorValue) return true; if (!type.isInternalReference) return false; let clazz = type.classReference; if (!clazz) { diff --git a/src/compiler.ts b/src/compiler.ts index 2dfc79f93e..74e76d8286 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -885,9 +885,10 @@ export class Compiler extends DiagnosticEmitter { } let hasVectorValueOperands = signature.hasVectorValueOperands; if (hasVectorValueOperands) { - // Modify signatures from v128 to i32/i64 pointers - let operandIndices = signature.getVectorValueOperandIndices(); - + this.warning( + DiagnosticCode.Type_0_in_exported_function_does_not_support_for_all_runtimes, + functionInstance.identifierNode.range, "v128" + ); } } return; @@ -920,6 +921,12 @@ export class Compiler extends DiagnosticEmitter { } } } + if (global.type == Type.v128) { + this.warning( + DiagnosticCode.Type_0_of_exported_global_does_not_support_for_all_runtimes, + global.identifierNode.range, "v128" + ); + } return; } break; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 640be631c0..fc2e2864cb 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -11,6 +11,8 @@ "Transform '{0}': {1}": 109, "Start function name '{0}' is invalid or conflicts with another export.": 110, "Element '{0}' not found.": 111, + "Type '{0}' in exported function does not support for all runtimes.": 112, + "Type '{0}' of exported global does not support for all runtimes.": 113, "Conversion from type '{0}' to '{1}' requires an explicit cast.": 200, "Conversion from type '{0}' to '{1}' will require an explicit cast when switching between 32/64-bit.": 201, From c050e934419e77e3cc00633418911f54c4e73e8c Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 10 Aug 2022 16:34:45 +0300 Subject: [PATCH 3/8] better message --- src/compiler.ts | 4 ++-- src/diagnosticMessages.json | 3 +-- tests/compiler/simd.debug.wat | 6 ++++-- tests/compiler/simd.release.wat | 4 ++++ tests/compiler/simd.ts | 31 ++++++++++++++++--------------- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 74e76d8286..abbd684cab 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -886,7 +886,7 @@ export class Compiler extends DiagnosticEmitter { let hasVectorValueOperands = signature.hasVectorValueOperands; if (hasVectorValueOperands) { this.warning( - DiagnosticCode.Type_0_in_exported_function_does_not_support_for_all_runtimes, + DiagnosticCode.External_0_type_does_not_support_for_all_host_runtimes, functionInstance.identifierNode.range, "v128" ); } @@ -923,7 +923,7 @@ export class Compiler extends DiagnosticEmitter { } if (global.type == Type.v128) { this.warning( - DiagnosticCode.Type_0_of_exported_global_does_not_support_for_all_runtimes, + DiagnosticCode.External_0_type_does_not_support_for_all_host_runtimes, global.identifierNode.range, "v128" ); } diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index fc2e2864cb..b84cb1f562 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -11,8 +11,7 @@ "Transform '{0}': {1}": 109, "Start function name '{0}' is invalid or conflicts with another export.": 110, "Element '{0}' not found.": 111, - "Type '{0}' in exported function does not support for all runtimes.": 112, - "Type '{0}' of exported global does not support for all runtimes.": 113, + "External '{0}' type does not support for all host runtimes.": 112, "Conversion from type '{0}' to '{1}' requires an explicit cast.": 200, "Conversion from type '{0}' to '{1}' will require an explicit cast when switching between 32/64-bit.": 201, diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat index 7c07fde45b..2ecffbc79e 100644 --- a/tests/compiler/simd.debug.wat +++ b/tests/compiler/simd.debug.wat @@ -20,7 +20,7 @@ (type $f64_=>_v128 (func (param f64) (result v128))) (type $f64_f64_=>_v128 (func (param f64 f64) (result v128))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) - (global $~lib/native/ASC_FEATURE_SIMD i32 (i32.const 1)) + (global $simd/vec (mut v128) (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~lib/native/ASC_LOW_MEMORY_LIMIT i32 (i32.const 0)) (global $~lib/builtins/i16.MAX_VALUE i32 (i32.const 32767)) @@ -50,6 +50,7 @@ (export "test_vars_f32x4_full" (func $simd/test_vars_f32x4_full)) (export "test_vars_f64x2_partial" (func $simd/test_vars_f64x2_partial)) (export "test_vars_f64x2_full" (func $simd/test_vars_f64x2_full)) + (export "vec" (global $simd/vec)) (export "memory" (memory $0)) (start $~start) (func $~lib/rt/tlsf/Root#set:flMap (param $0 i32) (param $1 i32) @@ -4823,7 +4824,8 @@ ) (func $start:simd i32.const 1 - drop + i32x4.splat + global.set $simd/vec i32.const 1 drop i32.const 0 diff --git a/tests/compiler/simd.release.wat b/tests/compiler/simd.release.wat index 64c8b42098..f872a27dd8 100644 --- a/tests/compiler/simd.release.wat +++ b/tests/compiler/simd.release.wat @@ -17,6 +17,7 @@ (type $f64_=>_v128 (func (param f64) (result v128))) (type $f64_f64_=>_v128 (func (param f64 f64) (result v128))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (global $simd/vec (mut v128) (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 1036) "<") @@ -38,6 +39,7 @@ (export "test_vars_f32x4_full" (func $simd/test_vars_f32x4_full)) (export "test_vars_f64x2_partial" (func $simd/test_vars_f64x2_partial)) (export "test_vars_f64x2_full" (func $simd/test_vars_f64x2_full)) + (export "vec" (global $simd/vec)) (export "memory" (memory $0)) (start $~start) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) @@ -1359,6 +1361,8 @@ ) (func $~start (local $0 i32) + v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 + global.set $simd/vec call $simd/test_v128 global.get $~lib/rt/tlsf/ROOT i32.eqz diff --git a/tests/compiler/simd.ts b/tests/compiler/simd.ts index 36a511d8a1..b8d31dc238 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/simd.ts @@ -830,20 +830,21 @@ export function test_vars_f64x2_full(a: f64, b: f64): v128 { return f64x2(a, b); } -if (ASC_FEATURE_SIMD) { - // test builtins - assert(isVector()); - assert(!isVector()); +// test exported var +export let vec: v128 = i32x4.splat(1); - assert(isVector(i32x4.splat(0))); - assert(!isVector(0)); +// test builtins +assert(isVector()); +assert(!isVector()); - test_v128(); - test_i8x16(); - test_i16x8(); - test_i32x4(); - test_i64x2(); - test_f32x4(); - test_f64x2(); - test_const(); -} +assert(isVector(i32x4.splat(0))); +assert(!isVector(0)); + +test_v128(); +test_i8x16(); +test_i16x8(); +test_i32x4(); +test_i64x2(); +test_f32x4(); +test_f64x2(); +test_const(); From 00f0a39cb45d398b8a4f5b936af205aad1248632 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 15 Aug 2022 21:35:28 +0300 Subject: [PATCH 4/8] refactor according review --- cli/index.js | 2 +- src/compiler.ts | 15 +++++++++++---- src/diagnosticMessages.json | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cli/index.js b/cli/index.js index 49ee70c663..1c1e435ca4 100644 --- a/cli/index.js +++ b/cli/index.js @@ -858,7 +858,7 @@ export async function main(argv, options) { if (!opts.noEmit) { if (opts.binaryFile) { // We catched lagacy field for binary output (before 0.20) - return prepareResult(Error("`binaryFile` doesn't support. Please use `outFile` instead.")); + return prepareResult(Error("Usage of the --binaryFile compiler option is no longer supported. Use --outFile instead.")); } let bindings = opts.bindings || []; let hasStdout = false; diff --git a/src/compiler.ts b/src/compiler.ts index 12698efdec..5cb5d91200 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -886,9 +886,16 @@ export class Compiler extends DiagnosticEmitter { } let hasVectorValueOperands = signature.hasVectorValueOperands; if (hasVectorValueOperands) { + let range: Range; + if (signature.returnType == Type.v128) { + range = functionInstance.prototype.functionTypeNode.returnType.range; + } else { + let firstIndex = signature.getVectorValueOperandIndices()[0]; + range = functionInstance.prototype.functionTypeNode.parameters[firstIndex].range; + } this.warning( - DiagnosticCode.External_0_type_does_not_support_for_all_host_runtimes, - functionInstance.identifierNode.range, "v128" + DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, + range, "v128" ); } } @@ -924,8 +931,8 @@ export class Compiler extends DiagnosticEmitter { } if (global.type == Type.v128) { this.warning( - DiagnosticCode.External_0_type_does_not_support_for_all_host_runtimes, - global.identifierNode.range, "v128" + DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, + global.typeNode ? global.typeNode.range : global.identifierNode.range, "v128" ); } return; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index b84cb1f562..12265ea713 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -11,7 +11,7 @@ "Transform '{0}': {1}": 109, "Start function name '{0}' is invalid or conflicts with another export.": 110, "Element '{0}' not found.": 111, - "External '{0}' type does not support for all host runtimes.": 112, + "Exchange of '{0}' values is not supported by all embeddings": 112, "Conversion from type '{0}' to '{1}' requires an explicit cast.": 200, "Conversion from type '{0}' to '{1}' will require an explicit cast when switching between 32/64-bit.": 201, From 7eea9f1ccfa16d4c69d6b2c6f580de902250b78a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 15 Aug 2022 21:38:18 +0300 Subject: [PATCH 5/8] fix --- src/compiler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler.ts b/src/compiler.ts index 5cb5d91200..5d72c455a2 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -932,7 +932,10 @@ export class Compiler extends DiagnosticEmitter { if (global.type == Type.v128) { this.warning( DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, - global.typeNode ? global.typeNode.range : global.identifierNode.range, "v128" + global.typeNode + ? assert(global.typeNode).range + : global.identifierNode.range, + "v128" ); } return; From cd9d081134be1b744f8a6f89f5a32595c0297e7e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 15 Aug 2022 21:46:27 +0300 Subject: [PATCH 6/8] refactor --- src/compiler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 5d72c455a2..42d4dd9f9c 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -887,11 +887,12 @@ export class Compiler extends DiagnosticEmitter { let hasVectorValueOperands = signature.hasVectorValueOperands; if (hasVectorValueOperands) { let range: Range; + let fnTypeNode = functionInstance.prototype.functionTypeNode; if (signature.returnType == Type.v128) { - range = functionInstance.prototype.functionTypeNode.returnType.range; + range = fnTypeNode.returnType.range; } else { let firstIndex = signature.getVectorValueOperandIndices()[0]; - range = functionInstance.prototype.functionTypeNode.parameters[firstIndex].range; + range = fnTypeNode.parameters[firstIndex].range; } this.warning( DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, From 5dd84de21c3bf4a0da684ea0a7ac3b2c461fc589 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 15 Aug 2022 22:58:38 +0300 Subject: [PATCH 7/8] move check to compileFunction --- src/compiler.ts | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 42d4dd9f9c..9852fbc963 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -884,21 +884,6 @@ export class Compiler extends DiagnosticEmitter { } } } - let hasVectorValueOperands = signature.hasVectorValueOperands; - if (hasVectorValueOperands) { - let range: Range; - let fnTypeNode = functionInstance.prototype.functionTypeNode; - if (signature.returnType == Type.v128) { - range = fnTypeNode.returnType.range; - } else { - let firstIndex = signature.getVectorValueOperandIndices()[0]; - range = fnTypeNode.parameters[firstIndex].range; - } - this.warning( - DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, - range, "v128" - ); - } } return; } @@ -1541,6 +1526,24 @@ export class Compiler extends DiagnosticEmitter { instance.set(CommonFlags.ERRORED); } + if (instance.is(CommonFlags.AMBIENT) || instance.is(CommonFlags.EXPORT)) { + let hasVectorValueOperands = signature.hasVectorValueOperands; + if (hasVectorValueOperands) { + let range: Range; + let fnTypeNode = instance.prototype.functionTypeNode; + if (signature.returnType == Type.v128) { + range = fnTypeNode.returnType.range; + } else { + let firstIndex = signature.getVectorValueOperandIndices()[0]; + range = fnTypeNode.parameters[firstIndex].range; + } + this.warning( + DiagnosticCode.Exchange_of_0_values_is_not_supported_by_all_embeddings, + range, "v128" + ); + } + } + instance.finalize(module, funcRef); this.currentType = previousType; pendingElements.delete(instance); From 677bb320de8c0717055c1459dc7e9f7b92c40e6f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Mon, 15 Aug 2022 23:00:05 +0300 Subject: [PATCH 8/8] add comment --- src/compiler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler.ts b/src/compiler.ts index 9852fbc963..8e0c3dab7b 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1527,6 +1527,7 @@ export class Compiler extends DiagnosticEmitter { } if (instance.is(CommonFlags.AMBIENT) || instance.is(CommonFlags.EXPORT)) { + // Verify and print warn if signature has v128 type for imported or exported functions let hasVectorValueOperands = signature.hasVectorValueOperands; if (hasVectorValueOperands) { let range: Range;