Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: src/code-stub-assembler.h

Issue 2870013004: [builtins] String.prototype.slice as a CSA builtin. (Closed)
Patch Set: Flags for SubString. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index a7f3ef8afaed105aca09f8b9aed215805aa10fb9..ec71d0a2aea29e8da87bd0146983d52da1ea07ea 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -802,9 +802,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,

Powered by Google App Engine
This is Rietveld 408576698