@@ -193,16 +193,16 @@ ensureFunctionImport(Module* module, Name name, std::string sig) {
193193// Here we internalize all such wasm globals and generte code that sets their
194194// value based on the result of call `g$foo` and `fp$bar` functions at runtime.
195195Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction () {
196- std::vector<Global*> got_entries_func ;
197- std::vector<Global*> got_entries_mem ;
196+ std::vector<Global*> gotFuncEntries ;
197+ std::vector<Global*> gotMemEntries ;
198198 for (auto & g : wasm.globals ) {
199199 if (!g->imported ()) {
200200 continue ;
201201 }
202202 if (g->module == " GOT.func" ) {
203- got_entries_func .push_back (g.get ());
203+ gotFuncEntries .push_back (g.get ());
204204 } else if (g->module == " GOT.mem" ) {
205- got_entries_mem .push_back (g.get ());
205+ gotMemEntries .push_back (g.get ());
206206 } else {
207207 continue ;
208208 }
@@ -211,24 +211,24 @@ Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction() {
211211 g->init = Builder (wasm).makeConst (Literal (0 ));
212212 }
213213
214- if (!got_entries_func .size () && !got_entries_mem .size ()) {
214+ if (!gotFuncEntries .size () && !gotMemEntries .size ()) {
215215 return nullptr ;
216216 }
217217
218- Function* assign_func =
218+ Function* assignFunc =
219219 builder.makeFunction (ASSIGN_GOT_ENTIRES, std::vector<NameType>{}, none, {});
220220 Block* block = builder.makeBlock ();
221- assign_func ->body = block;
221+ assignFunc ->body = block;
222222
223- for (Global* g : got_entries_mem ) {
223+ for (Global* g : gotMemEntries ) {
224224 Name getter (std::string (" g$" ) + g->base .c_str ());
225225 ensureFunctionImport (&wasm, getter, " i" );
226226 Expression* call = builder.makeCall (getter, {}, i32 );
227- SetGlobal* set_global = builder.makeSetGlobal (g->name , call);
228- block->list .push_back (set_global );
227+ SetGlobal* setGlobal = builder.makeSetGlobal (g->name , call);
228+ block->list .push_back (setGlobal );
229229 }
230230
231- for (Global* g : got_entries_func ) {
231+ for (Global* g : gotFuncEntries ) {
232232 Function* f = nullptr ;
233233 // The function has to exist either as export or an import.
234234 // Note that we don't search for the function by name since its internal
@@ -250,12 +250,12 @@ Function* EmscriptenGlueGenerator::generateAssignGOTEntriesFunction() {
250250 .c_str ());
251251 ensureFunctionImport (&wasm, getter, " i" );
252252 Expression* call = builder.makeCall (getter, {}, i32 );
253- SetGlobal* set_global = builder.makeSetGlobal (g->name , call);
254- block->list .push_back (set_global );
253+ SetGlobal* setGlobal = builder.makeSetGlobal (g->name , call);
254+ block->list .push_back (setGlobal );
255255 }
256256
257- wasm.addFunction (assign_func );
258- return assign_func ;
257+ wasm.addFunction (assignFunc );
258+ return assignFunc ;
259259}
260260
261261// For emscripten SIDE_MODULE we generate a single exported function called
0 commit comments