@@ -295,7 +295,7 @@ struct StringLowering : public StringGathering {
295295 Name equalsImport;
296296 Name compareImport;
297297 Name lengthImport;
298- Name codePointAtImport ;
298+ Name charCodeAtImport ;
299299 Name substringImport;
300300
301301 // The name of the module to import string functions from.
@@ -334,8 +334,8 @@ struct StringLowering : public StringGathering {
334334 // string.length: string -> i32
335335 lengthImport = addImport (module , " length" , nullExt, Type::i32 );
336336 // string.codePointAt: string, offset -> i32
337- codePointAtImport =
338- addImport (module , " codePointAt " , {nullExt, Type::i32 }, Type::i32 );
337+ charCodeAtImport =
338+ addImport (module , " charCodeAt " , {nullExt, Type::i32 }, Type::i32 );
339339 // string.substring: string, start, end -> string
340340 substringImport =
341341 addImport (module , " substring" , {nullExt, Type::i32 , Type::i32 }, nnExt);
@@ -425,7 +425,7 @@ struct StringLowering : public StringGathering {
425425 void visitStringWTF16Get (StringWTF16Get* curr) {
426426 Builder builder (*getModule ());
427427 replaceCurrent (builder.makeCall (
428- lowering.codePointAtImport , {curr->ref , curr->pos }, Type::i32 ));
428+ lowering.charCodeAtImport , {curr->ref , curr->pos }, Type::i32 ));
429429 }
430430
431431 void visitStringSliceWTF (StringSliceWTF* curr) {
0 commit comments