Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index fa5ba934f0d9a9278f599c5dae2edddb812d3d23..43e430d425715914d635c07f6bb96a42467c1eb1 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -805,9 +805,15 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
ParameterMode parameter_mode = SMI_PARAMETERS); |
// Return the single character string with only {code}. |
Node* StringFromCharCode(Node* code); |
+ |
+ enum class SubStringFlags { NONE, FROM_TO_ARE_BOUNDED }; |
+ |
// Return a new string object which holds a substring containing the range |
// [from,to[ of string. |from| and |to| are expected to be tagged. |
- Node* SubString(Node* context, Node* string, Node* from, Node* to); |
+ // If flags has the value FROM_TO_ARE_BOUNDED then from and to are in |
+ // the range [0, string-length) |
+ Node* SubString(Node* context, Node* string, Node* from, Node* to, |
+ SubStringFlags flags = SubStringFlags::NONE); |
// Return a new string object produced by concatenating |first| with |second|. |
Node* StringAdd(Node* context, Node* first, Node* second, |