Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index 03c80d2ed424cf755e3da7f93648f23b53ba36eb..fb0ffc9b39456e63a5515a926c242e6821373d32 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -3154,10 +3154,12 @@ Node* CodeStubAssembler::IsJSRegExp(Node* object) { |
Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index, |
ParameterMode parameter_mode) { |
+ if (parameter_mode == SMI_PARAMETERS) CSA_ASSERT(this, TaggedIsSmi(index)); |
CSA_ASSERT(this, IsString(string)); |
// Translate the {index} into a Word. |
Node* const int_index = ParameterToWord(index, parameter_mode); |
+ CSA_ASSERT(this, IntPtrGreaterThanOrEqual(int_index, IntPtrConstant(0))); |
VARIABLE(var_result, MachineRepresentation::kWord32); |