@@ -21,11 +21,10 @@ class Globals {
2121 final Map <w.Global , w.BaseFunction > _globalGetters = {};
2222
2323 final Map <Field , w.Global > _globalInitializedFlag = {};
24+ final WasmGlobalImporter _globalsModuleMap;
2425
25- late final WasmGlobalImporter _globalsModuleMap =
26- WasmGlobalImporter (translator, 'global' );
27-
28- Globals (this .translator);
26+ Globals (this .translator)
27+ : _globalsModuleMap = WasmGlobalImporter (translator, 'global' );
2928
3029 Constant ? _getConstantInitializer (Field variable) {
3130 Expression ? init = variable.initializer;
@@ -43,8 +42,7 @@ class Globals {
4342 /// Takes into account the calling module and the module the global belongs
4443 /// to. If they are not the same then accesses the global indirectly, either
4544 /// through an import or a getter call.
46- w.ValueType readGlobal (w.InstructionsBuilder b, w.Global global,
47- {String importNameSuffix = '' }) {
45+ w.ValueType readGlobal (w.InstructionsBuilder b, w.Global global) {
4846 final owningModule = global.enclosingModule;
4947 final callingModule = b.module;
5048 if (owningModule == callingModule) {
0 commit comments