Skip to content

Commit 26a065c

Browse files
osa1Commit Queue
authored andcommitted
[wasm_builder] Update names of instructions extern.internalize/externalize
These instructions were renamed to any.convert_extern and extern.convert_any in Wasm GC spec commit: WebAssembly/gc@5bca3f7 Change-Id: Ie696541f75974c69828fb317754e3b613691eb4d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420141 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Ömer Ağacan <[email protected]>
1 parent 8cb4d3c commit 26a065c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

pkg/dart2wasm/lib/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class ConstantInstantiator extends ConstantVisitor<w.ValueType>
373373
if (translator.needsConversion(resultType, expectedType)) {
374374
if (expectedType == const w.RefType.extern(nullable: true)) {
375375
assert(resultType.isSubtypeOf(w.RefType.any(nullable: true)));
376-
b.extern_externalize();
376+
b.extern_convert_any();
377377
} else {
378378
// This only happens in invalid but unreachable code produced by the
379379
// TFA dead-code elimination.

pkg/dart2wasm/lib/intrinsics.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,22 +1464,22 @@ class Intrinsifier {
14641464
case StaticIntrinsic.externalizeNonNullable:
14651465
final value = node.arguments.positional.single;
14661466
codeGen.translateExpression(value, w.RefType.any(nullable: false));
1467-
b.extern_externalize();
1467+
b.extern_convert_any();
14681468
return w.RefType.extern(nullable: false);
14691469
case StaticIntrinsic.externalizeNullable:
14701470
final value = node.arguments.positional.single;
14711471
codeGen.translateExpression(value, w.RefType.any(nullable: true));
1472-
b.extern_externalize();
1472+
b.extern_convert_any();
14731473
return w.RefType.extern(nullable: true);
14741474
case StaticIntrinsic.internalizeNonNullable:
14751475
final value = node.arguments.positional.single;
14761476
codeGen.translateExpression(value, w.RefType.extern(nullable: false));
1477-
b.extern_internalize();
1477+
b.any_convert_extern();
14781478
return w.RefType.any(nullable: false);
14791479
case StaticIntrinsic.internalizeNullable:
14801480
final value = node.arguments.positional.single;
14811481
codeGen.translateExpression(value, w.RefType.extern(nullable: true));
1482-
b.extern_internalize();
1482+
b.any_convert_extern();
14831483
return w.RefType.any(nullable: true);
14841484
case StaticIntrinsic.wasmExternRefIsNull:
14851485
final value = node.arguments.positional.single;

pkg/wasm_builder/lib/src/builder/instructions.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,16 +1408,16 @@ class InstructionsBuilder with Builder<ir.Instructions> {
14081408
_add(ir.BrOnCastFail(_labelIndex(label), inputType, targetType));
14091409
}
14101410

1411-
/// Emit an `extern.internalize` instruction.
1412-
void extern_internalize() {
1411+
/// Emit an `any.convert_extern` instruction.
1412+
void any_convert_extern() {
14131413
assert(_verifyTypesFun(const [ir.RefType.extern(nullable: true)],
14141414
(inputs) => [ir.RefType.any(nullable: inputs.single.nullable)],
14151415
trace: ['extern.internalize']));
14161416
_add(const ir.ExternInternalize());
14171417
}
14181418

1419-
/// Emit an `extern.externalize` instruction.
1420-
void extern_externalize() {
1419+
/// Emit an `extern.convert_any` instruction.
1420+
void extern_convert_any() {
14211421
assert(_verifyTypesFun(const [ir.RefType.any(nullable: true)],
14221422
(inputs) => [ir.RefType.extern(nullable: inputs.single.nullable)],
14231423
trace: ['extern.externalize']));

0 commit comments

Comments
 (0)