Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index ade9cf5f661474d76a8950fc756e3ca8c5540644..53f3bb026aa4ec83ccb8b9f56f73231d3acc75a4 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -3292,17 +3292,13 @@ Node* CodeStubAssembler::SubString(Node* context, Node* string, Node* from, |
Variable var_result(this, MachineRepresentation::kTagged); // String. |
// Make sure first argument is a string. |
- |
- // Bailout if receiver is a Smi. |
- GotoIf(TaggedIsSmi(string), &runtime); |
+ CSA_ASSERT(this, TaggedIsNotSmi(string)); |
+ CSA_ASSERT(this, IsString(string)); |
// Load the instance type of the {string}. |
Node* const instance_type = LoadInstanceType(string); |
var_instance_type.Bind(instance_type); |
- // Check if {string} is a String. |
- GotoUnless(IsStringInstanceType(instance_type), &runtime); |
- |
// Make sure that both from and to are non-negative smis. |
GotoUnless(TaggedIsPositiveSmi(from), &runtime); |