116 {
117
118
124 }
125
126 if (
type.IsTopTypeForSubtyping()) {
127 return StubCode::TopTypeTypeTest().ptr();
128 }
129 if (
type.IsTypeParameter()) {
131 if (nullable) {
132 return StubCode::NullableTypeParameterTypeTest().ptr();
133 } else {
134 return StubCode::TypeParameterTypeTest().ptr();
135 }
136 }
137
138 if (
type.IsFunctionType()) {
140 return nullable ? StubCode::DefaultNullableTypeTest().ptr()
141 : StubCode::DefaultTypeTest().ptr();
142 }
143
144 if (
type.IsType() ||
type.IsRecordType()) {
145 const bool should_specialize = !FLAG_precompiled_mode && lazy_specialize;
147 if (should_specialize) {
148 return nullable ? StubCode::LazySpecializeNullableTypeTest().ptr()
149 : StubCode::LazySpecializeTypeTest().ptr();
150 } else {
151 return nullable ? StubCode::DefaultNullableTypeTest().ptr()
152 : StubCode::DefaultTypeTest().ptr();
153 }
154 }
155
156 return StubCode::UnreachableTypeTest().ptr();
157}
static bool NullIsAssignableTo(const AbstractType &other)
static bool HasBeenInitialized()