File tree 2 files changed +27
-25
lines changed
2 files changed +27
-25
lines changed Original file line number Diff line number Diff line change @@ -870,6 +870,33 @@ std::ostream& operator<<(std::ostream&, Struct);
870
870
std::ostream& operator <<(std::ostream&, Array);
871
871
std::ostream& operator <<(std::ostream&, TypeBuilder::ErrorReason);
872
872
873
+ // Inline some nontrivial methods here for performance reasons.
874
+
875
+ inline bool HeapType::isBottom () const {
876
+ if (isBasic ()) {
877
+ switch (getBasic (Unshared)) {
878
+ case ext:
879
+ case func:
880
+ case cont:
881
+ case any:
882
+ case eq:
883
+ case i31:
884
+ case struct_:
885
+ case array:
886
+ case exn:
887
+ case string:
888
+ return false ;
889
+ case none:
890
+ case noext:
891
+ case nofunc:
892
+ case nocont:
893
+ case noexn:
894
+ return true ;
895
+ }
896
+ }
897
+ return false ;
898
+ }
899
+
873
900
} // namespace wasm
874
901
875
902
namespace std {
Original file line number Diff line number Diff line change @@ -866,31 +866,6 @@ HeapTypeKind HeapType::getKind() const {
866
866
return getHeapTypeInfo (*this )->kind ;
867
867
}
868
868
869
- bool HeapType::isBottom () const {
870
- if (isBasic ()) {
871
- switch (getBasic (Unshared)) {
872
- case ext:
873
- case func:
874
- case cont:
875
- case any:
876
- case eq:
877
- case i31:
878
- case struct_:
879
- case array:
880
- case exn:
881
- case string:
882
- return false ;
883
- case none:
884
- case noext:
885
- case nofunc:
886
- case nocont:
887
- case noexn:
888
- return true ;
889
- }
890
- }
891
- return false ;
892
- }
893
-
894
869
bool HeapType::isOpen () const {
895
870
if (isBasic ()) {
896
871
return false ;
You can’t perform that action at this time.
0 commit comments