summaryrefslogtreecommitdiff
path: root/src/passes/StringLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/StringLowering.cpp')
-rw-r--r--src/passes/StringLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/StringLowering.cpp b/src/passes/StringLowering.cpp
index c04695c50..1e16295cd 100644
--- a/src/passes/StringLowering.cpp
+++ b/src/passes/StringLowering.cpp
@@ -295,7 +295,7 @@ struct StringLowering : public StringGathering {
Name equalsImport;
Name compareImport;
Name lengthImport;
- Name codePointAtImport;
+ Name charCodeAtImport;
Name substringImport;
// The name of the module to import string functions from.
@@ -334,8 +334,8 @@ struct StringLowering : public StringGathering {
// string.length: string -> i32
lengthImport = addImport(module, "length", nullExt, Type::i32);
// string.codePointAt: string, offset -> i32
- codePointAtImport =
- addImport(module, "codePointAt", {nullExt, Type::i32}, Type::i32);
+ charCodeAtImport =
+ addImport(module, "charCodeAt", {nullExt, Type::i32}, Type::i32);
// string.substring: string, start, end -> string
substringImport =
addImport(module, "substring", {nullExt, Type::i32, Type::i32}, nnExt);
@@ -425,7 +425,7 @@ struct StringLowering : public StringGathering {
void visitStringWTF16Get(StringWTF16Get* curr) {
Builder builder(*getModule());
replaceCurrent(builder.makeCall(
- lowering.codePointAtImport, {curr->ref, curr->pos}, Type::i32));
+ lowering.charCodeAtImport, {curr->ref, curr->pos}, Type::i32));
}
void visitStringSliceWTF(StringSliceWTF* curr) {