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

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

Issue 2381053002: Reland "[builtins] migrate C++ String Iterator builtins to baseline TurboFan" (Closed)
Patch Set: Add the fix and test Created 4 years, 3 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
« no previous file with comments | « src/builtins/builtins-string.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 3e6a446ec7ca9a3e5202279a9a23b6aa3f78a9bc..936c5d267799b52aee590fc4cbe85ae5e9143a57 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -19,6 +19,12 @@ class StubCache;
enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol };
+enum class UnicodeEncoding {
+ // Different unicode encodings in a |word32|:
+ UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate
+ UTF32, // full UTF32 code unit / Unicode codepoint
+};
+
// Provides JavaScript-specific "macro-assembler" functionality on top of the
// CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
// it's possible to add JavaScript-specific useful CodeAssembler "macros"
@@ -472,6 +478,9 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* SubString(compiler::Node* context, compiler::Node* string,
compiler::Node* from, compiler::Node* to);
+ compiler::Node* StringFromCodePoint(compiler::Node* codepoint,
+ UnicodeEncoding encoding);
+
// Type conversion helpers.
// Convert a String to a Number.
compiler::Node* StringToNumber(compiler::Node* context,
« no previous file with comments | « src/builtins/builtins-string.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698