Skip to content

[Strings] Add a string-builtins feature, and lift/lower automatically when enabled #7601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work
  • Loading branch information
kripken committed May 15, 2025
commit adad0dc0091fe2cd67c9f78ed1d65fa8e51dbe85
2 changes: 1 addition & 1 deletion src/pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ struct PassRunner {
bool first = false;
bool last = false;
};
static const UnknownOrdering;
static const Ordering UnknownOrdering;

// Adds the default set of optimization passes; this is what -O does.
//
Expand Down
1 change: 1 addition & 0 deletions src/wasm-binary.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ extern const char* FP16Feature;
extern const char* BulkMemoryOptFeature;
extern const char* CallIndirectOverlongFeature;
extern const char* CustomDescriptorsFeature;
extern const char* StringBuiltinsFeature;

enum Subsection {
NameModule = 0,
Expand Down
2 changes: 2 additions & 0 deletions src/wasm/wasm-binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,8 @@ void WasmBinaryWriter::writeFeaturesSection() {
return BinaryConsts::CustomSections::CallIndirectOverlongFeature;
case FeatureSet::CustomDescriptors:
return BinaryConsts::CustomSections::CustomDescriptorsFeature;
case FeatureSet::StringBuiltins:
return BinaryConsts::CustomSections::StringBuiltinsFeature;
case FeatureSet::None:
case FeatureSet::Default:
case FeatureSet::All:
Expand Down
1 change: 1 addition & 0 deletions src/wasm/wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const char* FP16Feature = "fp16";
const char* BulkMemoryOptFeature = "bulk-memory-opt";
const char* CallIndirectOverlongFeature = "call-indirect-overlong";
const char* CustomDescriptorsFeature = "custom-descriptors";
const char* StringBuiltinsFeature = "string-builtins";

} // namespace BinaryConsts::CustomSections

Expand Down
1 change: 1 addition & 0 deletions test/unit/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,4 +453,5 @@ def test_emit_all_features(self):
'--enable-bulk-memory-opt',
'--enable-call-indirect-overlong',
'--enable-custom-descriptors',
'--enable-string-builtins',
], p2.stdout.splitlines())